Posts tagged with jabber

June 10th Sugar collaboration testing session

Starting the session was a little chaotic, as this was the first time we've tried a group collaborative session, and there were no specific goals we had in mind. The idea was generally to see how collaboration worked in a mixed environment (0.82, 0.84, different distros, different network connections, etc)

The good news is, that for the most part, getting connected worked, and once in a collaborative session response times were quite good. This means that the underlying sharing mechanism works, it just doesn't respond very quickly. The bad news is that the server load is much worse than originally thought and expected.

From our initial experiences, it was clear that the sugar-presence framework had some huge problems in terms of visually representing who was connected, which activities were being shared, and who was sharing these activities. It was not clear where the major bottleneck was in terms of reaction and response, but suspicions lie at the ejabberd end of things. In future sessions we will have to restrict connections and individual details to the point that we can make proper measurements, and thereby find out what is going wrong, and at what point it is going wrong. Suspicions are that the jabber server in question (jabber.sugarlabs.org) didn't have gadget enabled, and was therefore broadcasting the list of all registered users continously, which would burden the server severely. The lag and server load also affected the visual clustering of users around specific activities

Though reaction times were very slow, the underlying sharing framework clearly works very well. Once users were connected, their connections were stable, and within specific activites, reaction times were fast and reliable. We were able to test a fair set of activities, some of which had better implementation of collaboration than others, and some of which didn't seem to have collaboration enabled at all.

We started off with the chat activity, which took a good 10 minutes before people started being able to connect to the initial shared session. Once connected, reaction times were pretty decent, and the frame showed all the connected users. There was a large variance between the shared buddies shown. Some users reported seeing 5 buddies, some 3, some 7, and some even saw buddies with a ??? as their handle. The screenshot below shows how it looked:

Speak was another interesting activity to share, as it allowed multiple people to join a session where the computer speaks out what's typed in the accent of the user's choosing. The choice of accent is used for the proper pronounciation in different languages normally, though there was much fun to be had speaking English words in the various accents. Below is a screen shot:

Reaction times were again very good once users had joined the activity. Buddies connected was highly variable from user to user again, and though clustering around activites did take for ever, it did eventually start to happen, as can be seen from the screenshot below:

Etoys was a surprisingly good collaborator. Once users were connected they were able to create various items, even animated and custom coded, and then send them through to the connected buddies. We just scratched the surface of this activity, and it was clear that some really interesting things are possible with collaborative etoys:

Other activities that worked quite well were Cartoon builder, connect, Maze, Colors, and Tam Tam. We were unable to get write or paint to collaborate, and are unsure as to why. Talking with the authors of these programs seems appropriate, though it has been verified that write, at least, does collaborate. Below is a screenshot of what it looked like when multiple activites were being shared:

Rate It! (Average 0, 0 votes)



Telepathy, Empathy and collaboration

The idea of collaboration as implemented by Sugar Labs in the XOs is something truly fascinating. The direction is definitely to incorporate desktop wide collaboration in all future operating systems. I read a recent article in Wired that actually spoke about the future direction of Microsoft windows being this type of unified integration in their OS. They have started on this, but it probably won't show for a good number of years. On linux we have it a lot of it now! and its improving all the time. The service responsible for this is called Telepathy, and is at the heart of not only Sugar, but Gnome and Kde now too. Because of this standardization of a xmpp communication protocol across the entire desktop, instead of having to build a new comms protocol every time for every application, it is making it very easy for application developers to add collaborative functionality to their apps.

This is done through tubes. Tubes are a way for the server to offer a socket to a messenger contact, the remote contact accepts the socket and they can begin to write/read data on it. the big advantage is that with tubes, even if the connections are NATed on both sides, the apps can still share data.

What follows is an experiment in setting up a collaborative environment under Gnome. A lot of the collaborative stuff is really quite alpha/beta still, so this is just an exercise in setting it up for research purposes.

