1 / 20

Yelowsoft replaces Socket.IO with MQTT

One of the major reasons as to why companies like Uber, Grab, Didi, etc. have grown so rapidly is the fact that that they offer on-demand taxi booking services to their customer. These companies leverage cutting-edge technologies to execute real-time requests made by their customers.

Download Presentation

Yelowsoft replaces Socket.IO with MQTT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Yelowsoft replaces Socket.IO with MQTT One of the major reasons as to why companies like Uber, Grab, Didi, etc. have grown so rapidly is the fact that that they offer on-demand taxi booking services to their customer. These companies leverage cutting-edge technologies to execute real-time requests made by their customers.

  2. Although one must also understand that executing these real-time requests is no child’s play. As Taxi Business experts, we know it takes a lot to execute all the taxi requests and operations in real-time. Even a minor lag can prove to be fatal for any taxi business. Keeping this in mind, we at Yelowsoft have come up with a product update in our taxi solution where we have replaced Socket.io with MQTT. This move enhanced the execution speed of all real-time functionalities thus making our solution more efficient than ever. In this blog, we’ll discuss in detail as to how we achieved this feat. But first, let’s have a look at what Socket IO actually is?

  3. What is Socket.io? Socket.IO is a JavaScript library which is used for real-time web applications. It was created in the year 2010. It was built to utilize open connections to facilitate real-time communications which was a new thing at that time. Socket. IO enables bi-directional and real-time communication between servers and web clients. It provides you with the ability to implement instant messaging, real-time analytics, binary streaming, and document collaboration. Socket.IO mainly uses the WebSocket protocol along with a fallback option in the form of polling.

  4. Issues associated with Socket.IO • Earlier, we were using Soket.IO in our taxi solution for all the real-time functions. • But, soon our clients started facing issues due to it. • Our clients faced several issues like:

  5. Scaling • The first major issue that our clients were facing was of scaling. Socket.IO used to work fine with a single server. • However, as the number of servers increased it started showing some issues. Moreover, it has no support for multiple-string. • So, if there were two clients connected via separate clusters, then it became difficult to establish communication between the two.

  6. Acknowledgement • Another issue associated with Socket. • IO was of acknowledgement. Many times, drivers didn’t receive any requests even the server showed that the request has been sent. • This caused a lot of confusion and wastage of time.

  7. Requires greater bandwidth • Socket.IO requires greater bandwidth to operate. • This meant that drivers operating in the region of the low network won’t receive requests on their devices.

  8. Eats up a lot of internet data • Another challenge associated with Socket. • IO was that it used to eat up a lot of internet data.

  9. Decided to go for managed database • To overcome the challenges posed by Socket.IO, we decided to go with a managed database. • The managed database did resolve some issues, for an instance, there were no missed requests now. All the requests sent from the server were reaching to all the drivers in real-time. • However, the managed database had its own share of challenges. First, this real-time database was heavy. • It also used to eat up loads of data, Secondly, it wasn’t a cost-efficient alternative since it was a managed database. • We, at Yelowsoft always try to find a top-notch alternative which is most cost-efficient for our clients. • In this search, we found the perfect solution in the form of MQTT. Let’s have a look at what MQTT is.

  10. What is MQTT? • MQTT stands for Message Queuing Telemetry Transport. It’s an OASIS standard messaging protocol for Internet of Things (IoT). • It’s a lightweight messaging transport that makes it ideal for connecting remote devices that have minimal network bandwidth and a small code footprint.

  11. Benefits of using MQTT • We went with MQTT as it offered us with clusters of benefits. Let’s have a look at it one by one.

  12. Lightweight • MQTT is extremely lightweight as it needs minimal resources and can be used on small microcontrollers. • Moreover, MQTT message headers are so small that they can easily optimize the network bandwidth. • We can also consider it as an updated version of Socket.IO. • It’s also an efficient publisher and subscriber service.

  13. Quality assurance • The quality assurance of MQTT ensures that even if the driver fails to receive any request due to no reception of the signal, then he would receive the request as soon as he gets the signal on his device.

  14. Works in any kind of network • Another major benefit of MQTT is that it operates on all kind of networks. • No matter if your driver has a 2G, 2G, 4G, or 5G network on his phone, with MQTT he will always receive the request on time.

  15. Reduced data usage • Since MQTT is lightweight, it also resulted in low internet usage. • For an instance, it reduced internet usage from 1.5 GB to 20 MB.

  16. Low battery consumption • MQTT not only has low internet usage but it also doesn’t require high bandwidth. Both of these factors result in lower battery usage.

  17. Conducted testing • Before integrating MQTT, we tested MQTT rigorously under different bandwidth. • We also tested how many connections it can accept and found that it can accept a massive number of connections.

  18. Used the most suitable broker • MQTT has a lot of brokers. Few of them are free and few of them are paid. Free brokers are required to configure and manage. Whereas, the paid brokers are not needed to manage and configure. We decided to go for a free broker as it enabled us to customize and configure as per our requirements. • Switching from Socket.IO to MQTT proved to be a game-changer for us and our clients. It’s because it single-handedly resolved all the issues related to the real-time requests thus rendering our solution faster and more efficient. • This was all about the product update. I hope this article provided you with authentic insights and the nitty-gritty of real-time requests. We’ll be coming with more such product updates for our solutions in near future. Till then keep reading this space.

  19. :hello@yelowsoft.com +1 877 707 0459 (USA) +919574078295 (India) : www.yelowsoft.com Thank You

More Related