Embodiments of the invention are illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings in which like reference numerals refer to similar elements.
In the following description, numerous specific details are set forth. However, embodiments of the invention may be practiced without these specific details. In other instances, well-known circuits, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
Current media servers may offer several levels of data compression but do not recompress on the fly or moderate the quality of the streams to maximize the experience for the client devices. Techniques described herein provide both of dynamically adjustable compression and bandwidth allocation plus takes advantage of having processing power available on the server.
If, for example, client 140 is the first client to request streamed data from media server 130, media server 130 may stream the requested data to client 140 at the highest possible quality and utilizing the maximum available bandwidth. In response to additional requests for streamed data from media server 130 generated by, for example, client 110 or client 120, media server 130 may modify the bandwidth and/or quality (e.g., compression) parameters accordingly.
For example, media server 130 may compress one or more of the data streams destined for client 110, client 120 and/or client 140. Thus, media server 130 may attempt to provide the least compression possible. The compression levels utilized by media server 130 may be based, at least in part, on the number of clients requesting streamed data and/or available bandwidth.
Media server 130 may also modify bandwidth allocated to one or more of the data streams destined for client 110, client 120 and/or client 140 based, at least in part, on the number of clients requesting streamed data and/or compression levels/techniques used for the corresponding streams. That is, both bandwidth allocation compression and bandwidth may be dynamically modified and an appropriate compression technique selected based on current or anticipated conditions that may include the number of clients receiving streamed data.
The data streaming management agent may receive a request for streamed data from a client device, 210. The data streaming management agent may attempt to maximize the sound quality to the listeners while not exceeding the available network link bandwidth (e.g., a 10 Mbps internet uplink in a metro area network). In one embodiment, the server may factor in an overhead factor for the link (e.g., if overhead consumes ˜10% of the link then 9 Mbps is available to serve media).
The request, 210, may be for the audio stream at full quality. The server may provide the streamed data over the network at full quality limited only by the user's downlink speed. If, for example, the requesting client has an associated 1.5 Mbps downlink speed, the full quality request may utilizes ˜14% of the available bandwidth.
In response to the request, the data streaming management agent may set quality parameters for the received request by allocating bandwidth for the request based on the available bandwidth not being used by current connections to the media server, 220. A compression rate may also be selected, 230.
Streaming of data may continue utilizing the parameters discussed above until a new request is received, 235. When a new request is received, 235, the data streaming management agent may allocate bandwidth to all server connections. That is, the streaming data management agent may dynamically readjust the current connections, 240 to allocate server bandwidth to the connected servers including the most recent request. The data streaming management agent may further set compression rates for the current connections based, at least in part, on the bandwidth allocated to the various connections, 250. Also, no symmetry in bandwidth or compression is required amongst the streams to the different clients. Each client may receive a different level of compressed stream depending on a variety of factors including, for example, subscription level, client side bandwidth, link provider quality of service deprioritization, or client processing capability. Other factors may also be used.
For example, nine additional client devices join the audio stream for the beginning of a specific program. Now, the demand for uncompressed audio rises to 12 Mbps, which is greater than the available 9 Mbps. In response to this increased bandwidth demand, the server may compress the audio stream faster than real-time to any format known in the art (e.g., AAC, MP3, OGG, WMA) that has variable bit rate encoding.
For present example, we assume use of MP3 encoding, which is easily recompressed much faster than real-time on most current processors; however other encoding techniques may also be used. The ten client devices may be served audio streams that are compressed to ˜900 kbps—nearly full quality. In one embodiment, each stream may be encoded based on the needs of each particular client. In alternate embodiments, all clients may receive comparable streams.
As discussed above, each connection may have a unique combination of bandwidth and compression based on parameters corresponding to the connection. As another example, two or more classes of bandwidth and compression combinations may be designated and assigned to connections based on current conditions. Note that the bandwidth and compression utilized may be reevaluated and changes may be made dynamically. In one embodiment, bandwidth and compression are reevaluated for each connection each time a new connection is requested. Other triggering conditions may also be utilized, for example, length of connection, time of day, anticipated loads, and/or any further relevant conditions.
The process described above may continue and be dynamically adjusted as requests are received. For example, if 90 additional client devices request the audio stream from this server for a total of 100 users the per-user bandwidth is only 90 kbps—mediocre MP3 quality. Because the objective is to maximize audio quality for as many clients as possible, the server may change compression ratio(s) such that the uncompressed audio is compressed into a 90 kbps MP3 in an attempt to maximize utilization of the network uplink. This process can continue until some threshold is reached where the quality of the media is unacceptable—say 32 kbps for MP3 formatted files. At this point, new connections may be denied until additional servers and/or additional bandwidth can be provided to serve all requests.
Agent 300 may include reception unit 310 that may receive and/or process data stream requests from client devices requesting data to be streamed from a host media server, such as media server 130. Bandwidth allocation agent 320 may allocate bandwidth for the received requests and for current requests that need to be re-allocated bandwidth. Compression Rate unit 330 may set compression rates for the received request and may re-set compression rates for current requests that have been re-allocated bandwidth.
Device 400 further may include random access memory (RAM) or other dynamic storage device 430, coupled to bus 405 and may store information and instructions that may be executed by processor 460. Memory 470 may be used to store temporary variables or other intermediate information during execution of instructions by processor 460. Memory 470 may include any type of memory known in the art, for example, dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, etc.
In one embodiment, memory 470 may include any type of computer-readable storage medium that provides content (e.g., computer executable instructions) in a form readable by an electronic device (e.g., a computer, a personal digital assistant, a cellular telephone). For example, a machine-accessible medium includes read only memory (ROM); random access memory (RAM); magnetic disk storage media; optical storage media; flash memory devices; etc.
Memory 470 may further include data streaming management unit 471. The process of data streaming management unit 471 may be implemented as instructions stored in memory 470 that are executed by processor 460. Alternatively, data streaming management unit 471 may be coupled to the bus, (not shown), as an independent circuitry that may interact with processor 460. Each unit of data streaming management unit 471 may be implemented as hardware, software, firmware, or a combination of these.
Memory 470 may also include variable rate codec unit 472. Variable rate codec unit 472 may set and re-set compression rates for media files. The process of variable rate codec unit 472 may be implemented as instructions stored in memory 470 that are executed by processor 460. Alternatively, variable rate codec unit 472 may be coupled to the bus, (not shown), as an independent circuitry that may interact with processor 460. Each unit of variable rate codec unit 472 may be implemented as hardware, software, firmware, or a combination of these.
Device 400 may also include read only memory (ROM) 440 and/or other static storage device 430 coupled to bus 405 to store information and instructions. Data storage device 430 may be a magnetic disk or optical disk and the corresponding drives may be coupled to device 400.
Device 400 may further include network interface(s) 420 to provide access to a network. Network interface(s) may include, for example, a wireless network interface having one or more omnidirectional antennae 485. Network interface(s) 420 may also include, for example, a wired network interface to communicate with remote devices via network cable 487, which may be, for example, an Ethernet cable, a coaxial cable, a fiber optic cable, a serial cable, or a parallel cable. Device 400 may include additional and/or different components.
Reference in the specification to “one embodiment” or “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.
While the invention has been described in terms of several embodiments, those skilled in the art will recognize that the invention is not limited to the embodiments described, but can be practiced with modification and alteration within the spirit and scope of the appended claims. The description is thus to be regarded as illustrative instead of limiting.