Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: How to build a twitter/irc/real-time app
14 points by lpgauth on Oct 9, 2008 | hide | past | favorite | 14 comments
Hi HN, I have to do a project for a class I'm taking and I had a pretty neat idea before going to bed last night, but I'm not sure what technologies I should use to make it happen. Basically, it would be a kind of twitter/irc for mobile (iphone/android) with dynamic channels based on your geolocation. Channels would consist of everyone in a certain radius (specified by the user) of the user location.

I was thinking XMPP would be the way to go to receive and push the messages, but I don't know much about it. Can you multigroup broadcast? How could I create groups/channels? I looked at xmpp4r and started checking for xmpp servers but I'm not sure if this is the way to go.

Any link, book, info would be appreciated.



I would also look at RabbitMQ as the messaging service and the STOMP protocol to talk to everybody.

As far as getting messages down to the browser.

Use http://orbited.org

It gives you a simulated TCP socket called WebSocket(soon to be standard in HTML5)

http://js.io has some work on many common network protocols including XMPP and STOMP.

If this is a very small deploy, you might skip RabbitMQ and use the sister prject of Orbited, Morbid.


Thanks for your response, I will look into those solutions.

I should of said that it would be a native mobile app (iphone/android).


Whatever you do, don't forget about privacy features. One of my friends used to work on an app called Twinkle for iPhone (http://tapulous.com/twinkle/)...it's a twitter client with their own custom location feature so you can get all the nearby tweets (using their backend, because Twitter doesn't support it yet). The only reason why I refuse to use it with the location feature enabled is because I am thoroughly creeped out by some of the people close to me (http://www.flickr.com/photos/chix0r/2788921744/, you get the idea). Only with the recently released 1.2 is there a blocking feature, but that sucks when it's a different person bothering you every time. In fact, Twinkle probably wouldn't be the only app I have a problem with...anything that publicly announces my location gets on my nerves. I don't mind if friends know, but announcing it to the public is something else.

Another consideration is that a user might want to continue in a conversation even though they're not in a location. I could actually maybe even see this as a benefit, if I wanted to join in on a conversation between people at, say, a conference without actually being there.


don't forget that the radius of one user is not the radius of another user. so, you and knuth are both near me, but knuth isn't near you. so when i respond to you in the "channel", should he see the updates? now, if you want to have me join and leave channels based on my proximity to a fixed location, that's a slightly different problem.

you could do this all with xmpp.

the wireless client reports location to your dispatch server, dispatch server responds with list of MUCs. the client does whatever filtering the user has setup or whatever and initiates the joins to the MUCs (basicly, the channels to use your terminology.)

which xmpp server and client libraries, well that's up to you. ejabberd has a lot of inertia.


Do you have any related links or a book on the subject (xmpp)?

I checked out ejabberd, it looks like a nice project but I don't know erlang, would that be a problem? Would I need to write an extension or something in erlang?


Check out metajack.im, tons of good posts about what your looking for. Start with this one: http://metajack.im/2008/10/02/speeqe-is-open-to-all/

This has related good stuff: http://thetofu.livejournal.com/

(astute geeks will notice that these are the Chesspark/Speeqe guys - you can go to chesspark.com and speeqe.com and actually see the code that they are blogging about in action, which is awesome, and puts a big stamp of validity on what they're saying)


I've long thought something like this would be awesome to help people meet people in coffee shops/neighborhoods/apartment buildings etc. Don't just think people want local area communication on mobile phones, though!

I call this class of apps "local social applications".


Funny, Geocasting in XMPP was (roughly) the subject in my diploma thesis :)


Is it published anywhere?


No, but if you send me a mail I can send it to you as soon as it was graded.


I recommend programming a MMORPG as an exercise first. Sorry, couldn't resist ;-)

Actually the idea sounds OK, if you stick to it, you could make it.


You could just grab the chat demo from jetty


You just pretty much described brightkite.


Ah, that's a bummer... Anyways, I already told my prof this is what I was going to do. Still a good learning experience.

Thanks for the heads up.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: