visit
Photo: Aleksandr Ulanov
How did you approach the development of this platform?
The biggest challenge was developing a solution that could handle the large amount of data generated by tracking multiple school buses in real-time. We had to find a solution that was fast, reliable, and scalable. We initially started with websockets, which is a most widely used solution for real-time communication in the web development world, but we found it to be extremely inefficient and expensive to scale. So we switched to long polling, which turned out to be a much more efficient solution.Can you explain why you had to switch from websockets to long polling?
Websockets allow for bidirectional communication between the client and the server, which is great for real-time updates, as it lets you send messages not only from the server, but also from the client. However, websockets protocol requires a persistent connection, which can be expensive to maintain for large-scale systems like the AVL platform.Also websockets implementation in Ruby on Rails world comes with using Rails standard library called ActionCable, or it's alternative - AnyCable, which is a next step library for handling websockets, but they both have significant limitations, as well as websockets as a protocol itself has some limitations, which can be a deal breaker for some of the projects.With long polling, on the other hand, we can use a request-response model, which only requires a new request when new data is available. And if you need to send messages from client to server, you can do so by simply making HTTP POST requests. This makes long polling much more efficient and scalable for large-scale real-time systems like the AVL platform. We can also use MessageBus gem, which is a third party library, designed to work with long polling. It comes with some handy features, like automatic fallback to regular polling, message queues, ordering, etc. Those features make the solution much more reliable, which is an important thing, especially if we're talking about children's transportation.You recently gave a conference talk at RubyRussia on the topic of Server-Sent Events (SSE). Can you tell us more about your research on this and how it relates to real-time vehicles tracking?
SSE is a technology that allows for server-to-client communication in real-time. It's similar to long polling, but with some key differences. With SSE, the server sends a continuous stream of updates to the client, rather than the client constantly polling for updates, this means the SSE connection stays open until it is closed intentionally. SSE also works over standard HTTP, which makes them easier to maintain, scale and profile. It's also an uni-directional stream, so sending messages from the client to the server is assumed to be handled via HTTP POST requests, instead of sending them over SSE connection.In my talk, I discussed how SSE can be used in real-time tracking systems like the AVL platform. By using SSE, we can create a more efficient and scalable solution that is able to handle even larger amounts of data with lower server loading.The AVL tracks various types of children transportation across different vendors, right? Can you tell us more about how the platform integrates with these different transportation providers?
Absolutely. The AVL platform is designed to work seamlessly with different types of vehicles and transportation providers. It's a flexible solution that can be customized to meet the specific needs of each client.For example, with school buses, the platform is designed to track the location of each bus in real-time and provide updates to school administrators and parents. But with taxis and vans it's not only tracking vehicles and sending notifications to schools and parents, but also does the bookings management, i.e. when the ops team is adding a route with schedule into the platform, the integration is requesting the booking for the defined dates and students automatically. In fact, the operations team doesn't need to worry about bookings at all, since everything related to those is done by the AVL integration.We've designed the platform to be easily integrated with different transportation providers. Tracking data is collected across all integrated transportation vendors, then processed and stored in the system to be shown on the map, so that schools can work with multiple providers and still have a unified view of all their transportation data.That's really impressive. It sounds like this AVL platform is not just a tracking solution, but a comprehensive platform for managing all sorts of transportation logistics. Can you tell us more about how this platform is changing the way schools and transportation providers work together?
It’s improving communication and collaboration between schools and transportation providers. With real-time tracking and updates, schools can better manage their transportation logistics and ensure the safety of their students. And transportation providers can optimize their routes and improve efficiency, which can help reduce costs and improve service for their clients.But beyond that, this platform is also helping to build trust between schools and transportation providers. By providing a transparent view of transportation data, both parties can have a better understanding of each other's needs and work together to provide the best possible service to students.Overall, I believe that the AVL platform is a game-changer for the transportation industry. It's making transportation logistics more efficient, more transparent, and ultimately, safer for everyone involved.