Recommended way for 2 Meteor apps to communicate?


#1

I have a requirement where there are 2 separate apps. One is a very simple landing page on a domain which just has a simple form that a user can submit.

And the other site is where the major part of the logic lies and this would have account management and the other regular parts of an app.

However, my requirement is that when the form is submitted in the first app, the second app should perform some action based on it (Like send out emails, inform the relevant user, etc).

What is the best way to get the form-submission details on the first app to the second app? I was thinking of maybe making both the apps share the same mongodb instance? This way, the second app can have access to the Form collection.

Or should I use some kind of communication method between the 2 separate apps? I think setting up DDP message transfer would be an overkill for a simple form submission data.


#2

I’ve used mongo as an integration between apps. Works very nicely.


#3

Great. I think I will go with that option. Thanks.


#4

How would you do that exactly?


#5

its almost trivial, you just point both apps at the same database. For what I was doing, there’s a website (http://snackle.me/ ) that’s a platform for advertising agencies to run campaigns. Then did a custom competition app for a local bus company. It just hooked into the same db, the competition app pushed docs for entries to the competition and survey informations, then the snackle site used that to pull analytics data to show how the competition and survey questions were going.


#6

Not sure if this is overkill for these purposes, but I’ve used Amazon SQS to communicate with several micro services. The zacharynevin:aws-publish-subscribe package works pretty great for setting this up.