Font Size: a A A

Research And Implementation Of Storage Solutions In Disks Of Proxy Server For Streaming Media

Posted on:2007-08-24Degree:MasterType:Thesis
Country:ChinaCandidate:Y Y XieFull Text:PDF
GTID:2178360182496320Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the developments and popularizations of Internet technology,people need more and more streaming media. But the characters of streamingmedia, which are real time, high speed and high bandwidth, make the Internetresources can't meet its requirements. The conflicts between the limitedInternet resources and wide applications of streaming media are more serious.There are several disadvantages in the traditional Client-Server service modeas follows: high delay and frequent dither when playing in clients;overloadof streaming media server;the blocks of network. So the proxy server forstreaming media is proposed in order to solve the problems above.On the other hand, the single disk can't meet the requirements forstoring streaming media because of its character of large volume. Therequirements for storage have become more highly, so the storage solutionsact as a vital role in the proxy server system. RAID has the characters oflarge capability and high reliability, which makes it be the primary storagefacility;SCSI protocol can transfer with high speed, which makes it be thepreferred mode to link RAID.In this paper, we researched and implemented the storage solutions indisks of proxy server for streaming media based on the existent theories ofproxy server and storage in disks, using RAID as the storage facility andusing SCSI protocol. And we also implemented three cache technologies forstreaming media, they are const-length based segment, variant-length basedsegment and dynamic cache.We partition some space in disk to be Cache in order to improve theefficiency of the system. When streaming media is requested, it is searched inCache first, if found it will be sent to clients directly. We needn't to get datafrom disks, which can reduce the cost of the system. If it is not found inCache, we will look for streaming media in disks. Then it is transferred intoCache after found and sent to clients. If it is not found in disks, the request istransferred to the original server to get data. Then the proxy server sends toclients the data coming from the original server, and store data in its disks.When writing data into disks, we write it into Cache first, and write it intodisks not at once but when the system is not busy. So we implemented theoperations to reading and writing requests in RAID.Considering the popularity degree, we used const-length based segment,variant-length based segment and dynamic cache technologies. We divide themedia into two parts during the transmission for sake of starting time, theformer small in size is called prefix, the later large in size is called suffix.Const-length based segment means we store the prefix. The prefix isdelivered to the client immediately when requested, then, the proxy requeststhe suffix from the original server and delivers the suffix to the client, whichreduces the delay time efficient.If the amount being requested of any streaming media reaches a certainvalue, it can be stored using variant-length based segment method. Theprinciple of this method is we divide the suffix into fixed length segments.The first one's length is equal to its prefix', each of the later segments isdouble of their previous segment.The data in Cache need to be replaced according to replacementalgorithm when the space is not enough. For const-length based segment, theone has smallest popularity will be replaced. The popularity is related to thesize and the number being requested of the segments: the larger one, thesmaller value of popularity;the bigger number, the bigger value of popularity.For variant-length based segment, we adopt segment-based replacement andLRU replacement policy. Calculate the cache value of the stored parts of themedia, and sort all replaceable segments according to the ascending cachevalue, then select the smallest one to replace.Dynamic cache ensures the continuous services to the clients, its lengthmust hold integer blocks and can accumulate the whole line of a batch, and itcan server all the clients in the batch. Its content varies according to the time,while size varies according to the number of clients. Some clients may quitduring the process and if there is only one client left, the proxy will withdrawthe dynamic cache and send data to the client directly. This method ensuresthe most popular media is served to the clients best.The suffix stored is replaced prior according to its replacement policywhen there is not enough space for dynamic cache. If there is no appropriatesuffix, the dynamic cache working will be replaced. We calculate the lifevalue of dynamic cache, select the dynamic cache whose life value is smallerand total length is longer than the data being requested to replace.Const-length based segment, variant-length based segment and dynamiccache relations, and they must be used combinable. Streaming media is givencorresponding cache space according to its popularity to improve theutilization rate of space in Cache and the quality of services to clients.A filter-driver-program is used to implement the cache technologies, andit is embedded into the driver program stacks of the system. It receives theIRP(I/O Request Packet) and analysis the information in IRP, then doesdifferent operations by using its functions such as Read(), Write() etc.Meanwhile, another procedure is used to monitor the requests and judgewhether the system is idle. If so, we transfer the new data from Cache todisks. We use a queue to record the new data, and add the latest data to thetail of the queue in turn. When the system is idle, we transfer the data fromthe head of the queue, and delete it after done. Let the next node be the headand operate it like that. The transaction will be interrupted if there is anyrequest during this period, and continued in the next idle time.The researches of storage solutions for streaming media have been getmore attention, and there are many solutions can be fulfilled. In this paper,we implement the storage in disks for streaming media based on the existenttheories, which is helpful for the further researches.
Keywords/Search Tags:Implementation
PDF Full Text Request
Related items