Hi everyone.
I've almost finished my real-time carpooling platform (built entirely with App Inventor, which is the only programming tool I know how to use). Its goal is to help workers take advantage of empty seats in their cars with people traveling in the same direction, instead of each relying on their own car during rush hour or wasting a lot of time on public transport. The platform consists of a user application (the interface for accessing the carpooling service) and a couple of server applications.
The user and server applications communicate using a messaging protocol on a Firebase real-time database.
Everything works correctly. However, the server applications are running on a couple of Android tablets at home. I need to migrate them to more powerful cloud servers, with better availabity and capable of handling hundreds or thousands of trips simultaneously.
Could anyone suggest the best way to accomplish this? If necessary, is there an easy way to modify the code generated by App Inventor so that it can run on a cloud server?
Thank you for your help.
Regards,
Martin.
We would need to understand what these apps are doing and how they are handling i/o of data.
They basically respond to events, which are communicated between apps though messages sent to certain nodes of the real time database (where the correspondent app or server is listening).
For instance: When a new traveller wants to register in the platform, the traveller app sends a message whith a request to the server, with it’s data (mobile number, name, etc). When the server listens to the request, checks the number is not already registered, assigns an UserId to the traveller, writes the traveller data in the data base, and replies to he traveller app another message with the registration confirmation.
I would use php and mysql (mariadb)
Is there an AppInventor to Php translator?
Right now, the data base I use is also Firebase real time (I believe it’s not SQL but Json).
OK, you did not say you were using "Firebase Realtime Database".
Probably a "quick and simple" (!?) Google Apps Script would be sufficient to handle the data checking and turnaround. There are also Firebase functions, but this is a whole new area to learn and handle!
1 Like
The issue is that the server currently works extensively with lists of data (which it stores in memory for quickness). For example, every time a driver's app announces that the car has reached a new location, one of the servers checks its list of passengers waiting to be picked up, to see if any of them are nearby. If so, it then checks if that passenger's destination is along the driver's route, to determine if they are compatible for traveling together, And then the server suggest them as potential travel companions to both travellers' apps.
I'm not sure if any of these solutions would be able to handle these lists quickly.
I'm also concerned that, in the case of several near-simultaneous requests, multiple processes in the new cloud server could attempt to access these lists at the same time, with unpredictable results (which I believe doesn't happen with App Inventor, since it's single-threaded).
You can block execution until the previous request has completed.