Upload
blrdroid
View
1.360
Download
5
Tags:
Embed Size (px)
DESCRIPTION
Prasun from barter.li talking about how they implemented RabbitMQ chat in their app
Citation preview
Building RabbitMQ based Chat on
barter.li Android App
Why RabbitMQ for Chat
● Fast, reliable, guaranteed & scalable chat
● Mobile, Web compatibility
● Messages, pics, audio, video transfer etc.
● No dependence on Google services
RabbitMQ
● Uses AMPQ protocol
● Built with Erlang
Founded by Rabbit Technologies in year 2007
Why AMPQ
● IBM MQSeries
● Microsoft Message Queue
● Java Message Service
Other Vendors
● Apache qpid
● Apache apollo
● Windows Azure Service Bus
AMPQ
● Started by JPMorgan Chase with iMatix Corporation and
evolved to develop an open standard
● Allows different MQ vendors communicate with each other
Why Erlang?
● Developed by Ericsson
● Good at distributed computing
● Used by Facebook, What’s App
● Open Telecom Platform
Important Things
● Queues
● Exchanges
● Bindings
Exchanges
● Topic
● Fanout
● Direct
● Headers
Android and Rabbitmq
● The java client library is not mobile optimized
● Unreliable tcp (Transmission Control Protocol) connection
● Heavy weight
Issues Faced
● Need to handle frequent tcp connection failure
● Different device login and round robin issues
● Maybe not meant for chat
Solution
● Heartbeat for tcp issues
● Unique queue names for different devices with same id.
● Fanout messaging
Alternatives
● MQTT: Message Queuing Telemetry Transport
● Faye: Simple pub/sub messaging
References
● https://groups.google.com/forum/#!forum/ruby-amqp
● http://www.linkedin.com/groups/RabbitMQ-2830653
● https://github.com/intrepidkarthi/RabbitMQ-Android-Chat
● http://rubyamqp.info/
● rabbitmq.1065348.n5.nabble.com/previous-connection-is-NOT-automatically-
closed-if-IP-different-td31096.html
Android
673 Commits
5 contributors
Design
100 commits
7 contributors
ROR
252 commits
1 contributor
Marketing
5-6 Contributors
Love books? Tomorrow @ 11 am