a like-UBER Service...

Magma

Expert
Licensed User
Longtime User
Hi there...

I have a project in mind... that will be in Country Level...

It will be an UBER - like - Service - the vehicles will serve will be about ~5000 - 10000
Customers will be ~1 million...

So the queries same time in a database could be
~30000... that is a problem... or no ?

1) What server or servers i need ?
2) Where to host... or use any amazon or google services / microsoft ?
3) best solution for backup ?

4) Can b4x / actually b4j-b4a-b4i cover me (i know that can - my only problem is the server...)

5) Is it possible to have a google map with 10000 points ? - is it possible all theses refresh every second... or use areas... ?

Thanks in advance...

ps: Max queries with a Xeon server 2620 v4 ... with no problem was about ~1200... serving ~500 vehicles same time and about ~1000 customers...
 

Sandman

Expert
Licensed User
Longtime User
It seems you are doing quite a bit of premature optimization.

Just pick a well-known solution that is simple to work with and is known to scale and go with that. Once you hit the limitations of that you will probably already have made so much money on your solution that you can find a consultant to grow the database for you. For instance: MySQL as database.
 

Magma

Expert
Licensed User
Longtime User
I hope was doing... premature optimization... but the reality is reality... that;s because is something like bonding all cities having same service (from different provider) -> to one one solution...

So the 10.000 vehicles realtime tracking will be real... + queries...

What will be a good start option for hosting ? /with real good response / preferable windows server (because of b4j server/jetty)... seems i ll go with jetty...
 

DonManfred

Expert
Licensed User
Longtime User
preferable windows server (because of b4j server/jetty)
because of B4J Jetty i would suggest using Linux as it is more powerful then windows!
2) Where to host... or use any amazon or google services / microsoft ?
Get a powerfull VPS (should be OK; you later can switch to more powerfull own server if you want. No vps, your own server running linux). Amazon or Google Cloud Services are good for it too for sure.
 

Magma

Expert
Licensed User
Longtime User
a silly question... will an MQTT solution / server will work with all that ?

Making thoughts...

Tracking 10000 vehicles and view all the points from each vehicle - or is something that will slow Down the "EARTH" ????
 

DonManfred

Expert
Licensed User
Longtime User
will an MQTT solution / server will work with all that ?
maybe.
It does not make sense to view 10000 cars on a map. It more make sense to see cars in near (around a few miles around me).

At the end i can not answer this. I never setup such a project. And due to this i do not have any experiences.
 

Magma

Expert
Licensed User
Longtime User
sorry... it ...will be ~1000 in some areas (10000 are all in Country level) / osmdroid or google maps can handle 1000 points in one second.... (i know... i will test) :)

ps: saw "I never setup such a project"
 

Magma

Expert
Licensed User
Longtime User
...Well i have some test timings... 1000 records / query at osmdroid from a test vps (cheap in germany with low speed about 10mbit)... need about 3.5~4.5 seconds from a 4G connection - to get from database / and make points at map... not very bad... but not lightning...

i am thinking various that will help.. like that 1000 records.. can be one string record... that will have a map with points and vechicle names... that will help for downloading...

is there a way someway to compress/uncompress a string... so will be better for bandwidth... ? - That is an other question moving to right section...
https://www.b4x.com/android/forum/threads/b4x-way-to-compress-uncompress-a-string.104726/
 
Last edited:

udg

Expert
Licensed User
Longtime User
Did you consider the option to just show the cars available at the time of the request?
This, along with Manfred's suggestion to consider just those in your area, should reduce the clutter on the map

Another consideration. If you find useful to adopt cheap servers, you could split the burden of data management on more than one (eventually based on their physical location relative to customers). With this scheme you may want to have a single entry point for requests (I call it a dispatcher) which in turns sends messages to appropriate servers based on criteria like customer location, load balancing or whatever. You will be able to add, modify or cancel servers at any time whilst the main entry point server remains set. Users won't even note that you changes something behind the scene.
 

Magma

Expert
Licensed User
Longtime User
@udg about many vps: Already thought that... is an option... But this will be difficult for managing/supporting it + sometimes will not be reliable because of servers down... and ofcourse in that thought the central / sum calculation must be at an extra vps or server or a controller pc-app that will request data from other vps's....
 

udg

Expert
Licensed User
Longtime User
I agree, it's a complexity vs. flexibility matter.
Generally speaking, for large projects I (like you're doing) prefer to spend some extra time at the design board and even try to envision a larger plan than what it's really needed at that stage because I know that if things grow right I'll be on the winning path from the beginning.
Yes, often that means extra complexity in the initial stage of a (supposed) long live project but it generally repay for itself in the long run. Other times it result in a loss..
 

peacemaker

Expert
Licensed User
Longtime User
My experience:
1) Google maps works with thousands of markers much better (faster, smaller RAM usage)
2) There are commercial ready server solutions with API that can be licensed for your own server, and the mobile app clients for driver and customer are needed to develop only.
 

Kevin Hartin

Active Member
Licensed User
I have been asked about a similar type of app for use here in Samoa, with a Taxi fleet of about $2000 and a population of 200,000.

I have done a Touring app using OSMdroid and am comfortable that it can do the job, however I am in two minds about how to push the data updates from the server back to the clients.

I was thinking that a client (both driver and passenger) could periodically push their information up to a webservice and in response get updates of markers in a certain radius.

My Tour app has 250-300 markers created in no time at all, so I cant see an issue repainting all the markers rather than trying to update each one at a time.

Any Comments/ideas?

Kev
 

Kevin Hartin

Active Member
Licensed User
Magma,

The Driver and Passenger clients would periodically send their co-ordinates and ID to the server using a simple https POST to a web service, which would write to a MySQL database then query the same database and respond with a list of Driver and Passenger ID, co-ordinates and status data for a given radius, which I would then simply populate the map with appropriate markers.

To keep traffic to a minimum, the timing between updates will be adjusted differently for Driver and Passenger clients and also depending on their Status, with Free/Unallocated drivers updating more often than passengers, who tend to be static. Driver/Passenger pairing will also slow down the update frequency. The database will also look out for Driver/Passengers in very close proximity to change status and also pick up "off the books" activity.

Kev
 
Top