The recent developemnt of Voodoo enables DirectFB applications to run over a network connection without modifications.
The concept is quite simple and working great. Each interface has two new implementations:"Requestor" on client side and "Dispatcher' on server side. Between them is a very samll libvoodoo which manages network connections and provides fast and powerful message encoding and decoding.
Each Dispatcher instance gets an ID which is also managed by libvoodoo. The Requestor sends a request message for each method call, specifying the remote instance ID and the method that is to be called. Parameters are appended to that message before it gets send to the server. On the server side the Dispatcher interface is looked up in a hash table using the Instance ID. After fetching the parameters from the message without copying any data except for some rare cases, the Dispatcher calls the "real" implementation.
Some requests have a corresponding response and some don't, e.g. all drawing related methods return immediately after sending out the request. Methods that require a response block until the response is received. Each response contains at least the result(DFBResult). Further response data is appended to the response message and return to the application after being processed by the Requestor.
Not every Dispatcher is server side and not every Requestor is client side. IDirectFBEventBuffer and IDirectFBDataBuffer have a client side Dispatcher and a server side Requestor. The server has to send events to the client side by making a PostEvent request(without repsonse). It also has to fetch data via requests to the client side data buffer(with response), e.g. while it is dispatching a ReanderTo reqeust. The client will send its compressed data (PNG for example) over network to the server!
Another advantage is that existing applications can be used without changes.
The setup is quite simple: There's a new program called "dfbproxy" which just waits for incoming connections (currently port 2323). It doesn't even call DirectFBCreate() before clients request that.
Running applications via the proxy is done by passing "--dfb:remote=<host>".
Voodoo的最新发展使得DirectFB应用程序能够通过网络连接运行而无需修改。该技术通过客户端的Requestor和服务器端的Dispatcher实现,利用libvoodoo进行高效的网络通信和消息处理。现有应用程序可以无缝迁移。
2894

被折叠的 条评论
为什么被折叠?



