'Is it possible to do a streaming RPC call using WAMP?

I would like to use the WAMP protocol for RPC and Pub/Sub using websockets. In particular, I am interested in using crossbar.io as a WAMP server.

I read through the spec for WAMP and it was not clear whether it's possible to stream data as part of an RPC call from the client. There seems to be support for streaming a result from the server though.

edit: I want to clarify that I am referring to what one might call a progressive request as opposed to simply a server acting as a client.



Solution 1:[1]

Today (2015/05), WAMP has progressive results, but not progressive requests.

Development of WAMP was (well, still is) driven by use cases. We had a use case for progressive results, but not progressive requests. Also, it's not fully immediate how progressive requests should work.

Solution 2:[2]

Server and client are equals in WAMP. A client in the classical sense (e.g. a browser) can offer a procedure for the server in the classical sense to call, and this can use progressive call results.

Solution 3:[3]

You should be able to simulate this fairly easily by simply making multiple calls and using some kind of sequencing/chunking to split up the data across multiple calls. Alternatively you could also call the intended recipient to let them know that data is ready and then have the recipient initiate a call and then utilize progressive call results.

Solution 4:[4]

WAMP does not support this. I wrote the RPEP protocol for this and other reasons. RPEP has three modes a pub/sub mode (called "fireAndForget"), a normal RPC mode, and an even streaming mode. In the 3rd mode, you call a command and the command returns a stream that emits events. There is an implementation for javascript (web and node.js) here: https://github.com/Tixit/rpep.js

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 oberstet
Solution 2 gzost
Solution 3 Chappelle
Solution 4 B T