Download Realtime Software

1 view
Skip to first unread message

Chadwick Bosse

unread,
Aug 4, 2024, 2:25:04 PM8/4/24
to laelyforso
Providingusers transit data updates in real time greatly enhances their experience of your transit services. Providing up-to-date information about current arrival and departure times allows users to smoothly plan their trips. As a result, in case of an unfortunate delay, a rider would be relieved to know that they can stay home a little bit longer.

GTFS Realtime is a feed specification that allows public transportation agencies to provide realtime updates about their fleet to application developers. It is an extension to GTFS (General Transit Feed Specification), an open data format for public transportation schedules and associated geographic information. GTFS Realtime was designed around ease of implementation, good GTFS interoperability and a focus on passenger information.


The specification was designed through a partnership of the initial Live Transit Updates partner agencies, a number of transit developers and Google. The specification is published under the Apache 2.0 License.


Live Transit Updates is a service providing real-time transit updates to users of Google Maps and Google Maps for mobile. These updates include live departure and arrival times to transit stations and service alerts.


Live Transit Updates provide two types of real-time updates to users: live departure times and service alerts. Transit partners provide these updates in their feeds. We created the GTFS realtime feed format to complement the widely-used GTFS format for static transit schedules. Your feed needs to be available on a location where we can fetch it periodically. The system immediately processes feed updates as Live Transit Updates information.


A feed may, although not required to, combine entities of different types. Feeds are served via HTTP and updated frequently. The file itself is a regular binary file, so any type of webserver can host and serve the file (other transfer protocols might be used as well). Alternatively, web application servers could also be used which as a response to a valid HTTP GET request will return the feed. There are no constraints on how frequently nor on the exact method of how the feed should be updated or retrieved.


Because GTFS Realtime allows you to present the actual status of your fleet, the feed needs to be updated regularly - preferably whenever new data comes in from your Automatic Vehicle Location system.


This text file is used to generate the necessary libraries in your choice of programming language. These libraries provide the classes and functions needed for generating valid GTFS Realtime feeds. The libraries not only make feed creation easier but also ensure that only valid feeds are produced.


Live Transit Updates is a feature within Google Maps that provides users with realtime transit information. If you are working for a public transportation agency that is interested in providing realtime updates to Google Maps, please visit the Google Transit Partner Page.


Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.


The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSONand synchronized in realtime to every connected client. When you buildcross-platform apps with our Apple platforms, Android, and JavaScript SDKs, all of yourclients share one Realtime Database instance and automatically receive updates withthe newest data.


The Firebase Realtime Database lets you build rich, collaborative applicationsby allowing secure access to the database directly from client-side code. Datais persisted locally, and even while offline, realtime events continue to fire,giving the end user a responsive experience. When the device regains connection,the Realtime Database synchronizes the local data changes with the remote updatesthat occurred while the client was offline, merging any conflicts automatically.


The Realtime Database provides a flexible, expression-based rules language,called Firebase Realtime Database Security Rules, to define how your data should bestructured and when data can be read from or written to. When integrated withFirebase Authentication, developers can define who has access to what data, and howthey can access it.


The Realtime Database is a NoSQL database and as such has different optimizationsand capabilities compared to a relational database. The Realtime Database API isdesigned to only allow operations that can be executed quickly. This lets youbuild a great realtime experience that can serve millions of users withoutcompromising on responsiveness. Because of this, it is important to think abouthow users need to access your data and thenstructure it accordingly.


Use subscribe() to listen to database changes.The Realtime API works through PostgreSQL's replication functionality. Postgres sends database changes to a publicationcalled supabase_realtime, and by managing this publication you can control which data is broadcast.


I just discovered Retool and am considering changing strategy from a homegrown React web app I'm building. However, the application is heavily event-based and the server pushes content to the client via websockets. I could move the data through Redis or Postgres instead, but I still need a mechanism to notify the client to update itself. Assume 1 event every 5 seconds on average and that needs to update, say, 3 tables in the UI. Of course I could theoretically set up polling every second but seems a bit wasteful.


I just skimmed the workflow functionality. That seems like it's for server-side processing. I think my needs are purely client-based. I need to update tables and some other data when an event occurs in an application server I already have. I just need something to tell the UI to update itself from data source(s).


Workflows currently can't push live updates to apps, though it is something that has been requested before. I've added this thread to the internal tracking ticket for the feature and can let you know here if it does end up being included!


Iv been using ably for achieving realtime updates across all app instances. It works very good. Super fast updates in the 500ms range I think. It is just like pusher but for me was easier to integrate. Pusher was making it hard to allow the app to send out the data updates. Which probably means it's more secure.


When you go through the ably setup docs, they provide a JavaScript SDK which I added into retool(just a link to copy and paste). Then, you setup a function in either your company wide preloaded JavaScript or an app level preloaded JavaScript. The ably doc details it but it is basically a function that you run on page load from a Js query. Running the function connects the retool app to the ably channel defined in the preloaded function. Then, from any script or Js query, you can post to the channel. You are able to include JSON data with your post. Any app instance will receive this posted data and when it is recieved, you can choose to do whatever you want with it. In my case, I choose to load it into a state variable. There are a few more intricacies but that is a basic summary.


@bradlymathews there is no polling. I will double check the wiring today to be certain I'm handing out accurate details. It been awhile its been working flawlessly and I have not needed to interact with it


You need a variable setup that represents a specific ably channel as well. You can see I have a few. The channel can be called anything and does not need to be setup before hand. It is created simply by it existing when the preload initializes. These channels allow you to organize different data structures and control what happens on the recieving end when the data pushes into the app.


I'm using an await just so that I can pause the app on load until I'm certain the ably connection is fully established. It connects faster then I can perceive so probably not really necessary to have the await.

So, it subscribes to one of the channels setup in the preload. You could have is subscribe to multiple channels. This function is what actually gets triggered when something is sent over the channel. The message has a .data which will hold the JSON if you choose to send JSON. In my case, in the trigger function, I check that there is actually data in the .data object and then add it into a temp state.


So, that how it is hooked up. I don't completely understand how it is possible for it to work though. What I am always wondering is, "how the hell is that function setup in the JS page load query getting triggered when I am not directly triggering it?". There is clearly something magical happening within the ably library. But, it does work and it does work with great stability. I have never had it not work.


Yesterday, I configured D-ESS with dynamic prices (before I had a fixed price contract) for Belgium. Something related?

The VRM portal is updating but not realtime. I didn't change anything on the communication settings.


@GuntherB - I checked your site and VRM realtime data appeared to work. Does it happen periodically, or consistently? Could you try on another machine with a different network connection (such as your phone on 4G)?


Just to add another voice to this - I have not seen the realtime data menu for a while now - so would be interested to know why and if there is a fix. I've been managing without - but was interested to give DESS a try and that but the option to toggle it on in the VRM settings menu is greyed out. I've upgraded to 3.31 on Cerbo to try to address both, but makes not difference.

3a8082e126
Reply all
Reply to author
Forward
0 new messages