Beginner Q: Autobahn for Web

#1

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.

0 Likes

#2

Hi!

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 start
Crossbar then serves a demo overview page at port 8080.
Hope this helps! If you have any more questions, feel free to ask!
Regards,

Alex



···

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.

0 Likes

#3

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
<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)/.

According to the screenshot, you seem to be trying out Autobahn on Windows.

Here is minimal instructions for Windows:

http://autobahn.ws/python/installation.html#windows-installation

I verified that this recipe works on a completely fresh Windows XP virtual machine.

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.

How about this

https://demo.crossbar.io/demo/chat/index.html

? Is that what you are after?

Complete code is here:

https://github.com/crossbario/crossbardemo/tree/master/crossbardemo/crossbardemo/web/demo/chat

This is using Crossbar.io as a backend (which is based on AutobahnPython):

http://crossbar.io/

If you want to use above approach, come again, and I can lead you through installation on Ubuntu - or you just try:

http://crossbar.io/docs/Installation-on-Linux/

···

Am 04.10.2014 12:49, schrieb YoloAlf:

--
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/c2894376-e20d-4b25-85fd-514d3c4211e0%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/c2894376-e20d-4b25-85fd-514d3c4211e0%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes