Autobahn part 1: installing on Opensuse

As every web developer should do, I'm exploring the new wonderful capabilities of modern browsers.
On of the most powerful is websocket technology:
WebSocket is a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection.
Nice, isn't it?
By the way I am learning Python and first examples are very boring, so I decided to try something really interesting: Autobahn.
From official site: Autobahn provides Open-Source client and server implementations of WebSocket and WAMP.
I thought this could be a good start point to improve knowledge of Python and websockets at the same time.
So I pointed to http://autobahn.ws/python/getstarted and followed the instructions, but on my OpenSuse 12.1 I couldn't get Autobahn installed.
In this first post you can find how to get it running.
The two suggested methods (from package and from source) have the same problem, so I'll use the package method, because there are less instructions to write and, you know, I'm lazy.
You should  use the following command:

easy_install autobahn

but this produces errors about missing headers during compilation.
With a little help from Google I found how to get rid of these errors.
You have to install Python's development package (and GCC, if is not already installed):

zypper in python-devel
zypper in gcc

Now you can go on to the first example, which is perfectly working.
If you copy and paste the code into your editor you just have to modify line 29 in myclient.html removing the whitespace in </script> tag.
I'm reading the tutorials and I'll be back with something useful soon (hope so).

Commenti

Post popolari in questo blog

Jolie on Azure Functions

Gateway Consorzio Triveneto per WP e-commerce

Jolie micro services on Kubernetes