Facebook is now using MQTT

Recently I discovered Facebook is now using MQTT, the IoT protocol in its Messenger and Instagram app in an effort to lower battery usage.

From IBM (https://www.ibm.com/developerworks/community/blogs/mobileblog/entry/why_facebook_is_using_mqtt_on_mobile?lang=en)

Why Facebook is using MQTT on mobile

We can all relate to the concept of protocols, sensors and meters that are used to measure and analyze data. But what does Facebook have to do with that? If you are curious, keep reading this blog post to learn more how Facebook took a huge advantage by using Message Queue Telemetry Transport (MQTT).

 

A little history on MQTT

Back in time when Roy Fielding came out with his dissertation introducing the Representational State Transfer (REST) concept, people paid attention mainly because (a) it showed a different and simpler way of having websites, databases and other systems interact and (b) it came from one of the HTTP specification authors.
In 1999, Andy Stanford-Clark of IBM collaborated with Arlen Nipper of Eurotech to create a specification for a new messaging protocol, MQTT. Being dissatisfied with the current technologies, both were working on projects to help get remote data onto disparate devices. They were seeking to leverage communications among devices using reduced network bandwidth and providing assured message delivery in a very constrained environment with (a) high latency, (b) devices that were limited in capacity and power and (c) expensive and even unreliable networks. Think of it as a messaging protocol to be used for sensors, meters, actuators and so on. MQTT is all about machine to machine, or M2M, since it is a specification to cover device communications.

That said, both Roy Fielding and Andy and Arlen were searching for something simpler than what was out there. And don’t get me wrong—I am not comparing REST and MQTT as specifications or by their applicability; I just mean to highlight ideas that made communications simpler.

MQTT and the Internet of Things

MQTT, specifically, was a great fit for the new buzzword Internet of Things, which brings all sorts of devices onto the same network. For example let’s think of the hundreds of sensors inside a car, or as part of oil and gas plant, or even temperature meters, satellites and so on—all of them collecting and pushing data outside. Using MQTT, these devices (or sensors, if you prefer) can now be smart enough to share their data in the network, making it possible to have smart systems taking actions based on the data shared by these constrained devices.

A nice case study on this is shown by Red Funnel, a UK Ferry Service that tweets its passengers about their ferry’s arrival and departure based on information gathered from sensors and processed by data analytics systems.

With the popularity of smartphones, a new applicability was envisioned for these sorts of devices. MQTT.org presents a list of articles covering MQTT on the Android platform.

MQTT for Facebook’s messaging app

An amazing new MQTT use case came out in 2012, when the Facebook software engineer Lucy Zhang announced through the Facebook blogsome details of the new Facebook Messenger app that was available for smartphones, including both Android and iOS devices.

Lucy said Facebook had to rebuild a new messaging mechanism for their app, this time using MQTT to have assured and faster message delivery. Not only that, but as for any smartphone app, bandwidth usage and battery life are real concerns that had to be overcome as they started to use MQTT as their messaging protocol.

Another highlight of the Facebook Messenger app was the possibility to have individual chat sessions between two people or a group chat, thanks to the publisher-subscriber nature of MQTT.

Using MQTT, Facebook brought to the game a fast and reliable messenger application—small and lightweight, a battery and cost saver—that would function well even with the varying Internet connections available across the world.

2008 in Google’s terms

2008 is almost over, and Google has released Zeitgeist 2008. A good time to blog about it, since it’s still quite fresh and if I don’t do it now, I would postpone it on and on and on, right? 😛

Zeitgeist | Pronunciation: ‘tsIt-“gIst, ‘zIt | Function: noun | Etymology: German, from Zeit (time) + Geist (spirit) | Date: 1884 | Meaning: the general intellectual, moral, and cultural climate of an era.[1] [2]

This year the chart is not as colorful as before but it was enhanced with annotations 😛

Economy

Since the first release in 2001, the Zeitgeist progressively does a better job reflecting situations of the world, from regional to international.


Trends for Layaway

And no, that’s really a burst, a sudden increase in term of 8 times the original volume; not because the chart is scaled! The turkeys did quite a good job!

Over the hedge comics @ overthehedge.com

Oil

Gas price contributed is part, oh well…

Look at how consumerism has taken over the world. People care about the environment not for their children but instead for their pocket. What if one day the earth stood still? 😛

Who, what and how

I comment only for what I feel like commenting 😛

Who is…

  1. who is Obama
  2. who is McCain ~ Google is becoming one of the criterion for presidency 😛
  3. who is Palin
  4. who is lil wayne
  5. who is miley cyrus
  6. who is dolla
  7. who is jonas brothers
  8. who is chris brown
  9. who is biden
  10. who is martin luther

What is…

  1. what is love ~ How can you define love 😛
  2. what is life ~ 42
  3. what is java ~ Americans doesn’t seem to use that much coffee 😉
  4. what is sap
  5. what is rss
  6. what is scientology
  7. what is autism
  8. what is lupus
  9. what is 3g ~ Proof of Apple’s influence (j/k, 3G standards are in active development)
  10. what is art

How to…

  1. how to draw
  2. how to kiss ~ Isn’t this stuff best practiced than learning
  3. how to write ~ Blog is growing, right…
  4. how to cook ~ Restaurants are now expensive for Americans
  5. how to tie
  6. how to hack ~ Adults are taking their kids apart from the fun…
  7. how to run
  8. how to cite
  9. how to paint
  10. how to spell

International queries [3]

Nothing that much interesting, since Google themselves is quite lazy to translate the international queries this year 😛

What a pity Vietnam still haven’t generated enough data to appear in the yearly list, or is it some kind of classified data? Because I’m quite sure not only Vietnam are contributing to that infamous #1 query, while the second and third appeared in the Zeitgeist…

It’s not something that makes you proud when you searched for blog the most… ;))

