Top Banner
19

June 2014 - Building Rabbit MQ based chat on Android

May 12, 2015

Download

Technology

BlrDroid

Prasun from barter.li talking about how they implemented RabbitMQ chat in their app
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: June 2014 - Building Rabbit MQ based chat on Android
Page 2: June 2014 - Building Rabbit MQ based chat on Android

Building RabbitMQ based Chat on

barter.li Android App

Page 3: June 2014 - Building Rabbit MQ based chat on Android

Why RabbitMQ for Chat

● Fast, reliable, guaranteed & scalable chat

● Mobile, Web compatibility

● Messages, pics, audio, video transfer etc.

● No dependence on Google services

Page 4: June 2014 - Building Rabbit MQ based chat on Android

RabbitMQ

● Uses AMPQ protocol

● Built with Erlang

Founded by Rabbit Technologies in year 2007

Page 5: June 2014 - Building Rabbit MQ based chat on Android

Why AMPQ

● IBM MQSeries

● Microsoft Message Queue

● Java Message Service

Page 6: June 2014 - Building Rabbit MQ based chat on Android

Other Vendors

● Apache qpid

● Apache apollo

● Windows Azure Service Bus

Page 7: June 2014 - Building Rabbit MQ based chat on Android

AMPQ

● Started by JPMorgan Chase with iMatix Corporation and

evolved to develop an open standard

● Allows different MQ vendors communicate with each other

Page 8: June 2014 - Building Rabbit MQ based chat on Android

Why Erlang?

● Developed by Ericsson

● Good at distributed computing

● Used by Facebook, What’s App

● Open Telecom Platform

Page 9: June 2014 - Building Rabbit MQ based chat on Android

Important Things

● Queues

● Exchanges

● Bindings

Page 10: June 2014 - Building Rabbit MQ based chat on Android

Exchanges

● Topic

● Fanout

● Direct

● Headers

Page 11: June 2014 - Building Rabbit MQ based chat on Android

Android and Rabbitmq

● The java client library is not mobile optimized

● Unreliable tcp (Transmission Control Protocol) connection

● Heavy weight

Page 12: June 2014 - Building Rabbit MQ based chat on Android

Issues Faced

● Need to handle frequent tcp connection failure

● Different device login and round robin issues

● Maybe not meant for chat

Page 13: June 2014 - Building Rabbit MQ based chat on Android

Solution

● Heartbeat for tcp issues

● Unique queue names for different devices with same id.

● Fanout messaging

Page 14: June 2014 - Building Rabbit MQ based chat on Android

Alternatives

● MQTT: Message Queuing Telemetry Transport

● Faye: Simple pub/sub messaging

Page 15: June 2014 - Building Rabbit MQ based chat on Android

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

Page 16: June 2014 - Building Rabbit MQ based chat on Android
Page 17: June 2014 - Building Rabbit MQ based chat on Android
Page 18: June 2014 - Building Rabbit MQ based chat on Android

Android

673 Commits

5 contributors

Design

100 commits

7 contributors

ROR

252 commits

1 contributor

Marketing

5-6 Contributors

Page 19: June 2014 - Building Rabbit MQ based chat on Android

Love books? Tomorrow @ 11 am