The Event Driven Mobile Application on Minimo
June 1, 2006
I put together a little demo of getting an event driven/server push application running on Minimo. In the video clip below you'll see that I have my PDA resting on my laptop and on my laptop I have firefox open with a local PHP page. The PHP page has a couple checkboxes that when clicked and the submit button pressed will actually open up a socket connection to the IP address I specified in the text field above. The script then sends a JSON encoded event string of data. That string gets read in by a custom minimo/firefox extension I wrote that listens on a particular port for incoming connections, reads in any data sent then forwards that on to user land javascript. By user land javascript I mean javascript written on a regular webpage, not in the extension itself.

What you see happening in that video is me clicking a checkbox on my webpage on my local laptop. When I click the submit button PHP will attempt to open up a socket connection on a particular port for that IP, then try and send a JSON encoded string of data. The server in this case is a custom firefox extension that will accept this socket request, gather up the data and then forward that to my webpage where I have code that takes the event and loops through all the registered observers and executes a function when that event occurs. So my web page basically says "hey you, send me a message when the event "go" comes in and here is the function I want you to execute when that event comes in.
The best part is the same code works on firefox as well as minimo. Now obviously this is a firefox only implementation of "comet" or event driven applications however in my case that is fine because I get to define the browser my clients will be using for our application. Perhaps some of you are in the same boat. The key thing to remember about this application is it's completely event driven, no polling hacks, no AJAX tricks, no keeping a connection open. Low resources baby. No ajax was used in the making of this app however I did use the My-Bic http://www.litfuel.net/mybic ajax library to provide the JSON encoding/decoding I needed for my particular application.
In my particular application picture you're on a plane and someone wants to order a drink so they hit the service button on their seat. That button sends a message that is broadcast out to the rest of the system and if the crew member assigned to your section is signed in on their IPAQ they should get a little alert on their device, all asyncronously.


What you see happening in that video is me clicking a checkbox on my webpage on my local laptop. When I click the submit button PHP will attempt to open up a socket connection on a particular port for that IP, then try and send a JSON encoded string of data. The server in this case is a custom firefox extension that will accept this socket request, gather up the data and then forward that to my webpage where I have code that takes the event and loops through all the registered observers and executes a function when that event occurs. So my web page basically says "hey you, send me a message when the event "go" comes in and here is the function I want you to execute when that event comes in.
The best part is the same code works on firefox as well as minimo. Now obviously this is a firefox only implementation of "comet" or event driven applications however in my case that is fine because I get to define the browser my clients will be using for our application. Perhaps some of you are in the same boat. The key thing to remember about this application is it's completely event driven, no polling hacks, no AJAX tricks, no keeping a connection open. Low resources baby. No ajax was used in the making of this app however I did use the My-Bic http://www.litfuel.net/mybic ajax library to provide the JSON encoding/decoding I needed for my particular application.
In my particular application picture you're on a plane and someone wants to order a drink so they hit the service button on their seat. That button sends a message that is broadcast out to the rest of the system and if the crew member assigned to your section is signed in on their IPAQ they should get a little alert on their device, all asyncronously.

hyperstruct says:
July 1, 2006 @ 11:27 — Reply
Jim, nice to see some Minimo hacking. I'm eagerly waiting for Minimo on the Nokia770 to join the fun. :-) For this kind of applications you might also want to consider XMPP (the protocol behind Jabber), it doesn't require peers to open ports or know each other's address and it doesn't have to poll. I wrote an implementation for Mozilla, xmpp4moz. Happy eventing. :-)
Mike Potter says:
July 7, 2006 @ 06:36 — Reply
Very cool... You can also accomplish data push using the Flash plugin and a new product from Adobe called Flex Data Services... FDS is available for use for free in production applications (on a single CPU machine), and the Flash plugin has the ability to subscribe to messaging from that server, so the server will actually push messages out to the client. You use it in combination with the Flex / Ajax bridge, and only use Flash for the data push part (use a hidden 1 px Flash file on your site, then use the bridge to call JavaScript from Flash). I'd love to talk to you more about Adobe's recent Flex release and some of the comments I've read on the blog about performance problems. I think we've solved most of them with Flash Player 9 and ActionScript 3, and hope you take another look at them. Feel free to email me. Mike
Mikko Ohtamaa says:
May 7, 2007 @ 23:42 — Reply
Hi, I just read about your work and I hope I could come up with a general asyncronous event framework for browser (something called JS Event Pump) where events could go both downstream and upstream. If the light-weight extension is not available, the library would fall to the default AJAX logic. Is your code available somewhere or are you planning to publish it?
Christian Louboutin says:
January 6, 2010 @ 11:45 — Reply
Comment pending moderation
Louis Vuitton Handbags Replica says:
January 29, 2010 @ 18:15 — Reply
Comment pending moderation
farmville cheats says:
February 5, 2010 @ 07:59 — Reply
Comment pending moderation
abercrombie clothes says:
March 8, 2010 @ 20:19 — Reply
Comment pending moderation
fake watches says:
March 8, 2010 @ 23:47 — Reply
Comment pending moderation
best mortgage rates says:
March 11, 2010 @ 01:09 — Reply
Comment pending moderation
Pass Nclex says:
March 17, 2010 @ 21:53 — Reply
Comment pending moderation
whitening teeth at home says:
March 18, 2010 @ 00:29 — Reply
Comment pending moderation
Potty Training says:
March 23, 2010 @ 22:32 — Reply
Comment pending moderation
megaupload says:
March 26, 2010 @ 22:39 — Reply
Comment pending moderation
iphone Application Development says:
April 2, 2010 @ 01:01 — Reply
Comment pending moderation
Search Engine Optimization Service says:
April 2, 2010 @ 12:19 — Reply
Comment pending moderation
Orlando Personal Injury says:
April 2, 2010 @ 12:37 — Reply
Comment pending moderation
Penis Extenders says:
April 6, 2010 @ 19:05 — Reply
Comment pending moderation
facebook farmville cheats says:
April 12, 2010 @ 00:43 — Reply
Comment pending moderation
Links of London Jewellery says:
April 14, 2010 @ 07:36 — Reply
Comment pending moderation
blu ray ripper says:
April 18, 2010 @ 04:08 — Reply
Comment pending moderation
panxin says:
April 27, 2010 @ 22:22 — Reply
Comment pending moderation
cara menambah tinggi badan says:
April 29, 2010 @ 23:41 — Reply
Comment pending moderation
sonnerie portable gratuit says:
May 13, 2010 @ 01:43 — Reply
Comment pending moderation
Speeding Tickets says:
May 24, 2010 @ 11:58 — Reply
Comment pending moderation
Ugg Bailey Button says:
May 28, 2010 @ 23:59 — Reply
Comment pending moderation
Cheap Christian Louboutin says:
May 29, 2010 @ 00:01 — Reply
Comment pending moderation
Lovers’Clothes says:
May 29, 2010 @ 00:03 — Reply
Comment pending moderation
Saudi Arabia says:
June 7, 2010 @ 15:35 — Reply
Comment pending moderation
Top 10 says:
June 7, 2010 @ 15:37 — Reply
Comment pending moderation
LOUIS VUIttON Outlet says:
June 9, 2010 @ 22:45 — Reply
Comment pending moderation
HP0-D05 says:
June 12, 2010 @ 18:14 — Reply
Comment pending moderation
Louis Vuitton handbags says:
June 16, 2010 @ 01:32 — Reply
Comment pending moderation