You are viewing thetofu

Soy Clone

Recent Entries

You are viewing the most recent 25 entries.

10th March 2009

9:47pm: moved
Ok. I will no longer be posting on livejournal. I have moved my blog to http://thetofu.com

Thanks lj!

14th January 2009

9:08am: switching blogs
I have been on livejournal for a while now and I feel it is time to part ways. Where do I go though? I would like to move it back to thetofu.com. I have been looking at what or where to switch and I have not found what I want. So I will look into adapting something or creating something that I can blog with. The following is a list of tentative requirements :

1. The html to be static files.
2. The admin and posting be done via XMPP and Pubsub
3. Not require a relational database. I would use something like couchdb if I have to.
4. Be able to post and manage via an XMPP client and the web.

That is it for now. I will document my progress as I continue to explore. Also, I will give more reasoning for my requirements. :)

19th November 2008

10:39am: Birthdays
XMPP or Jabber's 10th Anniversary is coming up. I like the idea of an open day, but anything would be cool. Just a simple gathering in a MUC room would be good, but physical parties would be better! I wish there were more users/advocates of XMPP in Charleston. There is more discussion on this, in the forum, at the following url:

http://jabberforum.org/forumdisplay.php?s=cdf04cdb8cd15917d23e473ab4b60c3d&f=180

Also, ejabberd's 6th birthday is here and badlop made a cool video, check it out.

It is nice to see great projects grow! I am also very excited about the future of XMPP!

16th October 2008

3:39pm: Palaver's present and future
Today, I made a new release of Palaver. It is an XMPP MUC component, created in python and twisted. The newest version is 0.6. This version has many bug fixes and speed improvements.

New features are memcache support for pgsql backend, and a memcache backend. The memcache backend is a more robust version of the in memory storage. All data is stored in memcached. This allows for palaver restarts without losing all of your data. It is not not as persistent as the other storage mechanisms but if you want a quick and fast MUC then it works, and is a bit better than the in memory dict storage.

I have also been adding MUC support to Wokkel and would like to use that protocol implementation for palaver.

The next release will be dependent on wokkel. So, palaver will then become just the storage mechanism code. Eventually, the wokkel code may make it to twisted words. I think this staging method will allow for quick use and testing. So, by the time it reaches twisted words it will have been used and tested well, beyond the required unit tests.

I am excited about the future of XMPP and Twisted words. The flexibility of twisted is gonna allow for a lot of cool components and servers!

8th October 2008

4:50pm: Twisted Wokkel Bot
A bot is not a new thing, it has been done in IRC for a long time. In IRC, a bot is a program that listens to messages in a channel and responds to them.

Bots are also being used in XMPP and particularly Multi-User Chat. You can see a weather bot in action at the following url :

http://speeqe.com/room/zzchschat@muc.appriss.com/

Using XMPP you can extend a bot to respond to messages that are not direct chats. XMPP is xml so you can send and respond to xml messages. This makes XMPP better than IRC.

At Chesspark bots are used extensively. There is one in particular used for a King of the Hill game. It combines MUC and PubSub XMPP extensions to achieve a fun game, where you knock your opponent off the hill by winning chess games.

There are many ways to create XMPP bots, but I have currently been working on MUC support for Wokkel. From Wokkel's web page : "Wokkel is collection of enhancements on top of the Twisted networking framework, written in Python. It mostly provides a testing ground for enhancements to the Jabber/XMPP protocol implementation as found in Twisted Words, that are meant to eventually move there. " Wokkel is nice for implementing and staging things before they can go into twisted.

Using the MUC client branch, I will show you how you can create a Jabber MUC bot. We have to use the branch because it is still under development and not in trunk yet. Hopefully it will be soon. Note that everything is not fully implemented but there is enough to make a bot.

This bot will be simple and just keep track of users coming in and out of a room. You will be able to see user activity using a last command.

First we check out the developement branch. Then we install it.


svn co https://svn.ik.nu/wokkel/branches/wokkel-muc-client-support-24 wokkel

python setup.py install



After this we will need to create the python class. Will will put it in the client.py file and call it MUCLastBot.

""" A simple last bot wokkel example """
from twisted.internet import defer
import datetime
from twisted.words.protocols.jabber import jid
from wokkel import muc

