If you want to do chat using Autobahn and Crossbar.io, then it’s easiest to take a look at the chat demo we have - https://demo.crossbar.io/demo/chat/index.html
You can find the source code for this at https://github.com/crossbario/crossbardemo/tree/master/crossbardemo/crossbardemo/web/demo/chat
The way this works is that you use Crossbar.io as you backend (i.e. on your Ubuntu server), and all the browser clients connect to this. Clients subscribe to channels (just 5 here for demo purposes, and only one at a time in the demo, but you can have multiple subscriptions), and publish messages to these channels. Crossbar.io then dispatches the messages to all subscribers.
Crossbar.io can also server the static web files for your chat application - which we use for the demos.
Crossbar.io runs on Ubuntu - installation instructions for Linux: http://crossbar.io/docs/Installation-on-Linux/
Then, in order to run the demo and start hacking things, all you need to do is
crossbar init --template demos --appdir demos
and Crossbar will create a directory from which you can run (all the) demos.
You go to the directory and do
Crossbar then serves a demo overview page at port 8080.
Hope this helps! If you have any more questions, feel free to ask!
Am Samstag, 4. Oktober 2014 12:49:05 UTC+2 schrieb YoloAlf:
I’m fairly new to the concept of Websockets but I’ve pretty much grasped the definition, I’d now like to use Autobahn to create a web chat for my friends and I, I’ve managed to create the web chat for my localhost using this tutorial: http://sidekick.windforwings.com/2013/03/minimal-websocket-broadcast-server-in.html but I’m not sure how to get it online for my friends to connect to it. I have a free web hosting plan and a linux (ubtunu) virtual private server and I’ve just downloaded autobahn (however whenever I click ‘setup.py’ it displays this command prompt: http://prntscr.com/4swxum).
If there’s a way I can recreate the same chat as illustrated in the tutorial above and host it on a webserver for others to have access to please let me know, I’d greatly appreciate it.