[Sugar-devel] Bidirectional communication javascript -local server

2013-04-19 Thread Gonzalo Odiard
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/lis

Re: [Sugar-devel] Bidirectional communication javascript -local server

2013-04-20 Thread Daniel Narvaez
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://gi

Re: [Sugar-devel] Bidirectional communication javascript -local server

2013-04-20 Thread Daniel Narvaez
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/platfo

Re: [Sugar-devel] Bidirectional communication javascript -local server

2013-04-20 Thread Daniel Narvaez
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

Re: [Sugar-devel] Bidirectional communication javascript -local server

2013-04-25 Thread Daniel Narvaez
On 20 April 2013 15:36, Daniel Narvaez 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 pro