Category Archives: Glou

Glou WoC Week 3 – Handle my Stanza

This report is released weekly within the scope of the Glou Winter of Code.

The starter for last week was XmlElem obtaining a list of children and a link to its parent. That also means get_string of XmlElem now delivers the complete XML string inclusive the children’s content. After that it was all about XML namespaces. First XmlElem and XmlAttr have been a bit reshaped to properly support namespaces. XmlNsDecl was introduced; it represents namespace declarations in XML elements. By looking through those declarations one can find a so-called namespace scope which maps element and attribute prefixes to their actual namespaces. All XML stringify functions now use those namespace scopes to properly resolve prefixes for elements and attributes. The good thing here is that the whole namespace handling and prefix resolving is done transparently. So one more thing libxoup users won’t have to care about.

After that groundwork was done it was time to touch the XMPP / stanza handling code again. The XMPP handler tree had to yield for a simpler and more convinient approach. Now one globally can register a StanzaHandler, which then, on initialization, sets up triggers for every XML element (children of XMPP stanzas) it wants to handle. Those triggers will fire whenever such a specified element occures in the stream. In most cases the handling of a stanza will result in some event that’ll spit out some object (e.g. a MessageReceivedEvent which will deliver a Message object). In consequence StanzaHandlers are now also able to provide a serialize method which takes a Stanza object and then converts it into bits and bytes ready to be sent over the network.

Next to the above mentioned stuff a few minor things were also accomplished. Some more utility methods made it into the code and some bugs were fixed. Also, on top of the new XMPP / stanza handling, the implementation of XMPP resource binding has been started. All in all I would say we are looking back at a productive week :) .

This week the focus is on testing (mostly the code that was implemented during the last week), on polishing, fixing bugs, completing the examples and adding more documentation. Also the release of libxoup 0.1 is planned to happen this week. After that, if there is time left, the integration of libxoup into the existing parts of libglou will be prepared.

That’s it everyone. See you again, as always, next week on monday. Have a nice week.
- Sven

Glou WoC Week 2 – XMPP Streams

This report is released weekly within the scope of the Glou Winter of Code.

Another week passed that brought libxoup one step nearer to its first release. First of all the XoupXmppConnection obtained its backend, XoupConnection. The next step was to implement XoupXmppServer, which listens for incoming XoupXmppConnections. That means a XoupXmppConnection can now receive its data from the network, and hasn’t to be fed by hand anymore. Then there was time to concentrate on the main task of the week, the handling of XMPP streams (which basically means handling the XMPP <stream> element). After the XoupXmlElem was a bit enhanced with stringify functionality, XoupXmppStreamHandler was added which is responsible for stream handling according to the XMPP standard. As result establishing XMPP streams works now.

Besides the stream handling, the test system was updated. Every testcase is now compiled to an own executable, which makes testing easier as it is more stable against segfaults and other such nasty things. Furthermore a roadmap had been worked out that outlines the goals and the timeline for the first milestone of Glou.

For this week, the main goal is to implement stanza handling, i.e. parsing XMPP stanza elements (message, presence, iq) and emitting events when a stanza is received.  The second task is to enhance the XoupXmppStreamHandler with some better namespace and error handling. Those are pretty much the last blockers for the libxoup release.

That’s it for the report of week 2. Read you next week :) .

- Sven

Winter of Code – Introducing Project Glou

Today I’d like to introduce a project I have been working on for quite some time now (about half a year it seems): Glou [1], a project centered around free and open games. The vision of Glou is to create an open gaming network. First of all that means a place where people can meet to play and enjoy games. Glou aims to be capable of all things one expects from such a network: list servers and open matches, give the ability to join and / or host matches, see what your friends are playing, player scores and statistics, player matching, community features (friendslists, chatting, etc.), and much, much more. Furthermore, due to its open and free nature, it will enable (open source) game developers to build communities around their games more easily. With the big amount of good quality open source games out there Glou and the open gaming network could help to finally create a wide community around open and free games.

Glou understands itself as an umbrella project, and consists of…

  • A set of open standard protocols that describe the communication of the various components in the open gaming network.
  • An open API for games, so they can easily implement those protocols.
  • An open reference implementation of a Game Community Server.
  • And finally a community centered around free and open gaming.

The whole network is decentralized and built upon XMPP. Detailed information about the architecture of Glou is available on our architecture page on the Glou homepage.

A Short History

The Glou Project came to life in discussions on mailinglists and IRC channels of several open source projects and communities, like Freedesktop-Games, freegamedev.net and GGZ. After a first draft of the open gaming network architecture had been worked out we contacted the most influential open source games out there, in the spirit that Glou should be a cooperation of the whole open source gaming community. Since then many developers of open source games joined the Glou mailinglist to watch the progress of the project and give valuable feedback. From this point on the team of Glou developers and supporters has been growing and drafting and coding went on steadily until today.

Currently we have reasonable drafts for the protocols. Libxoup, a leightweight XMPP library that’ll serve as base for libglou (the game API), is near its first release, while the other components are still in an early state of development.

Winter of Code

As one can imagine, the scope of this project is quite big, and we had to notice that we wouldn’t be able to bring it forth just in our spare time. So, after some thinking, I decided to completly concentrate on the project. Pulling some strings I managed to get about half a year of time, that I will now invest in working on Glou. Voila, the winter of code [2].

From now on I’ll post a weekly status report here every monday to keep interested people updated. And now, despite it is tuesday, let’s just jump right into it:

Week 1 – Review

As mentioned, the current focus of development is on libxoup. Since I didn’t work on libxoup for about two months, I used the first days of last week to get a feeling for the code again. There were also some patches which still waited to be applied. After that XoupEvent and XoupObject got a little cleanup and complete documentation. XoupIo was added (and fully documented) which is now responsible for IO activity and IO event handling. Finally XoupConnection and XoupServer (the nice socket wrappers) were completed.

This week the major steps towards the first release of libxoup will be taken, and if we are lucky we will see the release by the end of the week. Also a roadmap will be published describing the timeline for the first milestone of the Glou Project.

Concluding I’d just like to say that I’m looking forward to the time I’ll spend working on Glou. Who knows, maybe by the end of the winter we’ll see the first games supporting it?

Thank you for reading!
- Sven

PS: If you like the idea of Glou and are interested in our project, why don’t you subscribe to our mailinglist? Great! :)

[1] The name Glou stands for Game LOUnge
[2] Do you know the Google Summer of Code? ;)