Re: [Sugar-devel] Bidirectional communication javascript -local server
On 20 April 2013 15:36, Daniel Narvaez dwnarv...@gmail.com wrote: Hi, I think it could work but out-of-process communication inside the same process is weird. I just realized that it's not actually the same process, because in WebKit2 (and any modern web browser) javascript is running in a separate process. So this could actually be pretty good, we should give it a try :) In an ideal world I think we would just provide minimal dbus bindings directly in the content process, but that's quite a bit of work, and it wouldn't allow us to reuse the presence code in the python toolkit. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Bidirectional communication javascript -local server
Hi, I think it could work but out-of-process communication inside the same process is weird. With that approach it would probably make more sense to communicate with telepathy and datastore directly, rather than going through the activity, perhaps using a websocket - dbus proxy like https://github.com/01org/cloudeebus (interesting that it's developed by https://01.org/) On old sugar we could have the activity run the proxy, while in new versions it could be session wide. On 19 April 2013 21:10, Gonzalo Odiard gonz...@laptop.org wrote: Daniel, Can we use websockets to bidirectional communication from javascript to a local server? http://tech.pro/tutorial/1167/introduction-to-websockets Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel -- Daniel Narvaez ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Bidirectional communication javascript -local server
As another data point, WebOS has a system/session bus (it uses to be based on dbus, now it's not anymore but the logic is similar anyway). To provide web apps access to system functionalities, they apparently pacthed WebKit1 https://github.com/isis-project/WebKit/blob/master/Source/WebCore/platform/webos/LunaServiceMgr.cpp ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] Bidirectional communication javascript -local server
The cloudeebus API seems pretty generic (from a very quick look) https://github.com/01org/cloudeebus/wiki/API The only method specific to the websocket implementation seems to be connect(). So, with webkit2, we could implement it all client side and avoid the proxy overhead. Implementation aside I tend to like the idea to have an intermediate, generic API to interact with DBus services. It should make the implementation of the public API (datastore, collaboration etc) easier and cleaner. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
[Sugar-devel] Bidirectional communication javascript -local server
Daniel, Can we use websockets to bidirectional communication from javascript to a local server? http://tech.pro/tutorial/1167/introduction-to-websockets Gonzalo ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel