using autobahn websockets with existing message broker(tcp server based on pub -sub model)

82 views
Skip to first unread message

Suman Patro

unread,
Mar 26, 2016, 5:28:35 AM3/26/16
to Autobahn
Hello,
I would like to use Autobahn websockets for a real time monitoring application from the web perspective but with no Crossbar.io. The reason being is ; I have an existing message broker for which I plan to extend websockets support. I would like to  create websocket server within the existing broker(the tcp server) using Autobahn and would want to perform a similar publish subscribe functionalities as provided in the autobahn/example. But I would not want Crossbar.io messaging server.
My system specifications are :
Windows 8
MSVC 2012
Is this possible and how can this be done?
Regards,
Suman

Tobias Oberstein

unread,
Mar 26, 2016, 6:05:17 AM3/26/16
to autob...@googlegroups.com
1) Yes!
2) By writing code?

;)

Seriously, what kind of answer do you expect?

One way that would allow fellows to actually comment would be if:

a) describe your "existing message broker" in detail
b) describe your actual use case and _goals_ (from a solution point of view)

Cheers,
/Tobias

> Regards,
> Suman
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/dd21359b-461d-4912-87cb-9ff9a30aa8b4%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/dd21359b-461d-4912-87cb-9ff9a30aa8b4%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Suman Patro

unread,
Mar 26, 2016, 6:42:47 AM3/26/16
to Autobahn

Yes , definitely .
My existing message broker that I refer is a message oriented middleware(YAMI4) that is event driven and transfers data to clients(YAMI4 test clients). Now I would like to improvise YAMI4 to a web extent by providing websockets support to it. Therefore , I would like to create websocket server within YAMI4 using Autobahn and refer Autobahn test examples for publishing and subscribing between YAMI4 clients and webclients . For such a requirement do, I need Crossbar.io, if yes , why and if no, what should be the procedure to go about?
Even if I create websocket server within YAMI4, do I again need a webserver?
Regards,
Suman

Tobias Oberstein

unread,
Mar 26, 2016, 7:32:09 AM3/26/16
to autob...@googlegroups.com
Hi Suman,

Am 26.03.2016 um 11:42 schrieb Suman Patro:
>
> Yes , definitely .
> My existing message broker that I refer is a message oriented
> middleware(YAMI4) that is event driven and transfers data to
> clients(YAMI4 test clients). Now I would like to improvise YAMI4 to a
> web extent by providing websockets support to it. Therefore , I would
> like to create websocket server within YAMI4 using Autobahn and refer

In what language is YAMI4 written? Is it open source? If so, where is
the source code?

> Autobahn test examples for publishing and subscribing between YAMI4
> clients and webclients . For such a requirement do, I need Crossbar.io,
> if yes , why and if no, what should be the procedure to go about?
> Even if I create websocket server within YAMI4, do I again need a webserver?

Not necessarily. Non-browser clients won't need a Web server. For
browser clients, there needs to be a Web server _somewhere_ to serve the
HTML (and the JS that actually does the WS connection).

However, my general advice would be: first investigate if it makes sense
to extend the proprietory, closed-source messaging thing (YAMI4),
reinventing the wheel versus rather just using Crossbar.io.

Cheers,
/Tobias

> Regards,
> Suman
>
> On Saturday, March 26, 2016 at 2:58:35 PM UTC+5:30, Suman Patro wrote:
>
> Hello,
> I would like to use Autobahn websockets for a real time monitoring
> application from the web perspective but with no Crossbar.io. The
> reason being is ; I have an existing message broker for which I plan
> to extend websockets support. I would like to create websocket
> server within the existing broker(the tcp server) using Autobahn and
> would want to perform a similar publish subscribe functionalities as
> provided in the autobahn/example. But I would not want Crossbar.io
> messaging server.
> My system specifications are :
> Windows 8
> MSVC 2012
> Is this possible and how can this be done?
> Regards,
> Suman
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/db47b0c5-23c6-47b1-b286-2fd2b09548c6%40googlegroups.com
> <https://groups.google.com/d/msgid/autobahnws/db47b0c5-23c6-47b1-b286-2fd2b09548c6%40googlegroups.com?utm_medium=email&utm_source=footer>.

Suman Patro

unread,
Mar 26, 2016, 11:42:59 AM3/26/16
to autob...@googlegroups.com
Hello, Tobias
                       Yami4 is written in C and is open source. so won't be an issue. And Yes, I mean Browser clients. But why will there be requirement of external webserver if webscokets is incorporated  within the middleware itself. I have referred another middleware which says no external webserver needed '"http://www.hivemq.com/blog/mqtt-over-websockets-with-hivemq".
Regards,
Suman

--
You received this message because you are subscribed to a topic in the Google Groups "Autobahn" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/g5NVNTXQH7o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/56F67336.8060703%40gmail.com.

Suman Patro

unread,
Mar 26, 2016, 11:53:55 PM3/26/16
to autob...@googlegroups.com

Hello Tobias,
Based on my above post, is it possible to use Autobahn headers and publish -subscribe examples without crossbar.io server platform?  If yes,  then how?  If no,  then what else could be done?
Thanks and regards,
Suman

Alexander Gödde

unread,
Mar 31, 2016, 5:53:23 AM3/31/16
to Autobahn
Hi Suman!

A Web server is needed for HTML browser clients - for normal usage. You can, of course, load the HTML etc. from the local filesystem.

You ask: 
"Based on my above post, is it possible to use Autobahn headers and publish -subscribe examples without crossbar.io server platform?"

I do not fully understand the question. Do you mean:

1. Can Autobahn/WAMP be used without a router?
2. Can you use code from the Autobahn libraries?

If 1., then the answer is a clear No: WAMP is a routed protocol, so you need a router. 
If 2., then the answer is yes: the code is under MIT license, so use anything from it as you see fit. Similarly, the protocol is open, so you're free to take whatever seems useful to you from it (just don't call the result "WAMP").

Regards,

Alex

Suman Patro

unread,
Apr 2, 2016, 10:36:24 AM4/2/16
to autob...@googlegroups.com

Thank you, Alexander for your answer. I understood quite a lot of things.
My earlier question stated that :
If I use Autobahn cpp,  will I be able to create a websockets server within yami4(a message broker) to handle real time monitoring feature and use crossbar.io for only webserver support.  I would like to handle the bidirectional message handling by creating a websocket server on my own(using Autobahn library)and extend that to yami4?Please do answer.
Thanks and regards,
Suman

--
You received this message because you are subscribed to a topic in the Google Groups "Autobahn" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autobahnws/g5NVNTXQH7o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.

Tobias Oberstein

unread,
Apr 2, 2016, 11:03:36 AM4/2/16
to autob...@googlegroups.com
Am 02.04.2016 um 16:36 schrieb Suman Patro:
> Thank you, Alexander for your answer. I understood quite a lot of things.
> My earlier question stated that :
> If I use Autobahn cpp, will I be able to create a websockets server

If you don't use WAMP, you don't need AutobahnCpp, which does not expose
WebSocket (but can use it).

I recommend this instead: https://github.com/zaphoyd/websocketpp

Note: AutobahnCpp uses above library for running WAMP over WebSocket.

> within yami4(a message broker) to handle real time monitoring feature
> and use crossbar.io <http://crossbar.io> for only webserver support. I

You don't need Crossbar.io if you only need a Web server.

I recommend Nginx in that case.

> would like to handle the bidirectional message handling by creating a
> websocket server on my own(using Autobahn library)and extend that to
> yami4?Please do answer.

Yes, you can write plain WebSocket servers using AutobahnPython.

See the many examples:

https://github.com/crossbario/autobahn-python/tree/master/examples/twisted/websocket
https://github.com/crossbario/autobahn-python/tree/master/examples/asyncio/websocket

Cheers,
/Tobias

> Thanks and regards,
> Suman
>
> On Mar 31, 2016 3:23 PM, "'Alexander Gödde' via Autobahn"
> <autob...@googlegroups.com <mailto:autob...@googlegroups.com>> wrote:
>
> Hi Suman!
>
> A Web server is needed for HTML browser clients - for normal usage.
> You can, of course, load the HTML etc. from the local filesystem.
>
> You ask:
> "Based on my above post, is it possible to use Autobahn headers and
> publish -subscribe examples without crossbar.io
> <http://crossbar.io/> server platform?"
>
> I do not fully understand the question. Do you mean:
>
> 1. Can Autobahn/WAMP be used without a router?
> 2. Can you use code from the Autobahn libraries?
>
> If 1., then the answer is a clear No: WAMP is a routed protocol, so
> you need a router.
> If 2., then the answer is yes: the code is under MIT license, so use
> anything from it as you see fit. Similarly, the protocol is open, so
> you're free to take whatever seems useful to you from it (just don't
> call the result "WAMP").
>
> Regards,
>
> Alex
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "Autobahn" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/autobahnws/g5NVNTXQH7o/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> <https://groups.google.com/d/msgid/autobahnws/53d041c6-f0bb-4485-b068-556b77bd99b6%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/CAE4YwmcBxhJRwzeeQicNchBcgx0%2BbgityqF8%2BXTqvFzQ9FqN%2Bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/autobahnws/CAE4YwmcBxhJRwzeeQicNchBcgx0%2BbgityqF8%2BXTqvFzQ9FqN%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Suman Patro

unread,
Apr 2, 2016, 1:50:16 PM4/2/16
to autob...@googlegroups.com
OK, Tobias. I understand that Autobahn is used to create clients. I could use WAMP protocol similarly in a sense RabbitMQ uses AMQP to build its own server but that should help me in creating something on the server side because my goal is to achieve websocket on an existing server (similar to RabbitMQ). What is the possibility?Thank You for highlighting about Nginx webserver.
One more question that has popped up is:
Does Autobahn provide something to compare and contrast plain http model(polling, long polling, streaming) and the websocket model?
I will look at the python examples too. But my requirement is bit more towards C, C++. See if you could help.
Thanks and regards,
Suman

To unsubscribe from this group and all its topics, send an email to autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/56FFDF46.3090703%40gmail.com.

Tobias Oberstein

unread,
Apr 3, 2016, 3:39:10 AM4/3/16
to autob...@googlegroups.com
Hi Suman,

Am 02.04.2016 um 19:50 schrieb Suman Patro:
> OK, Tobias. I understand that Autobahn is used to create clients. I

The use cases for the different Autobahns is like this:

AutobahnPython: used to create WebSocket clients and servers, as well as
WAMP clients

AutobahnJS, AutobahnCpp: used to create WAMP clients

AutobahnAndroid: used to create WebSocket clients and WAMP clients


> could use WAMP protocol similarly in a sense RabbitMQ uses AMQP to build
> its own server but that should help me in creating something on the
> server side because my goal is to achieve websocket on an existing
> server (similar to RabbitMQ). What is the possibility?Thank You for

I don't understand what you want.

> highlighting about Nginx webserver.
> One more question that has popped up is:
> Does Autobahn provide something to compare and contrast plain http
> model(polling, long polling, streaming) and the websocket model?
> I will look at the python examples too. But my requirement is bit more
> towards C, C++. See if you could help.

Sure. As said, if you want to create a WebSocket client or server in
C++, I recommend websocketpp.

Cheers,
/Tobias

> Thanks and regards,
> Suman
>
> On Sat, Apr 2, 2016 at 8:33 PM, Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>> wrote:
>
> Am 02.04.2016 um 16:36 schrieb Suman Patro:
>
> Thank you, Alexander for your answer. I understood quite a lot
> of things.
> My earlier question stated that :
> If I use Autobahn cpp, will I be able to create a websockets server
>
>
> If you don't use WAMP, you don't need AutobahnCpp, which does not
> expose WebSocket (but can use it).
>
> I recommend this instead: https://github.com/zaphoyd/websocketpp
>
> Note: AutobahnCpp uses above library for running WAMP over WebSocket.
>
> within yami4(a message broker) to handle real time monitoring
> feature
> and use crossbar.io <http://crossbar.io> <http://crossbar.io>
> for only webserver support. I
>
>
> You don't need Crossbar.io if you only need a Web server.
>
> I recommend Nginx in that case.
>
> would like to handle the bidirectional message handling by
> creating a
> websocket server on my own(using Autobahn library)and extend that to
> yami4?Please do answer.
>
>
> Yes, you can write plain WebSocket servers using AutobahnPython.
>
> See the many examples:
>
> https://github.com/crossbario/autobahn-python/tree/master/examples/twisted/websocket
> https://github.com/crossbario/autobahn-python/tree/master/examples/asyncio/websocket
>
> Cheers,
> /Tobias
>
> Thanks and regards,
> Suman
>
> On Mar 31, 2016 3:23 PM, "'Alexander Gödde' via Autobahn"
> <autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>
> <mailto:autob...@googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>
> <mailto:autobahnws+...@googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to
> autob...@googlegroups.com <mailto:autob...@googlegroups.com>
> <mailto:autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/53d041c6-f0bb-4485-b068-556b77bd99b6%40googlegroups.com
>
> <https://groups.google.com/d/msgid/autobahnws/53d041c6-f0bb-4485-b068-556b77bd99b6%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from
> it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>
> <mailto:autobahnws+...@googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>
> <mailto:autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/CAE4YwmcBxhJRwzeeQicNchBcgx0%2BbgityqF8%2BXTqvFzQ9FqN%2Bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/autobahnws/CAE4YwmcBxhJRwzeeQicNchBcgx0%2BbgityqF8%2BXTqvFzQ9FqN%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "Autobahn" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/autobahnws/g5NVNTXQH7o/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> autobahnws+...@googlegroups.com
> <mailto:autobahnws%2Bunsu...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autobahnws+...@googlegroups.com
> <mailto:autobahnws+...@googlegroups.com>.
> To post to this group, send email to autob...@googlegroups.com
> <mailto:autob...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/autobahnws/CAE4YwmegGZ1A3%3D_bzWk9envEoyLNuquHS7wdOdhLkLfOT36SOg%40mail.gmail.com
> <https://groups.google.com/d/msgid/autobahnws/CAE4YwmegGZ1A3%3D_bzWk9envEoyLNuquHS7wdOdhLkLfOT36SOg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages