You are here: Home Members rea SLUG Talks PyGoWave

PyGoWave

by Robert Anderson last modified Apr 12, 2010 09:39 PM
The OpenSource GoogleWave solution created before Google released their Java Server code.

GoogleWave

Was covered in last months talk. It's not a completely easy thing to sum up exactly what it is, since it integrates a lot of independent internet services together in a unique collaborative way. You get a Mail, Chat, Forum, Wiki, Interactive web tool with a unified interface.

Google Wave is an interesting technology whos protocols are open, and Google has released some parts of their system as Open Source.

PyGoWave

Was developed very shortly after GoogleWaves kickoff during the Summer of 2009. The implementation was done in the Django web framework, complies with the released GoogleWave APIs, and appears to be a relatively good guess at what is behind some of the unknown portions of Googles Wave project.

The mandatory blog

Dependency Installs on Fedora 11

Using one of the online installation guides :

    yum install python-twisted Django python-lxml python-simplejson 
    easy_install orbited django-registration anyjson carrot

STOMP Install & Configure

Partly from the online setup guide :

    yum install rabbitmq-server mercurial mod_python
    hg clone http://hg.rabbitmq.com/rabbitmq-stomp
    cd rabbitmq-stomp
    make RABBIT_SERVER_INCLUDE_DIR=/usr/lib/erlang/lib/rabbitmq_server-1.7.2/include

above didn't work

From the rabbitmq.com site Plugin Developement :

    yum install mercurial
    hg clone http://hg.rabbitmq.com/rabbitmq-public-umbrella
    cd rabbitmq-public-umbrella/
    make co
    # ... time ...
    make
    # ... time ...
    # Install the STOMP plugin
    mkdir rabbitmq-server/plugins
    cd rabbitmq-server/plugins
    ln -s ../../rabbitmq-stomp
    cd ..
    scripts/rabbitmq-activate-plugins

Create the following config file in "/etc/rabbitmq/rabbitmq.conf" :

    NODENAME=rabbit
    NODE_IP_ADDRESS=0.0.0.0
    NODE_PORT=5672

    LOG_BASE=/var/log/rabbitmq
    MNESIA_BASE=/var/lib/rabbitmq/mnesia

    SERVER_START_ARGS='
      -rabbit
        stomp_listeners [{"0.0.0.0",61613}]
        extra_startup_steps [{"STOMP-listeners",rabbit_stomp,kickstart,[]}]'

As root (from "rabbitmq-public-umbrella" above) run :

    ./rabbitmq-server/scripts/rabbitmq-server

In another window as root you need to set the following :

    ./rabbitmq-server/scripts/rabbitmqctl change_password guest $RANDOM$RANDOM$RANDOM
    ./rabbitmq-server/scripts/rabbitmqctl add_user pygowave_client pygowave_client
    ./rabbitmq-server/scripts/rabbitmqctl add_user pygowave_server pygowave_server
    ./rabbitmq-server/scripts/rabbitmqctl set_permissions pygowave_client '^[^.]+\.[^.]+\.waveop$|^wavelet.direct$' '^[^.]+\.[^.]+\.(waveop|clientop)$|^wavelet.topic$' '^[^.]+\.[^.]+\.(clientop|waveop)$|^wavelet.direct$'
    ./rabbitmq-server/scripts/rabbitmqctl set_permissions pygowave_server '^[^.]+\.[^.]+\.waveop$|^wavelet_rpc_singlethread$|^wavelet\.(topic|direct)$' '^[^.]+\.[^.]+\.waveop$|^wavelet_rpc_singlethread$|^wavelet\.direct$' '^[^.]+\.[^.]+\.waveop$|^wavelet_rpc_singlethread$|^wavelet\.(topic|direct)$'

PyGoWave Configuration

Partly from the online setup guide :

    yum install git
    git clone git://github.com/p2k/pygowave.git pygowave
    cd pygowave
    cp settings-template-development.py settings.py
    vi settings.py
    # Change setttings as necessary...
    #   ADMINS
    #   TIME_ZONE = 'America/New_York'
    #   SECRET_KEY
    python manage.py syncdb
    # At question answer "yes" and next prompts
    ./launch-pygowave-rpc

Apache

Create "/etc/httpd/conf.d/pygowave.conf" ::

SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE settings PythonOption django.root /pygowave PythonDebug On PythonInterpreter pygowave_django PythonPath "['${pygowave}'] + sys.path"

Alias /pygowave/media /srv/http/pygowave_project/media SetHandler None Options Indexes FollowSymLinks Order allow,deny Allow from all

ProxyRequests Off ProxyPass /static http://localhost:9000/static ProxyPass /tcp http://localhost:9000/tcp

Turn off SELinux with "setenforce 0".

Other

Document Actions
Filed under: ,

Comments (0)