class MUCLastBot(muc.MUCClient):
   """ """



All this does it import the python modules we will be using and extend the muc.MUCClient class.

Next, we need to initialize and add 'last' support and methods to the bot.


    def __init__(self, server, room, nick):
        muc.MUCClient.__init__(self)
        self.server   = server
        self.room     = room
        self.nick     = nick
        self.room_jid = jid.internJID(self.room+'@'+self.server+'/'+self.nick)
        self.last     = {}
        self.activity = None

    def _getLast(self, nick):
        return self.last.get(nick.lower())
    
    def _setLast(self, user):
        user.last = datetime.datetime.now()
        self.last[user.nick.lower()] = user
        self.activity = user



This initializes the class with attributes we need and sets up methods to support user activity.


After this, we need to have the bot join a room. This is done with the 'initialized' method in MUCClient. This method is called after the XMPP client authenticates and its observers are initialized.


    def initialized(self):
        """The bot has connected to the xmpp server, now try to join the room.
        """
        self.join(self.server, self.room, self.nick).addCallback(self.initRoom)
        
    @defer.inlineCallbacks
    def initRoom(self, room):
        """Configure the room if we just created it.
        """

        if int(room.status) == muc.STATUS_CODE_CREATED:
            config_form = yield self.getConfigureForm(self.room_jid.userhost())
            
            # set config default
            config_result = yield self.configure(self.room_jid.userhost())
            


This code will make the bot join the room after start up and then will configure room if the status shows that the room was just created. It uses the 'join' method to join the room and when the bot joins the room 'initRoom' will be called.

You will notice the decorator 'inlineCallbacks', you can ignore this. This decorator allows the method to call deferred methods and use yield to get the call back result.

You can go to http://www.twistedmatrix.com to learn more. For our purposes we will just ignore it. :)

Next, we need to handle when someone joins and parts the room.


    def userJoinedRoom(self, room, user):
        """If a user joined a room, make sure they are in the last dict
        """
        self._setLast(user)

    def userLeftRoom(self, room, user):
        self._setLast(user)



All we do is mark their last activity.

We then need to handle commands and logging messages sent by users.


    def receivedGroupChat(self, room, user, body):
        # check if this message addresses the bot
        cmd       = None
        user_nick = None
        try:
            cmd, user_nick = body.split(" ")
        except ValueError:
            # value error means it was a one word body
            cmd = body
        cmd = cmd.replace("!", "")
        method = getattr(self, 'cmd_'+cmd, None)
        if method:
            method(room, user_nick)
        
        # log last message
        user.last_message = body
        self._setLast(user)




This method takes a groupchat message and processes it to see if there is a bot command. It also logs last message activity for the user.

So, the command we want to use is 'last', we need that method inorder to complete the bot.


   def cmd_last(self, room, user_nick):
        """
        """
        if user_nick is None:
            # show last person to do something
            self._sendLast(room, self.activity)
        else:
            u = self._getLast(user_nick)
            if u:
                self._sendLast(room, u)
            else:
                self.groupChat(self.room_jid, 'Sorry %s, That person is unknown to me.' % (user.nick,))

    def _sendLast(self, room, user):
        """ Grab last information from user and room and send it to the room.
        """
        last_message   = getattr(user,'last_message', '')
        last_stamp     = getattr(user,'last', '')
        
        if room.inRoster(user):
            message = """%s is in this room and said '%s' at %s.""" % (user.nick, last_message, last_stamp)
        else:
            message = """%s left this room at %s and last said '%s'.""" % (user.nick, last_stamp, last_message)

        self.groupChat(self.room_jid, message)


The last command checks the activity for the user given, or if no user is given it will then show the last active user. It will also tell you it does not know the user if it has never seen them in the room.

The '_sendLast' method sends that information back to the room as a groupchat.

The bot is now complete, we will need a conf file to start it up. To do this I will use a .tac file for twisted.


from twisted.application import service
from twisted.words.protocols.jabber import jid
from wokkel.client import XMPPClient

from client import MUCLastBot

application = service.Application("lastbot")

xmppclient = XMPPClient(jid.internJID("test@thetofu.com/lastbot"), "test")
xmppclient.logTraffic = True
mucbot = MUCLastBot('chat.speeqe.com','last', 'LastBot')
mucbot.setHandlerParent(xmppclient)
xmppclient.setServiceParent(application)



Simply use twistd to run the bot.


twisted -y muc.tac



That is it, have fun and look forward to more XMPP support in wokkel and twisted!

You can download muc.tac and client.py at the following url:

http://people.chesspark.com/~tofu/wokkel/lastbot/

2nd October 2008

2:08pm: Speeqe about it.
One thing I do everyday is group chat via XMPP. There are lots of ways to do this, via many xmpp clients. If I am on my laptop or computer then having a client works out well. I can chat to my hearts content.

Often, a problem that comes about, is if I am away, and I need to communicate via a chat room, what do I do? I could use a remote computer and a command line XMPP client or I can use Speeqe.

Speeqe is a web based chat creator, you can create and theme your own chat rooms! There are many ways to use Speeqe for various different things, but the solution to my problem, I find very useful, is that you can connect to other chat rooms on the federated XMPP network.

To do this you can use the url trick, for example:

Jabber Development Room

http://speeqe.com/room/jdev@conference.jabber.org/

Charleston Linux Users Group

http://speeqe.com/room/csclug@conference.butterfat.net/

You can just start chatting anonymously or login via a XMPP account.

This trick, and the other things you can do with Speeqe, are cool, but best of all it does not end there. Speeqe is open source!

You can use and add features to Speeqe and the possibilities become endless. :)

The neat thing is it already uses open source software. It uses Strophe, Punjab, Palaver, Apache, and Django.

It can be set up to use any XMPP server and any Multi-User chat implementation. It is very flexible.

More examples of setting up and using Speeqe are sure to come!

Look forward to the official release of Speeqe!

19th September 2008

2:38pm: Punjab, the BOSH of Choice.
It has been a long while since the last Punjab release. But I am happy to announce that Punjab is now at version 0.13. This release has many changes.

First, there was a massive code clean up and removal. XMLRPC, SOAP, and HTTP Polling are no longer supported and have been removed. Also, versions of Twisted older than 2.5 are no longer supported. Similar, versions of Twisted Words older than 0.5 are not supported.

Second, speed increases have been made to the handling of xml and requests. There have been code improvements and protocol support fixes. There are protocol and unit tests too.

Also, Version 1.0 is close and should be out very soon.

Finally, in order to answer 'Which BOSH server do you need?'. Look for examples and demos of strophe and other software and technology using Punjab! These examples will be on here and the Punjab home page.

8th September 2008

9:58pm: Baseball and Chess
In sports, or any competition, we always want to know who is the best. Also, we want to know who has the best chance to win the game. Some of us always want our favourite player or team to win. But knowing their chances may help with the expectations that may bring heartache or joy or a wager we may have with a friend.
There are many ways, statisticians and mathematicians have come up with, to determine outcomes and strengths of players or teams. One way, in Chess, is finding a players rating by a rating system. At Chesspark, we use a variation of the Glicko rating system. I have always wondered if this rating system would work well with team sports. So, being that I love baseball, I did some research (google search) on baseball and chess ratings. What follows, is a my first experiments in using glicko atings to determine game outcomes and finding the strength of a team.

First, I could not find any information on baseball and Glicko. I did find some on ELO and baseball. There is a site that does ELO ratings on soccer (football) teams as well. ELO and Glicko are rating systems used in Chess or other games involving two players. Team sports do not necessarily use these methods to determine the outcome of the next game. Baseball has a well known method called the Pythagorean expectation. It uses what the teams have done in previous games to determine the outcome. It uses runs scored and runs allowed. You can use this equation in other sports too. I would like to compare ratings versus the Pythagorean expectation and also investigate combining the two.I gathered data from http://www.retrosheet.org. Wrote a python script to parse the data, and compute the ratings. I will release code in upcoming blog posts. Using the script and data we can calculate the final ratings of teams at the end of the season. The results are interesting.

Glicko Rating results for the Major League Baseball 2007 Season:

====================== teams by rating ==========================
team                           rating  rd         total wins - losses 

New York Yankees               1580.0  28.465171  162   94   - 68 
Boston Red Sox                 1571.0  29.260524  162   96   - 66 
Cleveland Indians              1564.0  28.649712  162   96   - 66 
Los Angeles Angels of Anaheim  1562.0  28.888047  162   94   - 68 
Arizona Diamondbacks           1537.0  28.440955  162   90   - 72 
Colorado Rockies               1534.0  28.165939  163   90   - 73 
Detroit Tigers                 1533.0  28.574597  162   88   - 74 
Seattle Mariners               1532.0  28.210795  162   88   - 74 
Toronto Blue Jays              1529.0  28.210438  162   83   - 79 
Philadelphia Phillies          1529.0  28.447520  162   89   - 73 
San Diego Padres               1523.0  28.317698  163   89   - 74 
New York Mets                  1510.0  28.604631  162   88   - 74 
Los Angeles Dodgers            1505.0  28.615645  162   82   - 80 
Minnesota Twins                1495.0  28.312780  162   79   - 83 
Atlanta Braves                 1494.0  28.618743  162   84   - 78 
Chicago Cubs                   1494.0  28.402241  162   85   - 77 
Oakland Athletics              1488.0  28.395109  162   76   - 86 
Texas Rangers                  1487.0  28.586974  162   75   - 87 
Milwaukee Brewers              1474.0  28.445591  162   83   - 79 
St. Louis Cardinals            1464.0  28.453097  162   78   - 84 
Washington Nationals           1462.0  28.858994  162   73   - 89 
San Francisco Giants           1462.0  28.315478  162   71   - 91 
Chicago White Sox              1461.0  28.461948  162   72   - 90 
Kansas City Royals             1461.0  28.856424  162   69   - 93 
Baltimore Orioles              1460.0  28.501870  162   69   - 93 
Tampa Bay Rays                 1450.0  28.742325  162   66   - 96 
Houston Astros                 1448.0  28.453125  162   73   - 89 
Cincinnati Reds                1442.0  28.818955  162   72   - 90 
Florida Marlins                1438.0  28.412856  162   71   - 91 
Pittsburgh Pirates             1424.0  28.681253  162   68   - 94 


NOTE: This is a great example on how close in skill professional baseball teams are.


Now, lets take a game from the 2007 season and determine the outcome via glicko and the same percentage via the Pythagorean expectation. I will use Atlanta Braves games since they are my favourite team. Lets take the 42nd game Atlanta played. This game was versus the Boston Red Sox who was a high rated team all year.

NOTE: This determination is very simplistic and missing some steps, a more in-depth example may follow in other blog posts.

Boston had a record of 29 - 12 (Winning percentage 70.7%)
Atlanta had a record of 25 - 17 (WP 59.52%)

2007-05-19 ATL 1529.0 vs. BOS 1675.0

2007-05-19 ATL 52.562% vs. BOS 72.554%

By rating, Boston should win, they are the strongest. The chance for Atlanta to win is about 47.7%. The outcome of the game was Boston 13 and Atlanta 3. Boston crushed them. Before this, Atlanta split a series with Washington, a very weak team.

By winning percentage, we see that Boston's real percentage is lower than what their percentage should be and we see that Atlanta's real percentage is higher than the determined one. Using that we see that Boston is favoured to win unless luck comes into play.

Both methods show Boston being the favourite, but 10 runs seems too much. :)

Determining the actual chance that Boston will win is a bit more complicated than the above example, with both methods. It is easy to see that using each way shows that Boston is stronger and should win the game, and they did. You can also use other statistical methods to determine how many runs both teams could score and use that to help with determining the outcome. I want to find if I could use ratings to help or replace some of these.I believe ratings is a great indicator of how strong the team is right now (or at the moment) and is a simpler way when looking at strength of schedule and other factors in finding out who will win a series or finish first in the standings.

In posts to follow, I hope to start predicting the outcome of current games, and developing a system to make this easier for me and others. I plan on using XMPP, Pubsub and BOSH. I also want to investigate finding a pitcher or batter's rating using glicko. After that, who knows.


The baseball information used here was obtained free of charge from and is copyrighted by Retrosheet. Interested parties may contact Retrosheet at "www.retrosheet.org".

4th September 2008

8:02am: Twisted XMPP
It seems talk of an XMPP Server in twisted is picking up. I am looking forward to helping out! http://ralphm.jaiku.com/presence/43726932 http://twistedmatrix.com/pipermail/twisted-python/2008-September/018330.html

11th August 2008

11:36am: WuChess Video Contest
If you have not seen this yet, you really need to check it out. Or even give it a try. ;)

http://www.youtube.com/video_response_view_all?v=3YAIVQ_oh88

1st August 2008

12:13pm: Palmetto Open Source Software Conference
As some of you know I live in Charleston, SC. Likewise, you may know that South Carolina is not necessarily known as a technical state. The amount of software/engineering jobs are not the same as other states. Similar with technical students and people. That said, I went to the Palmetto Open Source Software Conference on Weds July 30th 2008. It was a one day conference at the University of South Carolina and I was pleasantly surprised.

The conference was well done, and apparently the concept and idea came about 3 months ago. So, with 3 months planning and a first year conference, it was very well done! The turn out was better than I imagined too. Being a developer/contributor of open source projects, I was in the minority, but there were plenty of people excited about open source and using it. All of the speakers were great and presented well. You can get a list at the website. http://posscon.org/ This post is not about the specifics of the conference but the themes that seemed to be throughout each of the presentations and informal discussions.

One theme in the conference seemed to be pragmatic approaches to solving problems, be it business problems or just software problems. People wanted to use and used open source because it solved their problem and solved it well.

Another theme was "openness", being open in the way you do business, working with businesses and the open source community, and "open", in giving your employees the ability to improve your business, and the way they do work, by encouraging them to be curious and contribute or use open source.

And last, how does South Carolina find these kinds of employees. Ones that can solve problems, have a curiosity and can do most anything you ask of them (jack of all trades). The last theme or topic that was discussed brought questions on how to help students and others in South Carolina to be curious and excited about technology, solving technical problems, and using open source, to enrich and encourage that.

These are all old topics and nothing new, but pragmatic and open technical solutions are definitely the way to go, and seeing companies and programmers start to think this way is very very encouraging for South Carolina! I just wish more of them knew what XMPP was. :)

Thanks to everyone involved and for starting this important topic of conversation in South Carolina!

I definitely recommend everyone in South Carolina and the surrounding areas to go back next year!

11th June 2008

4:37pm: Beards
Want to shave someone's beard for them? Well check out the following URL:

http://beard.blueion.com/

Thought this piece of flash was strange but funny.

2nd June 2008

8:57am: WuChess
http://www.wuchess.com has launched!

21st May 2008

9:26pm: BOSH Cloud
We all know that ejabberd is cool and erlang is extremely scalable. Facebook even decided to use erlang for their new chat system! Even with all of that, I want to write about an alternative. :) I am not gonna compare numbers and benchmarks. This post will lack data and statistics for all of that. I am just gonna describe a system thats implemented, in production, and works well. It is the story of the BOSH Cloud.

First, XMPP is a standard protocol for presence based applications, namely IM chat. It is growing in use, even as I type this blog entry. Web based chat can be done using XMPP with some help. The help comes from an extension to the XMPP standard called BOSH. BOSH solves the problem of implementing something that requires state, over a stateless protocol like HTTP. (Ejabberd has a BOSH implementation) Anyway, the question is, 'what is a BOSH Cloud?'

The answer is that it is a set of Amazon Ec2 instances used to provide a scalable BOSH connection manager. You have a HTTP load balancer up front and you can create as many BOSH instances based on your scaling needs on the back end.

To create one of these you will need the following:

Ability to create Amazon Elastic Compute Cloud (ec2) images and instances.
Punjab
Nginx


What we have here is a recipe to implement a BOSH connection manager and do simple round robin scaling. Ngnix provides the load balancing and Punjab provides the BOSH implementation. To scale, you run them on Amazon's elastic compute cloud.

To start, you will need an amazon web developers account and know a bit about ec2.

http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=84

This implementation starts with a basic debian image. Installed on this image is Python, Twisted, Nginx, and Punjab. There is plenty of good documentation on how to build an ec2 image on amazon's web site. Once we have the applications and their dependencies built we will need to configure them before we build a new image.

Lets start with what is up front, Nginx. This will be our simple round robin load balancer. The configuration will look something like the following : (values will vary based on your needs)
user www-data;
worker_processes  4;

error_log  /var/log/nginx-error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  4096;
}

http {
    include       /usr/local/nginx/conf/mime.types;
    default_type  application/octet-stream;

    access_log  /var/log/access.log;

    sendfile        on;
    
    proxy_read_timeout 300;
    
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;
    # ... some other stuff

    upstream punjab {
        ip_hash; # needed to make sure ips stay on the punjab server used by the connection
        server punjab0.yourdomain.com:5280;
        server punjab1.yourdomain.com:5280;
        server punjab2.yourdomain.com:5280;
        server punjab3.yourdomain.com:5280;
        # .... and so on
    }


    server {
        listen       80;
        server_name  localhost;

        # ... other config options 

        location /bosh {
               proxy_set_header Host $http_host;
               proxy_set_header X-Real-IP $remote_addr;
               proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
               proxy_pass http://punjab;
        }
    }


Nginx could also serve static files or your chat client. Nginx has a very small foot print and is fast. The main thing about this configuration example is the nginx load balancing. NOTE: you will NEED the ip_hash directive in order to have the same ip use one punjab. Otherwise it will be disconnected.

Next we configure punjab with the basic .tac file that comes with punjab.

# punjab tac file
from twisted.web import server, resource, static
from twisted.application import service, internet

from punjab.httpb  import Httpb, HttpbService

root = static.File("./html")


#b = resource.IResource(HttpbService(1, use_raw=True))
b = resource.IResource(HttpbService(1))
root.putChild('/bosh', b)


site  = server.Site(root)

application = service.Application("punjab")
internet.TCPServer(5280, site).setServiceParent(application)


You may also want to use dynamic DNS and set your punjab domains when instances start up. The following script will do that.


#!/bin/bash
USER_DATA=`/usr/bin/curl -s http://169.254.169.254/latest/user-data`
# hostname is the first available value
HOSTNAME=`echo $USER_DATA | cut -f 1 -d , | cut -f 2 -d =`
hostname $HOSTNAME

MYNAME=`/usr/bin/curl -s http://169.254.169.254/latest/meta-data/public-hostname`
cat<<EOF | /usr/bin/nsupdate -y ddnskey:yourddnskey
server ns.yourdomain.com
zone yourdomain.com
update delete $HOSTNAME.yourdomain.com CNAME
update add $HOSTNAME.yourdomain.com 60 CNAME $MYNAME
send
EOF




Now that those are configured, you can build your image. Once you have the images, the magic can happen. :)

So first we start an instance and run nginx.

ec2-run-instances -d "hostname=www"

This will start up one instance and if the script above is executed it will take the user data given and create.

www.yourdomain.com

Which will load balance to the punjab instances.

You can have nginx start up on boot with the above configuration and you are almost there.

Start up the Punjab instances.
for i in 0 1 2 3; do
   ec2-run-instances  -d "hostname=punjab$i" 
done



This will start up 4 Punjab Amazon instances and if your server start up scripts run punjab on boot, you will be up and running. You can scale as you like by starting up new instances or taking down old. You can have a script to reconfigure nginx and then HUP it to add the new instances to the load balancing pool.

I will note that there are things left out, namely the Javascript BOSH client. You are welcome to leave questions in the comments or leave them as exercises for your enjoyment. :) That is it for a basic BOSH setup using Amazon ec2 and python or a "BOSH Cloud" . You can also do this with ejabberd and erlang.

13th May 2008

11:15am: playing chess with a livejournal account
Someone asked about using Chesspark with other XMPP or Jabber accounts and I thought I would make a quick post on how to do it with livejournal. Any XMPP account will work the same as livejournal, so you do not have to limit yourself.

First, if you have a livejournal account, you will need to create a Chesspark account using your livejournal username.

See the following urls :
http://www.chesspark.com/faq/#general-5
http://www.chesspark.com/join/

I used this one, so the username I put in the form field was thetofu@livejournal.com
Note the '@livejournal.com' , you will need to add this when creating and logging into the account.

Now here is the only part where it may get confusing. You have to enter a Chesspark password. This can and should be different from your livejournal password. It is used to access the Chesspark website and not the live game server. This will be changed soon and support for openid is in the works. So fill in your Chesspark password, but remember to use your livejournal password on the next part.

Next we want to play some games. To get to the live game server you can use the web or download a client.
Web: http://www.chesspark.com/play/
Download: http://www.chesspark.com/download/

