Need help getting startet with Crossbar and Thruway

189 views
Skip to first unread message

Ulrik Vindberg

unread,
Mar 28, 2016, 6:58:12 AM3/28/16
to Crossbar
I need someone to point me in the right direction.

I am developing an web/application in AngularJS with a PHP backend. I am developing on WAMP-server. It will be a rather large application and one of its features will be a one-to-one chat system (not unlike Facebook's messenger) and I just discovered how websockets might be absolutely fantastic for this kind of feature (among others). But I'm a little stumped trying to get started.

As I understand, the WAMP2-specification with PubSub and RPC is well suited for my needs. I expect what I need is Angular-WAMP (which is an AngularJS-wrapper for Autobahn) for the front-end, Thruway for the  back-end and then some sort of server/router to wire it all up? I hear Crossbar.io is just what I need, but I have absolutely no idea where to start.

I've looked at Crossbar.io's own PHP tutorial (here) but somehow I'm having trouble "translating" this to Windows. Also it looks like Crossbar is sort of running its own webserver bundled with the rest of it. How does that play with the fact that I already have a webserver (developing on WAMP-server)?

As I said - I think I need someone to point me in the right direction to start because it all looks a little... daunting :-)

Thanks in advance

Alexander Gödde

unread,
Mar 31, 2016, 5:44:35 AM3/31/16
to Crossbar
Hi Ulrik!

Getting started with WAMP can indeed be a little confusing. 

A few pointers and explanations:

- Crossbar.io is one WAMP (v2) router. Since I'm working on the project, this is naturally the one that I recommend, but there are alternatives (see http://wamp-proto.org/implementations).
- The integrated Web server in Crossbar.io is a convenience feature. It's there to reduce the number of wheels (by one) for a lot of scenarios (primarily HTML5 SPAs). You are free to use this or any other Web server. 
- A good place to start is with one of the templates (e.g. the PHP one). This gives you a working minimal application which you can then modify to suit your needs.

Hope this helps a bit (and maybe somebody with experience in Angular-WAMP and Thruway can chime in with more tips).

Regards,

Alex

Ulrik Vindberg

unread,
Mar 31, 2016, 1:42:16 PM3/31/16
to cross...@googlegroups.com
Well I decided to read a little of the crossbar.io documentation (absolutely all of it) and that actually helped a lot!

I'll give the php-example a go and hope that gives me something to work with. Thanks a lot :-)

--
You received this message because you are subscribed to a topic in the Google Groups "Crossbar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/kXIixLLcnxM/unsubscribe.
To unsubscribe from this group and all its topics, 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/06dabc81-65b4-4940-8a41-f6c2186beafa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


Med venlig hilsen,

Ulrik Thorslund Vindberg

Alexander Gödde

unread,
Apr 1, 2016, 6:12:45 AM4/1/16
to Crossbar
Hi Ulrik!

Glad you found the documentation useful. 

Just if you have the time: What would be the top (one, two, three) things we could do to make the documentation more accessible for a first-time reader?

Regards,

Alex



Am Donnerstag, 31. März 2016 19:42:16 UTC+2 schrieb Ulrik Vindberg:
Well I decided to read a little of the crossbar.io documentation (absolutely all of it) and that actually helped a lot!

I'll give the php-example a go and hope that gives me something to work with. Thanks a lot :-)
2016-03-31 11:44 GMT+02:00 'Alexander Gödde' via Crossbar <cross...@googlegroups.com>:
Hi Ulrik!

Getting started with WAMP can indeed be a little confusing. 

A few pointers and explanations:

- Crossbar.io is one WAMP (v2) router. Since I'm working on the project, this is naturally the one that I recommend, but there are alternatives (see http://wamp-proto.org/implementations).
- The integrated Web server in Crossbar.io is a convenience feature. It's there to reduce the number of wheels (by one) for a lot of scenarios (primarily HTML5 SPAs). You are free to use this or any other Web server. 
- A good place to start is with one of the templates (e.g. the PHP one). This gives you a working minimal application which you can then modify to suit your needs.

Hope this helps a bit (and maybe somebody with experience in Angular-WAMP and Thruway can chime in with more tips).

Regards,

Alex

Am Montag, 28. März 2016 12:58:12 UTC+2 schrieb Ulrik Vindberg:
I need someone to point me in the right direction.

I am developing an web/application in AngularJS with a PHP backend. I am developing on WAMP-server. It will be a rather large application and one of its features will be a one-to-one chat system (not unlike Facebook's messenger) and I just discovered how websockets might be absolutely fantastic for this kind of feature (among others). But I'm a little stumped trying to get started.

As I understand, the WAMP2-specification with PubSub and RPC is well suited for my needs. I expect what I need is Angular-WAMP (which is an AngularJS-wrapper for Autobahn) for the front-end, Thruway for the  back-end and then some sort of server/router to wire it all up? I hear Crossbar.io is just what I need, but I have absolutely no idea where to start.

I've looked at Crossbar.io's own PHP tutorial (here) but somehow I'm having trouble "translating" this to Windows. Also it looks like Crossbar is sort of running its own webserver bundled with the rest of it. How does that play with the fact that I already have a webserver (developing on WAMP-server)?

As I said - I think I need someone to point me in the right direction to start because it all looks a little... daunting :-)

Thanks in advance

--
You received this message because you are subscribed to a topic in the Google Groups "Crossbar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/kXIixLLcnxM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to crossbario+unsubscribe@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/06dabc81-65b4-4940-8a41-f6c2186beafa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ulrik Vindberg

unread,
Apr 23, 2016, 5:23:32 AM4/23/16
to cross...@googlegroups.com
I'd love to help - sorry for the long wait.

I had 2 issues that took some headache resolving (one is on-going).

Firstly I had troubles actually understanding the technology of websockets, specifically the router's role and how components fit into it all. The documentation on the Crossbar site is quite good - once you understand what principles behind it. If you don't, then it's just a massive wall of technical mumbo-jumbo that sort of makes sence, but then not really, and I was left with the need of some guidance as to where to get started. Hence the post I made. 

To resolve this, you should make an animated video (hire a good communications and graphics consultant to get it done properly) that visually shows exactly how the technology works, what a "router" is and why it's so important and a few key concepts like components, authentication (which I'm still struggling with). You should also make a couple of common use cases complete with code examples for at least the 5-10 most common languages used. I know you have som examples (https://demo.crossbar.io/) but only one or two of these are (imho) interesting to the average user. I don't think very many people learn the websocket technology to learn how to build a multiplayer color picker :-)

I know you also have the github repo with all the examples but to use these I have to set up so much. I'm developing in WAMP-server and to use the examples I would have to set up a whole new virtual host and I feel like that's just not necessary... Maybe it's just me :-)

The second problem is that I somehow get the feeling that you have a hundred pages in your documentation but only twenty of them are accessible on the site (http://crossbar.io/docs/). I don't know if I'm wrong but it seems that whenever there's something I can't figure out, I go google the problem and I end up on a page under your documentation that has most of the info I need but that I just didn't find when I browsed the site. I think you need to rethink the disposition of the documentation so that all the info can actually (and will actually) be found. Oh and a lot of the links in the documentation are dead. Most recently I've found this (https://github.com/crossbario/crossbarexamples/tree/master/authenticate/wampcradynamic/php). I don't remember from where but it is definately not the first time.

Both these problems play into where I am right now. In short I'm making a rather large project in AngularJS with a PHP backend. My project will allow companies to register employees and a small part of the project is a chat application that allow employees to chat to one anthoer but only within the same company. This means that whenever an employee logs on or off, the other employees of that company should be notified. I have plenty of ideas how to do this. I think the best is simply to listen to wamp.subscription.on_subscripe/on_unsubsribe and then filter the information but I have no idea how to get my database's employee_id from this information. How to associate what I expect is the session_id with my employee_id.

I'm been Googling around and the best answer I can find is something about setting up WAMP-CRA which I guess can associate something called an Authid with my employee_id but to the best of my knowledge there are no examples of how to actually do it, save for a little bit in Python (which I don't know). After three days of Googling and reading a veritable library of articles (including the entirety of the crossbar documentation (I think)) I'm still only abouy 60 % sure this is the way to go and I have no Idea where to look now. 

I hope my ranting gave a little insights into the troubles of the ws-newbie and maybe if you have the time, you could point me in the right direction regarding my problem specifically :-)