First up we have the telepathy layer and common apps that run with it. We will be installing Empathy for chat, video, audio and sending files. This fairly newcomer is quickly becoming the de facto standard chat client due to its wide support for other protocols and deep integration of telepathy into itself and the desktop, as well as tube support. It will most likely replace pidgin as the standard chat client in Ubuntu starting with Jaunty. Here's a screenshot with a variety of plugins installed and a custom theme:

I have been running it for a good week now, and it seems very stable, albeit requires installation from the Telepathy PPA to give it the latest features.

Add the the telepathy intrepid ibex PPA and install empathy:

sudo echo "deb http://ppa.launchpad.net/telepathy/ubuntu intrepid main" | tee -a /etc/apt/sources.list /dev/null
sudo echo "deb-src http://ppa.launchpad.net/telepathy/ubuntu intrepid main" | tee -a /etc/apt/sources.list /dev/null
sudo apt-get update
sudo apt-get install empathy telepathy-idle

If you had pidgin before, empathy will automatically import all your accounts into it upon first start up. You can then remove it afterward as there is no point in having 2 apps that do the same thing. If you plan to use facebook messaging, you'll have to patch haze.manager and add a facebook-im profile. Also note I did this already having the facebook plugin installed for pidgin, so ymmv:

wget https://bugs.freedesktop.org/attachment.cgi?id=20810
mv attachment.cgi?id=20810 ~/.local/share/telepathy/managers/haze.manager
wget https://bugs.freedesktop.org/attachment.cgi?id=20811
mv attachment.cgi?id=20811 ~/.local/share/mission-control/profiles/facebookim-haze.profile

One thing that is currently sort of missing from empathy is file transfer, which is only possible over Salut. The good thing is, that making a Salut connection is incredibly simple, and requires no server as it works directly over avahi. This is the same protocol used by Ichat.

The really interesting stuff, though, happens when you set up an ejabberd server which allows for collaboration to happen across a variety of applications in a variety of ways. To set up ejabberd, take a look at a previous article I wrote, and follow the ejabberd parts:

http://www.nubae.com/sugar-on-ltsp-ubuntu-intrepid-ibex

Once ejabberd is setup, you can add accounts to be used on your local network via the web interface by browsing to: localhost:5280 and clicking on users to add them. You can then use those details to connect to a jabber server via empathy. Other plugins for empathy are being worked on and include things like sharing webpages to contacts and sharing contact details from calendars. The future looks bright, but there are already some applications that work well with telepathy and collaboration in various forms.

Inkscape is a vector based imaging application that allows for collaboration via its messageboard facility. It's easy to install:

sudo apt-get install inkscape

It is currently a way to send files to and from other jabber apps, as well as chatting, but it will certainly grow to incorporate other collaborative functions. Here's a screenshot of it in action:

The other big app to do collaboration is Abiword, and it allows multiple users to edit a document in real time, each writing their little bit and collaboratively changing areas. The collaboration for Abi Word is done either through the standard ejabberd manner, or via a direct tcp connection. This works not only across computers and networks, but across operating systems too! You can collaborate with windows users just as easily as with Linux users and apple users. Install it:

sudo apt-get install abiword

Here is a screenshot:

A well known app amongst developers, Gobby allows for users to create sessions and then join them, and work on documents together. It is highly useful for hackfests and gatherings, and is used by the Ubuntu devs when they are at such gatherings. It can show a list of documents, users, and then the ability to work on those. Right now, Gobby is avahi based, with plans to support xmpp/empathy in the future.

sudo apt-get install gobby

To get an idea of where this is all going, I looked at a couple of other apps, which are not quite finished yet, but certainly give food for thought. One was Jokosher, which intends to allow collaboration through audio, allowing instruments across the network, voice over ip interviews, and all of this streaming in real time.

The Rythmbox music program has many advanced features, one of which is showing the status in your im according to the music playing. It also allows for sharing of music across the network, with password protection if needed.

Finally there are various games like tictactube and gtetrinet which create tubes to share sessions between each other, and I imagine this trend will multiply across gnome games, allowing for collaborative gaming experiences.

Rate It! (Average 0, 0 votes)



windows xp XO vs Linux XO