Going to the play url or starting up the Chesspark application you will be presented with a login screen.
Here you will enter your full livejournal username and password. ( NOTE: not your Chesspark password from above).

So, I enter thetofu@livejournal.com and my livejournal password and I am off! Playing Chesspark with my livejournal account!

So, how does this work? Well, Chesspark is XMPP based and can communicate with other XMPP chat servers. Livejournal has XMPP chat and when you log in with a Chesspark client you are actually logging into livejournal.com. After that you can communicate via livejournal to Chesspark and do anything you like as if you were on the Chesspark server.

I hope this helps and have fun!
Current Mood: helpful

29th February 2008

2:22pm: Tooting a horn
Jack and I was recently interviewed by Duncan McGreggor at twisted.

http://twistedmatrix.com/trac/wiki/InterviewChesspark200802

We talk about twisted, python, XMPP, and of course, Chesspark. Thank you very much for the interview Duncan!
9:39am: Tweet Roll for Charleston
Hey, someone put a tweet roll for Charleston micro bloggers. I call it a tweet roll because it is like a blog roll but for twitter. :)

So, all you lowcountry folk check it out! http://twitter.com/chasbloggers

30th January 2008

12:54pm: KISS or The Simplification of Punjab
It has been seven weeks since I have updated this. :( That is not good. Anyway, to remedy this problem I am gonna document some problems I am currently in the process of solving. The first one, is the complexity of Punjab. Punjab is a HTTP XMPP connection manager. It provides a way to use Jabber or XMPP via HTTP.

Currently, punjab provides a SOAP, XMLRPC, HTTP Polling, and BOSH frontend to XMPP servers. The only one that works well is BOSH. The others have been a chore to maintain.

Because of this, I am gonna cut down on what Punjab 1.0 will be. Here are the steps for the KISSification of Punjab. :)

1. Make the requirements to run punjab the current version of twisted and twisted words. (Backwards compatibility is out the door till later.)

2. Focus on just BOSH. Clean up the code and the session interface to just do BOSH.

3. Write tests to make sure Punjab is 100% BOSH compatible.

4. Make a 1.0 release.

Please make comments below if you have any thoughts on this. After those 4 steps are made, each 'new' thing in Punjab will try to be as simple as it can. Current thought is a JSON version of BOSH.

NOTE: as of now #1 is done. The rest will be other posts.
Current Mood: blank

6th December 2007

11:56am: Posted using LJ Talk...
Just created a new group on GGE http://www.greatgamesexperiment.com/group/xmpp I need to blog more. :)

23rd August 2007

2:39pm: Twisted Words XMPP Component Example
Just created a twisted words component example for a friend. I decided to post it here so maybe people can find it. http://www.butterfat.net/wiki/Documentation/TwistedJabberComponentExample

1st August 2007

9:45am: XMPP and Chess
Last night http://chesspark.com released a new web interface to our XMPP based chess server. We also have a new way to get a game with a redesigned, notification based, game finder. You can still get a game with the old ways too. :) In the near future their will be documentation on the technology and protocols we use. Lots of the XEPs like MUC, BOSH, and Pubsub. Also, I hope to blog more about that when I get a chance. For now, go play a game and have fun!

30th July 2007

9:12am: Attention, the release level is at orange.
Just released a new version of punjab. Check it out at http://www.butterfat.net/wiki/Projects/PunJab . Many thanks to the people that made this happen! Especially, thanks to Jesir Vargas and Fabio Forno! We are close to a 1.0 release and I am excited!

29th July 2007

7:33pm: Punjabi MC
I am testing and getting the newest punjab in subversion ready for release. I will mention the improvements when I make the announcement. I like blogging via my xmpp client. I am thinking about moving my blog, where should I move it to?

23rd July 2007

8:53pm: Frank the bot post
It has been awhile since I have logged into the livejournal jabber server. I should go look at the state of djabberd too. :)

25th May 2007

6:14pm: chess widget
A new feature at chesspark is a game viewer widget. So that you can embed chess games in a blog post or web page. This game is one I recently lost (which I do a lot). Of course you can also download the PGN, but the game viewer is cooler. :) There are gonna be many more features for sharing games and chess info. One is embedding live games and chat in a widget similar to this.



If you can not see this try http://thetofu.com/chess.html for the same example.
Powered by LiveJournal.com