The Tofu

 

Big Changes

It has been awhile since I have posted something on my blog. There are many reasons for this and most of them involve work and family. 

The big news is that I have moved to the San Francisco Bay area and started work for Mochimedia. I am very excited about this move and I know it is gonna be a lot of fun. 

It is a very big change and I am excited about what is ahead. I hope to blog more too!

Comments [2]

Hacking s5 to be remote controlled and shared via XMPP

I was asked to give talks at two conferences recently. One talk was for POSSCON and the other was for CREATESouth.

The POSSCON talk was about XMPP and I like to show stuff off when doing talks. First, I had a rock, paper, scissors XMPP based game to talk about but I thought it may end up not being interactive enough. I then thought it would be cooler to embed an XMPP MUC chat room and also control the presentation via XMPP. With that idea I created this hack using JQuery, Strophe.js and s5 presentation software.

People could follow the presentation and chat from a URL (http://thetofu.com/xmpp/). I then controlled the presentation from my iPhone for added effect.

It was all done in HTML, CSS and Javascript with a BOSH connection to my XMPP server. I used this same code in my CREATESouth presentation to talk about the real-time web and real-time data.

WARNING: Network latency can cause problems with the controls and lead to embarassing results. :)

WARNING: This is a good simple example and hack but not a complete project.

NOTE: These were two great conferences and I highly recommend them.

How did I do it?

I downloaded s5 and put together the presentation normally.

Since Speeqe is XMPP MUC and Strophe.js I used it to embed an XMPP MUC into the presentation. Just added an iframe next to the presentation content. You can see that in index.html.

I then created a quick client to contol the presentation via pubsub. The client is xmpp.js and has three parts.

The first part is establishing an XMPP connection. In Strophe.js its easy.

I just added the following at the end of xmpp.js:

$(document).ready(function () { connection = new Strophe.Connection(BOSH_SERVICE); // Create connection connection.rawInput = rawInput; // Add some debugging callbacks connection.rawOutput = rawOutput;  // Make the anonymous connection and add onConnect callback for when  // we have established the connection. connection.connect(XMPP_SERVER, null, onConnect);  });

The second part is basic debugging callbacks and you can see them in the xmpp.js code.

The last part is making the subscription and handling an event callback to move the presentation page to the correct one.

I added the following code when a connection was established to send presence and send a subscription.

log('Strophe is connected.'); connection.send($pres()); connection.pubsub.subscribe(connection.jid, PUBSUB_SERVER, PUBSUB_NODE, [], onEvent, onSubscribe );

onSubscribe just logs an message when a subscription is successful.

onEvent handles the pubsub events and uses s5 code to move the page to the correct place.

You can see the entire function in xmpp.js but the important parts are the following:

// Grab pubsub entry page number var event = $(message).children('event') .children('items') .children('item') .children('entry').text();  go_page = parseInt(event); // The event should be the current page # goTo(go_page); // User s5 goTo to hop to the correct page.

That is all I had to do to get the client part working. I think created a basic control page in javascript. I went to this page and logged in from my iPhone. control.html and control.js are the code for controlling the presentation.

When you click the forward, back, or home button you will publish the page number representing those pages to the PubSub node.

For example to go "back" you click on the back button and it triggers the publish event with the correct page number.

$('#back').bind('click', function () { log("back"); publish(current_page - 1); });

And publish looks like :

function publish(page) { connection.pubsub.publish(connection.jid, PUBSUB_SERVER, PUBSUB_NODE, [page.toString()], log ); current_page = page; }

Other requirements to use this is a BOSH connection manager like Punjab and an XMPP server with PubSub support like ejabberd.

That is it, feel free to play around with it and have fun!

You can find the code on github. http://github.com/twonds/xmpps5

Resources

XMPP - http://xmpp.org

BOSH - http://xmpp.org/extensions/xep-0124.html

PubSub - http://xmpp.org/extensions/xep-0060.html

Strophe.js - http://code.stanziq.com/strophe

Speeqe - http://code.stanziq.com/speeqe http://speeqe.com

s5 - http://meyerweb.com/eric/tools/s5/

Comments [0]

Open technology, ideas and creativity in South Carolina.

In the past, technology conferences and user groups have been rare in South Carolina. However, there seems to be a rise in technology minded people. Not only an increase in smarter people, but an attitude of sharing and being open with ideas, software and technology. Of course, this is happening in different parts of the US and other countries, but its very refreshing to see this happening in a state that isn't known for being smart or progressive. This past October, in Charleston, there was Barcamp CHS which went really well. Discussing Barcamp, local blogger, Xarker, nailed the idea of change, saying,
    
    "You don't undo an old habit. You have to create new habits, and to make them stick you have to reinforce those new patterns until the old ones silt over."

Lets keep this change going! Not only in Charleston, but all of South Carolina.

Geeksc.com recently requested a list of open-source user groups. I would like to encourage everyone to expand this list and also include conferences and software projects. Not only add to the list, but attend a conference or join a group and keep this upcoming 'New South Carolina' moving forward.

In Charleston, along with Barcamp and the Linux Users Group, there is now a Drupal users group and a Ruby Users Group. There is a non-profit co-working idea that provides co-working space and uses after hour workshops to share creative and technical ideas. Its a great concept, almost like a monthly barcamp. 

In Columbia, I know of the open source conference POSSCON. This is a great conference to learn about OSS. This year looks to be a very good one. I am attending and speaking at this conference. There are also user groups mentioned at geeksc.com. Are there more?

In Myrtle Beach, there is a Geek Out, a geek meetup that seems really cool.  In addition, there is a conference called Create South and it brings together creative types, both artistic and technical to network and share ideas.  I will also be at this one, talking about Real-Time data in social media.

Spartanburg has the South East Linux Fest and from what I hear its a wonderful conference. I hope to attend this year.  There is the Upstate Linux Users Group, but are there more? Please add these too!

I think communication and spreading information about these conferences and groups are key to making change in the creative and technical communities of South Carolina. POSSCON (April 15th - 17th) and CreateSouth (April 17th) are coming up!

Comments [4]

New Punjab - code name Saison 14

Today, I put together a new release of Punjab. This version is 0.14. We have not reached 1.0 yet but are very close! You can download it at the project page or on github.

Punjab now has flash cross domain support and W3C CORS Support. This removes the need to proxy Punjab, if it is not local to your application.
There were also some minor bug fixes and changes. The default resource url is now 'http-bind'. Documentation and dependency error messages were updated and improved.

Limiting server connections to any host was a frequent feature request. So, simple access controls can now be used to limit connections to XMPP servers. You can block out-going connections to unapproved servers. You can change this access list in the configuration when using a tac file.

Best of all, some code has been abstracted enough to split the implementation of XEP-0124 and XEP-0206. This allows others to create code or plugins to do other stuff besides XMPP over BOSH. There will be more documentation and examples of this in upcoming releases.

One of the tests, with the new version, was connecting to Facebook. Its exciting to see Facebook use and support XMPP. 

Thanks and I hope you enjoy the new version!

Comments [0]

Go have a Gowalla day!

I have enjoyed a lot of Gowalla lately. Its a great geo-location application that has some game mechanics. Its fun to visit places, create new places, and share items. It also helps me get out of the house, which is a big deal when you work from home. :) Since being introduced to the game, I always wanted to get on a bike and go to some of my favourite spots in Charleston. On December, 19th 2009 I did! My brother joined me and we termed it 'gowalla' day.

On this same day, my brother and I, celebrated another birthday. This allowed me to skirt my usual responsibilities and just dedicate the day to creating cool spots in Charleston, SC for gowalla!  I started the day hanging out with my youngest daughter. We went to the College of Charleston and I created two spots. We also went to the local farmers market. I then met up with my brother and his girlfriend and we biked to the tip of the Charleston peninsula, also known as The Battery. From there we went to many different spots. The total day took about 8 hours. We had some pit stops etc. We had lunch at Fast and French, we had to fix a flat tire, and we stopped off at Mellow Mushroom to watch a basketball game.
We created mostly historic locations and parks and the total was about 50 new spots, visiting almost 100. 

Instead of writing all of this in a blog post, I retraced the 'Trip' on a google map.


View Larger Map

NOTE: This map is evolving, along with the gowalla spots. I am busy, so putting details into this map is hard. :)

