Help a beginner: Architecture of multiple connected Apps


I am about to work in a new project that is like an ‘Uber’ for shipping services. So I need to develop 3 apps: one for the driver, to transmit his GPS location, one for the client, to see the location emitted by his driver, and one for the administrator, he will be always able to see the location of all the drivers.
(If the client chooses so, more people will be able to know the location of his driver.)

How should the architecture look like?
Should I make 4 different apps (api/admin/driver/client)? or just 3 and integrate the API in the admin app?
The connection between those should be made with DPP ? If so,
Where do the Microservices (meteorhacks:cluster) help me?

Do you know about any packages that could help me with the real-time GPS info?



I would say you’re probably looking for something which is more “role-based”, which can all be run on a single application. Simply manage the views through publications and roles/groups.


Make functionality into various packages, core can be in all these 3 and you dont need DDP between applications, as all can nicely access MongoDB directly.
Microaservices means that even 1 of these app can be run as various group of packages interconnected using meteorhacks:cluster - so they discover each other using mongodb. There are DDP connections than, but kinda invisible for you, cluster take care of all.


I would at all costs try to do everything in one app for as long as possible. If you abstract things correctly breaking them up later will be a weekend chore.

That being said DDP is really nice to tie together a few apps. If there’s only one instance of each app then cluster is not required.

Splitting up makes it much harder to share code, especially since Meteor doesn’t have private packages. It’s also a hassle to start up 4 apps and then a central dev database.

However sometimes it makes sense to make Node easier to scale, like processing video or other long processes.

If you’re using mobile apps Cordova has a GPS location and the browser has one built in. Used with Mongo’s geospatial queries and debounce you can get a fairly quick and dirty GPS tracking going quickly.