If I can do more to help please let me know (becuase crossbar looks to be quite an amazing technology... If I could understand it :-))


Kind regards,
Ulrik Vindberg

To unsubscribe from this group and all its topics, 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/06dabc81-65b4-4940-8a41-f6c2186beafa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--


Med venlig hilsen,

Ulrik Thorslund Vindberg

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

To post to this group, send email to cross...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alexander Gödde

unread,
Apr 29, 2016, 7:47:50 AM4/29/16
to Crossbar
Hi Ulrik,

sorry for the late reply, and thanks a lot for your remarks!

I understand that initially Crossbar.io, WAMP and the concepts around it can be daunting. I fully agree that we're missing some introduction for the newbie.

I'm working on a couple of introductory pages: one to just give a very high level intro to what the technology can be used for and one which gives an overview of basic WAMP concepts, the basic structure of Crossbar.io and the configuration.

There is also now an animation on the Crossbar.io home page. Would this have helped a bit?

Everything in the Crossbar.io documentation is linked from the TOC (http://crossbar.io/docs/TOC/) at least (which is what I use when looking something up), but internal linking is definitely something we should work on - as well as better structuring of the

Regarding the separation of chats: One way to do this would be to have one realm per customer/company, since routing is only within realms. 

Thanks again for your input!

Regards, 

Alex 

Ulrik Vindberg

unread,
Apr 29, 2016, 11:05:26 AM4/29/16
to cross...@googlegroups.com
Hi Alex,


I think it's a great idea with what you're working on. I'll be sure to keep an eye out for it.

If you'd like my (perhaps overly critical?) thoughts on stuff in the future, just let me know.

I did actually consider doing one realm per company but since the companies exist in my database that means the realms would have to be created dynamically when someone from that particular company logs on and I can't seem to find a way to do that. To the best of my knowledge, realms have to be configured in the config file, right?

Glad I could help you out :)

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

For more options, visit https://groups.google.com/d/optout.

Alexander Gödde

unread,
Apr 29, 2016, 1:12:56 PM4/29/16
to Crossbar
Hi Ulrik,

The config file is static. We are working on a service which will allow runtime reconfiguration of Crossbar.io nodes

If you come across more things that need fixing or improving about how we explain Crossbar.io during your use, then it would be great if you could post this here. 

Regards,

Alex

Gary Kuipers

unread,
Sep 7, 2018, 12:03:05 AM9/7/18
to Crossbar
Hi Alexander: I have to get a student programmer started on this. I don;t know if you are involved in this but the "Getting started with PHP" at Crossbar.io (https://crossbar.io/docs/Getting-started-with-PHP/) was reported to me to be completely non-functional from the install of php5 (?) to the crossbar init --template (it complains about template). So to do a better job or reaching new people, working examples would help... a lot. Is it possible I am looking at an obsolete site? If so, can you recommend someplace I can get someone started on PHP and Crossbar.io?

Regards
Gary
To unsubscribe from this group and all its topics, 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/06dabc81-65b4-4940-8a41-f6c2186beafa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexander Gödde

unread,
Sep 7, 2018, 6:07:07 AM9/7/18
to Crossbar
Hi Gary!

The documentation is, unfortunately, out of date. We are not a PHP shop, and as far as I remember this was a third party contribution and hasn't been updated in a longer time. We have started onboarding a new team member who will have work on the documentation as a core responsibility - so things should improve on this front soon.

Sorry for the inconvenience at this time!

Regards,

Alex

Gary Kuipers

unread,
Sep 7, 2018, 10:53:59 AM9/7/18
to Crossbar
Thanks for getting back to me. I will see if I can send you anything useful from out efforts
Reply all
Reply to author
Forward
0 new messages