anuragraghavan / franca

Automatically exported from code.google.com/p/franca
0 stars 0 forks source link

Use WAMP protocol for Franca's HTML5/JS solution #82

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current implementation of the HTML5/JS/Websocket example is based on a 
simple proprietary protocol.

The WAMP protocol should be used instead. All Franca interface features should 
be supported: methods, broadcasts, attributes (attributes are currently 
missing).

Original issue reported on code.google.com by klaus.birken@gmail.com on 15 Jan 2014 at 9:54

GoogleCodeExporter commented 9 years ago
You can take a look at the WAMP specification here: http://wamp.ws/spec/
Here comes a draft about a possible mapping between the Franca concepts and the 
WAMP protocol elements:
 - Franca attributes: basically getting and setting the value of attributes can be done with CALL message. In case of a get, the result is returned in a CALLRESULT message. The handling of such calls is asynchronous. The callID in these messages should contain a value which can be mapped back to the attribute's name. Right now this is simply the attribute's name. On the other hand the procURI is in the form of http://localhost/set#attributeName and http://localhost/get#attributeName. Appropriate RPC stubs are created on the server side to handle the calls. After a set the already subscribed listeners should be notified. This will be carried out by sending EVENT messages to the listeners.
- Franca methods: RPC stubs will be generated and the method can be invoked 
with a CALL message from the client side. If the function returns something 
then that result will be sent back with a CALLRESULT message from the server 
side. 
- Franca broadcasts: this should be handled by the PUBLISH (from the client) 
and EVENT messages (from the server). 

The wamp_v1.js contains an implementation of this WAMP (version 1) 
specification. 

Original comment by szabt...@gmail.com on 16 Jan 2014 at 2:52

GoogleCodeExporter commented 9 years ago
Added architecture overview

Original comment by szabt...@gmail.com on 18 Jan 2014 at 10:05

Attachments:

GoogleCodeExporter commented 9 years ago
Scheduled this issue for 0.9.0.

Original comment by klaus.birken@gmail.com on 4 Feb 2014 at 4:06

GoogleCodeExporter commented 9 years ago
The websockets generator is available and integrated on develop and master.

The generator produces proxy/stub JS files per interface. It also produces 
blueprint files for client and server side, which is a documented API and can 
be used by copy&paste in order to quickly develop a running application.

A simple example is provided as part of Franca 
(examples/org.franca.examples.websockets). A more complex example is available 
on github: https://github.com/kbirken/franca-html5-showcase

Original comment by klaus.birken@gmail.com on 19 Feb 2014 at 10:32

GoogleCodeExporter commented 9 years ago

Original comment by klaus.birken@gmail.com on 25 Jan 2015 at 12:33