主权项 |
1. A non-transitory computer-readable medium having stored thereon computer-readable instructions that when executed by a computing device cause the computing device to:
instantiate a nozzle for a resource based on a media type associated with both the nozzle and the resource; start, by the instantiated nozzle, a subscriber thread and a rendering thread; receive, by the started subscriber thread, a block of streamed data from a publishing device, wherein the block includes a unique identifier of an event associated with the media type; store, by the started subscriber thread, the received block in a queue; receive, by the started subscriber thread, a request to drain the queue; read, by the started rendering thread, the received block from the queue; render, by the started rendering thread, the read, received block; store, by the started rendering thread, the rendered block in a pre-allocated block of memory based on the unique identifier, wherein a reference to the pre-allocated block of memory is stored in a tree map based on the unique identifier; receive, by the instantiated nozzle, a request for an update for the resource based on the unique identifier; select, by the instantiated nozzle, the stored, rendered block from the tree map using the unique identifier; read, by the instantiated nozzle, the selected block from the pre-allocated block of memory; and send the read block to a requesting event client system. |