RE: [Raw Socket API] Basic Compatibility with Web Socket API

Thanks for your mail Alexandre!

The story behind the proposed socket API in W3C SysApps is that the current version, http://raw-sockets.sysapps.org/, is based on the "traditional well-proven Berkeley socket style" and I believe it will work well. However, based on comments from the WG I am currently in the process of rewriting the API to simply it and create a more "webish" API of a style similar to other SysApps APIs. So I am looking for example at Web Sockets and socket.io. I plan to submit the new proposal during the next week.

However, I am not clear on if you propose that support for TCP and UDP should be added as a part of the Web Sockets API? I am not sure on this. The Raw Socket API is a proposal for the secure W3C web system applications runtime, while Web Sockets is available in the normal browser context. So the security environments are different.

I suggest that we can look at this again when I have completed the new Raw Socket API proposal, which will have a style more similar to Web Sockets.

Best regards
  Claes



From: Alexandre Morgaut [mailto:Alexandre.Morgaut@4d.com]
Sent: den 25 mars 2013 20:45
To: public-sysapps@w3.org
Subject: [Raw Socket API] Basic Compatibility with Web Socket API


Hi,

[Short introduction]
My name is Alexandre Morgaut from 4D, working on the Wakanda SSJS platform. We joined the W3C this october 2012.
Wakanda tries to implement as much as possible standard JS APIs and then always first look at the W3C and WHATWG ones.

[Suggestion Background]
After implementing Web Workers on the server, we choose to deliver a compatible interface to communicate with external processes
and called it SystemWorker: http://doc.wakanda.org/System-Workers/SystemWorker-Constructor/SystemWorker.301-734959.en.html

(It might interest some participants of this group for a potential work on a future standard API              )

We currently support the node.js socket API but are still looking for a standard (or standard based) one sharable with client-side JS
Before I saw this proposal, we have had internal discussions at 4D for providing and proposing a Raw Socket API compatible with the Web Socket one, following the same idea we had for SystemWorkers.

Web Sockets methods and events like send(), close(), onmessage, onerror, or onclose being concept quite shareable with UDP and TCP Sockets, this would have the advantages:
- to enhance the Web developers learning curve,
- to potentially accelerate this way the API adoption,
- to allow communication based libraries/modules to easily work with either Raw or Web Sockets without heavy wrappers,
- and of course more globally to have better consistency between the W3C APIs

My feeling, if it doesn't look too crazy to you, would be that the Raw Socket interface should be one shared by the Web, the TCP, and the UDP socket interfaces
(it might require a little udpate in the Web Socket spec for a reverse reference but it could be done later)


Best Regards,
Alexandre
[cid:image001.png@01CE2A27.415D2E80]

Alexandre Morgaut

Wakanda Community Manager


Email :

Alexandre.Morgaut@4d.com<mailto:Alexandre.Morgaut@4d.com>

Web :

www.4D.com<http://www.4D.com>


4D SAS

60, rue d'Alsace

92110 Clichy - France


Standard :

+33 1 40 87 92 00

Received on Tuesday, 26 March 2013 12:48:56 UTC