Loneliness

Technology takes people nearer to each other… less and less lonely since 2004. The world is getting better! 🙂 You’ve got to love it!

Translation

Google released Vietnamese support for Google Translate this year together with a couple of useful enhancements (translated search, dictionary, etc.). Before that I have always been in doubt that all the Vietnamese pages on Google is machine translated; but that’s countered by the fact that nobody in Vietnam ever succeeded in writing such a translation engine; and the translation looks natural enough :-/ Time to put that to the test 😛

Web history in Vietnamese

Same page, translated from English

Sure enough, you can see the apparent similarity: the wording is the same; the grammar on the static page is a little better than the translated one but is still far from perfect. My guess is Google has someone with basic Vietnamese knowledge, and the person’s responsibility is just to check whether the translated text is readable. Oh well, even though people has to turn to English if they want to read the TOS, this may help kids and give a good example of how hard to translate Vietnamese (O’ great language =)).

Also, since I received complaints that my English is so terrible, this blog has just been enhanced with a translator thanks to David Pozza and Google for providing the API, hope it is more readable now 😉

(Look to the right)

~ And that’s another day with Google

Blog.Start()

Actually, that should be NewBlog.Start() since this is not my first blog, and definitely not the second nor the third blog :P. This blog was created last week, in the middle of hurried… Ahh… It’s been better since then… And since when I have started loving storms? Possibly when instructors started to let their students take the day off and hold the deadlines for a while. ^^

Things are a little off-track. My first intention months ago when I wanted to escape from the closed space of Yahoo 360 is to move the whole blog out here. I even wrote a converter and publicized it for that sole purpose. But after the fall of my database and the obstacles I encountered setting up this blog (WordPress error, slow queries, faulty FTP etc.), most of which are just common traits for a byet host. I’ve had an unpleasant experiences with them in the past too; but that’s just what you could expect from a free host. You aren’t paying for it, so all complaining is for yourself. Why I’m not affording a decent host you ask? Possibly because of the ever increasing inflation rate here that when someone started to have a decent amount of money, he must then use the extra to pay for the rise of everything. And that’s such a big problem that I can’t solve in a day or two, so its best to cope with it. As a precaution, I’m going to have a plugin synchronize this blog with a backup too.

Back to the storm, it was cold yesterday but today turned out to be a sunny day. Hot weather as usual, dogs barking and running around (not birds singing), people yell at each others (not kids playing), and stuff. I started the day with a big headache. Partly due to the unsatisfied intention of creating the theme I want: A combination of the elegant transparency found in pixeled and the coolness in transparency from vistered little. To my surprise, vistered little still work with the current version of WordPress. I thought there was some good reason for WordPress to remove their #1 theme from the old repository, when that theme contained link to nowhere other than windy road and was released under GPL… Well, that’s some Automattic thing and possibly not a user’s matter ;))

So here it is… I end up creating a new header and adding some feminine to the theme. Nonetheless it’s black and I feel some strength coming from it (Added shadows and some dashes) B-) It should work for the browsers mentioned at the bottom. Should someone be unable to enjoy the beauty (seeing an ugly header or something), they should just scrap that IE6 and use Opera instead. Geez, don’t they have any idea that browser is back from 2002 and even at that time it already lacked behind?

Installed Gears according to the recommendation from WordPress’ admin page. How come the save button is disabled offline? It’s Gears supposed to handle offline transactions? Another percent in Google’s 47% beta. Or is it WordPress didn’t make use of that offline database? Great idea anyways.

Another disappointment: Microsoft Word will not register this blog for some mysterious reason and I won’t be able to enjoy the comfortability of the #1 text processor… Got it working by now. It turned out that I firewalled Word before and didn’t enable XML-RPC for WordPress…

That’s all I remembered to write, half of the free day has passed by. I have to resume doing stuff tomorrow, just hope that my ISP won’t collapse like they did twice last month. Imagine cup coming and I am still have the competition-phobia :-SS,  a SVN repository still thrist for files I can hear it screaming… Argh… At least my head no longer hurts ^^