Can I write crossbar component to handle pure websocket protocol & WAMP ?

55 views
Skip to first unread message

Priyank Kumar

unread,
Jul 20, 2016, 3:28:44 AM7/20/16
to Crossbar
Hi,

Since Autobahn C is still in development, can I use crossbar server to handle pure websocket call from a C function (client) and then integrate it to complete WAMP message?

Simple ask is
a) Write a internal component or container which loads when crossbar starts can can handle pure websocket protocol
b) Should serve websocket protocol from a C websocket client made on libwebsocket (Its light weight C )
c) I should be able to do RPC on C client and receive the output (just like wamp)
d) Then we should be able to make a WAMP component that interface to this internally running websocket server 

This may sound complex, but I dont see any simple way now to integrate some C functions to WAMP. Any example would be helpful

Priyank

Tobias Oberstein

unread,
Jul 20, 2016, 8:18:42 AM7/20/16
to cross...@googlegroups.com

Just quickly:

You can use AutobahnCpp .. and use that to wrap your C stuff. C and C++ code can be mixed (in general).

No, Crossbar.io does not support talking raw WebSocket. Doesn't make sense ..

Sent from Mobile (Google Nexus 5)


--
You received this message because you are subscribed to the Google Groups "Crossbar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/2028391a-4aa7-4014-927d-f7914c649a4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Priyank Kumar

unread,
Jul 20, 2016, 9:26:44 PM7/20/16
to Crossbar
Thanks Tobias for recommendation. 
As much as I want to use AutobahnCpp, I face lot of compilation and dependency issue. The documentation steps doesnt pan out the same in Ubuntu/CentOS system and face with different errors.
Sometime either boost related error other dependencies. Is there a recently tested steps that we can refer and just run the test example, I can build then on top of that.

Thanks
Priyank

<Crossbar is awesome> 

Tobias Oberstein

unread,
Jul 21, 2016, 6:51:03 AM7/21/16
to cross...@googlegroups.com
Am 21.07.2016 um 03:26 schrieb Priyank Kumar:
> Thanks Tobias for recommendation.
> As much as I want to use AutobahnCpp, I face lot of compilation and
> dependency issue. The documentation steps doesnt pan out the same in

Yeah, you need some C++ experience and patience to make it fly - modern
C++/Boost is a monster;)

> Ubuntu/CentOS system and face with different errors.
> Sometime either boost related error other dependencies. Is there a recently
> tested steps that we can refer and just run the test example, I can build
> then on top of that.

I recommend our Docker images for AutobahnCpp, which contain everything
prebuilt:

https://hub.docker.com/r/crossbario/autobahn-cpp/tags/
https://github.com/crossbario/crossbar-docker/tree/master/autobahn-cpp

I have tested this just days ago. Works ..

Cheers,
/Tobias

>
> Thanks
> Priyank
>
> *<Crossbar is awesome> *
>
> On Wednesday, July 20, 2016 at 5:18:42 AM UTC-7, Tobias Oberstein wrote:
>>
>> Just quickly:
>>
>> You can use AutobahnCpp .. and use that to wrap your C stuff. C and C++
>> code can be mixed (in general).
>>
>> No, Crossbar.io does not support talking raw WebSocket. Doesn't make sense
>> ..
>>
>> Sent from Mobile (Google Nexus 5)
>>
>> Am 20.07.2016 09:28 schrieb "Priyank Kumar" <priyan...@gmail.com
>> <javascript:>>:
>>
>>> Hi,
>>>
>>> Since Autobahn C is still in development, can I use crossbar server to
>>> handle pure websocket call from a C function (client) and then integrate it
>>> to complete WAMP message?
>>>
>>> Simple ask is
>>> a) Write a internal component or container which loads when crossbar
>>> starts can can handle pure websocket protocol
>>> b) Should serve websocket protocol from a C websocket client made on
>>> libwebsocket (Its light weight C )
>>> c) I should be able to do RPC on C client and receive the output (just
>>> like wamp)
>>> d) Then we should be able to make a WAMP component that interface to this
>>> internally running websocket server
>>>
>>> This may sound complex, but I dont see any simple way now to integrate
>>> some C functions to WAMP. Any example would be helpful
>>>
>>> Priyank
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Crossbar" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to crossbario+...@googlegroups.com <javascript:>.
>>> To post to this group, send email to cross...@googlegroups.com
>>> <javascript:>.
>>> <https://groups.google.com/d/msgid/crossbario/2028391a-4aa7-4014-927d-f7914c649a4b%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .

Priyank Kumar

unread,
Jul 25, 2016, 2:58:40 AM7/25/16
to Crossbar
Thanks Tobias,

I was able to compile all the example successfully and is working fine with Crossbar 15.0. I have done using codelite IDE and put down the steps to configure it and compile it. 

Now I have an issue, might be just crossbar configuration and administration. I want to publish an event on Python and want to subscribe on C++. I am using the standard codes of autobhan python pubsub publish.py only changed the realm to realm1. Now how to configure it on crossbar json so that it can allow to receive it to C++. I am using the .config file from the autobahncpp example default.

Priyank

Priyank Kumar

unread,
Jul 25, 2016, 2:59:48 AM7/25/16
to Crossbar
WampRawSocketProtocol: connection made
2016-07-24T23:50:02-0700 [Router      29679 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketProtocol: opening handshake received - 47455420
2016-07-24T23:50:02-0700 [Router      29679 crossbar.router.protocol.WampRawSocketServerProtocol] WampRawSocketProtocol: invalid magic byte (octet 1) in opening handshake: was 0x47, but expected 0x7f
2016-07-24T23:50:02-0700 [Router      29679 log_legacy] Unhandled Error
Reply all
Reply to author
Forward
0 new messages