Voodoo-The network transparency layer of DirectFB

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>". 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值