Recently there's been a bit of speculation about how one kid using 2 xo laptops, one being windows xp based, and the other linux based, reacted when using the machines. Although the conclusion of the article was that the kid doesn't care which OS they are using, as long as its unique, novel, and fun, the experiment really missed the mark a bit. The article, found here, http://news.cnet.com/8301-13860_3-10074298-56.html?part=rss&subj=news&tag=2547-1_3-0-20 takes one user and shows the user experience on some very limited uses of the laptops. Reading it, one gets the feeling that the experiment was done without much planning or research.

As has already been pointed out by education specialists, without setting up a learning environment with a group of kids, using collaboration as it was intended, it is not an educational experience, just a computer user experience. Sugar was created specifically for collaboration, allowing users to share the educational computer experience amongst peers and a teacher. In this way they can work together on assignments, get feedback from each other and the teacher, and collaboratively create something unique and wonderful. Sugar is radically different and novel to the way computers have been used until now for education.

An experiment of this kind should have involved children using windows and linux xos to collaborate and create audio, video, documents, and journal/blog the experience. It is not hard to set up something like that, and would bring new methods of teaching one step closer to the general public.

Of course, most people involved in OLPC, Sugar and collaborative teaching already know all this, and its most likely preaching to the choir, but to be effective, this message needs to get across to everyone including parents, students and teachers. They need to realize that there are other methods of learning, methods that will break the rigid boundaries that currently focus usage of computers in the most rudimentary direction.

Computers and the collaborative experience can be so much more, some examples of which might be:

- using an astronomy program collaboratively in the field while actually looking at the skies
- experiments in recording and cataloging nature and really doing scientific field work like the scientists they might one day become.
- making music in groups with each person focusing on a particular part of the song, then remixing, tweaking and re-releasing, like real musicians.
- playing educational games in groups where team building becomes a natural element, just like in online/lan games.
- creating teaching materials that can be distributed and shared across groups, classes and schools, thereby facilitating an easily transferable repository of teaching content.
- online discussions about particular moments in history, sensitive laws, todays culture, and the politics of life, all which encourage interaction and sharing of ideas.
- the uses of sensors to measure the environment, be it measurements, temperature, ph levels, or atmospheric pressure, and recording these.

Not only are all these activities fun, but they are practical real time user experiences that allow children and teachers to trace their educational progress.

Rate It! (Average 0, 0 votes)



Sugar on LTSP Ubuntu Intrepid Ibex with ejabberd and collaboration

With the announcement that the Sugar packages were finally up to date in Ubuntu, it was time to try something I've been wanting to do for a while, run a sugar environment on Ubuntu LTSP terminals with collaboration. With the help of some sugar devs I managed to get it all working quite nicely:

Installing Sugar

The base sugar and activities all seem to work wonderfully, although at the time of writing some of the other sugar activties are not working yet. By the time Intrepid is released this will probably be fixed.

sudo apt-get install sugar sugar-activities

You can search for what other sugar activites you can install like this:

sudo apt-cache search sugar

Then change the default session to sugar like this:

sudo nano /home/$username/.xsession

(where $username is the user for whom you want sugar to be the default shell.)

And add the following to the .xsession file:

export SUGAR_LOGGER_LEVEL=debug
export GABBLE_DEBUG=all
export GABBLE_LOGFILE=/home/$user/.sugar/default/logs/telepathy-gabble.log
export PRESENCESERVICE_DEBUG=1
export LM_DEBUG=net
exec ck-launch-session dbus-launch --exit-with-session sugar-shell

A quick explanation of the file is in order. The export lines are actually for debugging, and aren't needed if you don't intend to look at the log files. Remember $user should be the user home folder. The ck-launch-session is for making sugar exit properly when exiting from the menu. The --exit-with-session is for making sure there are no lingering sessions on ctrl-alt-backspace, currently the only way to exit, as ck-launch-session doesn't seem to work.

Finally, make sure you have your server hostname in place of olpc.collabora.co.uk:

sudo sed -ie "s/olpc.collabora.co.uk/hostname/" /home/username/.sugar/default/config

