long polling example with curl seems incomplete, could you please help?

#1

I was just looking at
http://crossbar.io/docs/WAMP-Long-Poll-Service/

For some simple stand alone scripts I’d like to use long polling for simple applications,
that subsribe and wait for a callback. websocket, twisted (or asyncio) seem to be a little overkill and I’d like to keep the script tiny.
Further I’m still having a small issue with a small asyncio snippet (don’t know how to stop the loop), which I will address in a separate
question.

However apart from the fact, that I don’t understand the curl example completely I have the impression, that the example is not complete:

The example seems to try to explain following
1.) 1 POST request to open a connection
2.) 1 POST request to subscribe (this one is missing in the doc)
3.) 1 POST? request for long polling
4.) repeat three until no more listening is required
5.) 1 POST request to close the connection when finished

So my first question:
1.) what is the exact request for subscription?

2.) what is the exact rule of the debug_transport_id
2.a) is there any issue leaving a fixed debug_transport_id in a production environment
2.b) how would the ‘curl’ example look like if the transport_id would NOT be hard coded.

0 Likes

#2

Hey anybody who can help?

I’d just like to get an example of how to use simple requests to communicate with the long polling interface of crossbar.

···

On Thursday, May 7, 2015 at 2:40:21 PM UTC+2, Gelonida Gel wrote:

I was just looking at
http://crossbar.io/docs/WAMP-Long-Poll-Service/

For some simple stand alone scripts I’d like to use long polling for simple applications,
that subsribe and wait for a callback. websocket, twisted (or asyncio) seem to be a little overkill and I’d like to keep the script tiny.
Further I’m still having a small issue with a small asyncio snippet (don’t know how to stop the loop), which I will address in a separate
question.

However apart from the fact, that I don’t understand the curl example completely I have the impression, that the example is not complete:

The example seems to try to explain following
1.) 1 POST request to open a connection
2.) 1 POST request to subscribe (this one is missing in the doc)
3.) 1 POST? request for long polling
4.) repeat three until no more listening is required
5.) 1 POST request to close the connection when finished

So my first question:
1.) what is the exact request for subscription?

2.) what is the exact rule of the debug_transport_id
2.a) is there any issue leaving a fixed debug_transport_id in a production environment
2.b) how would the ‘curl’ example look like if the transport_id would NOT be hard coded.

0 Likes

#3

Hi Gelonida,

I have just retested everything with the Longpoll transport works as expected, and I have polished up / extended the docs:

http://crossbar.io/docs/WAMP-Long-Poll-Service/

Further, there is now not only an example using AutobahnJS (intended for end-users)

https://github.com/crossbario/crossbarexamples/tree/master/longpoll

but also a complete example using curl only (intented for developers of WAMP libraries)

https://github.com/crossbario/crossbarexamples/tree/master/longpoll_curl

Please let me know if above works for you.

Cheers,
/Tobias

···

Am Donnerstag, 21. Mai 2015 21:57:37 UTC+2 schrieb Gelonida Gel:

Hey anybody who can help?

I’d just like to get an example of how to use simple requests to communicate with the long polling interface of crossbar.

On Thursday, May 7, 2015 at 2:40:21 PM UTC+2, Gelonida Gel wrote:

I was just looking at
http://crossbar.io/docs/WAMP-Long-Poll-Service/

For some simple stand alone scripts I’d like to use long polling for simple applications,
that subsribe and wait for a callback. websocket, twisted (or asyncio) seem to be a little overkill and I’d like to keep the script tiny.
Further I’m still having a small issue with a small asyncio snippet (don’t know how to stop the loop), which I will address in a separate
question.

However apart from the fact, that I don’t understand the curl example completely I have the impression, that the example is not complete:

The example seems to try to explain following
1.) 1 POST request to open a connection
2.) 1 POST request to subscribe (this one is missing in the doc)
3.) 1 POST? request for long polling
4.) repeat three until no more listening is required
5.) 1 POST request to close the connection when finished

So my first question:
1.) what is the exact request for subscription?

2.) what is the exact rule of the debug_transport_id
2.a) is there any issue leaving a fixed debug_transport_id in a production environment
2.b) how would the ‘curl’ example look like if the transport_id would NOT be hard coded.

0 Likes