This would have been more fun if more people played in Charleston. The numbers are growing slowly but the more the merrier. :)

Overall, this was a great day, full of history and gowalla! I recommend doing this with or without gowalla, its always great to explore old and new spots! Gowalla just adds to the fun!

Comments [0]

Charleston Flooding and Real-Time information.

As many of you know I work for Collecta. There are many ways to use Collecta and today I used it for something pretty cool. I know I am tooting my own horn here but I really thought this was cool.

My daughter had a doctor's appointment today and because of a wonderful local news site we knew that the area was gonna be flooded.

http://charleston.thedigitel.com/storm-bring-coastal-flooding-threat-severe-weather-7531-1201

While doing the morning routine I looked on Collecta and saw that things were pretty bad as predicted.

http://bit.ly/7GuYIf was one of the many queries I used.

They began their journey hoping they would make it on time. A reschedule would mean a huge delay in seeing the doctor again. So, from the safety of my home, I kept my searches running and sent updates via text messages to them.

And with the great local reporting from Jared Smith, community hash tags (I wish microblogging had better meta data) and the pictures allowed me to navigate my wife through the flooded streets and traffic quicker than expected.

I just thought I would share this story because it is a really cool example of using community reported real-time information! Thanks to everyone who sent in pictures and traffic information!

Comments [5]

Trying out posterous.com

Just started checking out posterous.com and I really like its simplicity.

For various reasons I am gonna switch my blog to it. I am still planning on posting via XMPP PubSub and will update thetofu.com site's code to also post to posterous. An XMPP bot or gateway would be cool anyway. :)

Comments [0]

POSSCON 2009

The Conference

The conference is a new, free and open source software conference in Columbia, SC. This last one on April, 19th 2009 was the second one. It was held on the University of South Carolina's campus. It is a free conference! I have attended both conferences and they were both good experiences and it seems it will only get better!

What was good.

The size of the conference doubled, if not tripled, this year. It is nice to see a growing interest in technology and software in a state generally not known for IT. The reasons seem to be that the word is getting out. These guys do a good job running the conference and you can not beat a free conference. :) POSSCON is also present on some popular social media sites :



Because of the larger size there was more representation for other parts of the state. Last time a few people from Charleston were there and this time there seemed to be a lot more. Same with other areas. The College Of Charleston was represented by the Common Lisp for Java project! Some people from the Charleston Linux User Group were there. Other Linux user groups from around the state were there. The South East Linux Fest was represented as well. Redhat and Fedora was there too, but they were there the first time. :)


The weather was very nice for the outdoor free lunch!


There was also a developer track. This was very nice since I am a developer. :) I really enjoyed the topic presented by Greg DeKoenigsberg about contributing to open source projects. It would be really nice if there were more South Carolinians contributing to open source.

Improvements

There is little that needs improvement. It seems the growth alone allows for a more diverse and interesting conference. The improvement I would like to see, is more representation of open source projects. Not in a corporate since but contributers, similar to FOSDEM. Redhat and Fedora were represented along with CL for Java, but that was it. It would be nice to have booths and topics on other projects especially SC based projects. Lightening talks would be really cool. I will say that the functional programming talks were lightening talks and done nicely. So, if we find representatives or contributers of open source projects in South Carolina or the south east it would be great if they showed up to the next POSSCON! The more the merrier. :)


I am not saying we should limit the conference to South Carolina contributers. I just would like to see more open source projects at the conference. I am also curious as to how many SC based projects or contributers are out there and it would be really cool if they all got together at POSSCON.


The South Carolina projects I know are listed here :

I know there are more and I would like to see these represented and
discussed in the conferences to come.

Comments [0]

Relax, use a couchdb backend for ejabberd.

There has been mention of using couchdb with ejabberd. Mnesia is good and so are traditional RDBMSes, but sometimes you need to relax. :) So, I started writing couchdb ejabberd modules. Authentication works and I need to do other things like roster and vcard. I just wanted to quickly announce it for people who are interested. Since I have become fond of github I have placed the code on there.

http://github.com/twonds/ejabberd_couchdb/tree/master

Comments [2]

Formatting Test

Does possterous handle html?


http://thetofu.com

Comments [0]