There are now 2 ways to install ejabberd, as the ejabberd packages in debian are up to date so installing ejabberd from scratch only really helps for non debian distros.

Installing Ejabberd from the repositories

sudo apt-get install ejabberd
sudo dpkg-reconfigure ejabberd

You need to add the user (usually admin) and the fully qualified domain name where ejabberd will be running. You can find what this is by doing hostname -f.

Patch /etc/ejabberd.cfg by downloading the olpc based patch and applying it:

wget http://dev.laptop.org/~morgan/ejabberd/ejabberd.cfg.patch
sudo patch /etc/ejabberd/ejabberd.cfg  ejabberd.cfg.patch
sudo /etc/init.d/ejabberd restart

skip the installing ejabberd from source and continue where it says installing the SSL certificate

Installing Ejabberd from source

The first step involves downloading the source package like this:

mkdir ejabberd
cd ejabberd
wget http://www.process-one.net/downloads/ejabberd/2.0.0/ejabberd-2.0.0.tar.gz
tar xfz ejabberd-2.0.0.tar.gz

We then need to download the patches from olpc that allow ejabberd to perform proper collaboration, and install the patches:

wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/shared_roster_push2.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/shared_roster_recent.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/shared_roster_online.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/mod_ctlextra.diff
wget http://people.collabora.co.uk/~robot101/olpc-ejabberd/ejabberd.cfg
cd ejabberd-2.0.0/
patch -p1  ../shared_roster_push2.diff
patch -p1  ../shared_roster_recent.diff
patch -p1  ../shared_roster_online.diff
patch -p1  ../mod_ctlextra.diff
cd src
./configure
make
sudo make install

We also edit /etc/ejabberd/ejabberd.cfg and replace jabber.laptop.org with the actual server hostname and the user "jtest" with "admin" (although u can use a different user if you like):

cd ../..
sudo cp ejabberd.cfg /etc/ejabberd/
sudo sed -ie "s/{hosts, ["jabber.laptop.org"]}./{hosts, ["hostname"]}./" /etc/ejabberd/ejabberd.cfg
sudo sed -ie "s/{acl, admin, {user, "jtest","jabber.laptop.org"}}./{acl, admin, {user, "admin","hostname"}}./" /etc/ejabberd/ejabberd.cfg

Remember to change hostname for the actual server hostname.

Installing the SSL certificate

You must also install an SSL certificate, which is required for collaboration to work (this is an important step.)

openssl req -newkey rsa:1024 -keyout ejabberd.pem -nodes -x509 -days 3650 -out ejabberd.cer
echo "" >> ejabberd.pem
cat ejabberd.cer >> ejabberd.pem
sudo cp ejabberd.pem /etc/ejabberd/ejabberd.pem
sudo chown ejabberd:ejabberd /etc/ejabberd/ejabberd.pem
sudo chmod 400 /etc/ejabberd/ejabberd.pem

Finally we add the user@hostname to /etc/ejabberd/ejabberdctl.cfg remembering to change hostname for your real server hostname:

echo "ejabberd@hostname" | sudo tee -a /etc/ejabberdctl.cfg /dev/null

Then you can turn ejabberd on with

sudo ejabberdctl start

See if ejabberd is running properly:

sudo ejabberdctl status

which should produce the following output:

Node ejabberd@hostname is started. Status: started
ejabberd is running

Then add the admin user:

sudo ejabberdctl register admin hostname xx

This should now allow you to login to the web ejabberd control panel:

Go to http://yourserver:5280/admin/
Log in as your ejabberd's administrative user. Your username is a Jabber address e.g. "admin@yourserver".
Select Virtual Hosts, then your server hostname, then Shared Roster
Add a group called Online with the following settings:
o Name: Online
o Members: @online@
o Displayed Groups: Online

It is recommended you register a user via your favorite jabber program and as the sugar users log in, you'll be able to see them in the Online group.

If you run into problems you can check the logs in /var/log/ejabberd/ to see what could be wrong. And for Sugar logs, you can look at /home/$user/.sugar/default/logs/

Enjoy your terminal session sugar experience!

Rate It! (Average 0, 0 votes)