Meebo sexchat contact updating service

Since going open source a year ago (we had the gall to release it on April Fool's Day, 2007), the Thrift project has steadily grown and improved (with multiple iterations on the Erlang binding).Having Thrift available freed us to split up the problem of building a chat system and use the best available tool to approach each sub-problem.Because the data is persisted, a failed read request can be re-attempted.

It is rather keeping each online user aware of the online-idle-offline states of their friends, so that conversations can begin.The naive implementation of sending a notification to all friends whenever a user comes online or goes offline has a worst case cost of O(average friendlist size * peak users * churn rate) messages/second, where churn rate is the frequency with which users come online and go offline, in events/second.Another challenge is ensuring the timely delivery of the messages themselves.The method we chose to get text from one user to another involves loading an iframe on each Facebook page, and having that iframe's Javascript make an HTTP GET request over a persistent connection that doesn't return until the server has data for the client.Our desi chat rooms are also great place to meet ex chatters of yahoo chat rooms.

One of the things I like most about working at Facebook is the ability to launch products that are (almost) immediately used by millions of people.Unlike a three-guys-in-a-garage startup, we don't have the luxury of scaling out infrastructure to keep pace with user growth; when your feature's userbase will go from 0 to 70 million practically overnight, scalability has to be baked in from the start.The project I'm currently working on, Facebook Chat, offered a nice set of software engineering challenges: The most resource-intensive operation performed in a chat system is not sending messages.Having a large-number of long-running concurrent requests makes the Apache part of the standard LAMP stack a dubious implementation choice.Even without accounting for the sizeable overhead of spawning an OS process that, on average, twiddles its thumbs for a minute before reporting that no one has sent the user a message, the waiting time could be spent servicing 60-some requests for regular Facebook pages.Despite those advantages, using Erlang for a component of Facebook Chat had a downside: that component needed to communicate with the other parts of the system.