How to write a Meteor database from an external application?

I'm trying to figure out how to embed data in the Meteor mongodb database from an external native mobile application that I am writing (in particular, for iOS using Cinder, right now). I would like the events that occurred in the application for mobile devices to be recorded in my Meteor application database, so that it can be immediately displayed in a browser in another place.

It is important to note that I need to stay in my native application on my mobile device - I cannot launch the browser. I'm a little new to Meteor, so I apologize if I miss something obvious.

Any ideas on how to do this? Thanks!

+7
source share
3 answers

It’s best to use an iOS DDP client like this one . You can use this client from an existing iOS application and subscribe and write back to data in your Meteor ecosystem.

DDP stands for Distributed Data Protocol and is the author of the Meteor group as an external standard for real-time applications. This is a much preferred method than directly linking to the database, as you can use publish and subscribe in the Meteor ecosystem.

The protocol is undergoing rapid development.

I believe that a release will be released soon that talks about the current state of DDP and the evolution of its official specification. An official specification is planned for version 1.0 .

Note: The following is an excellent overview of the DDP video in its current form.

+3
source

Another option is to write the iOS application directly to the MongoDB instance used by your Meteor application. You can use any MongoDB driver, for example NuMongoDB . The meteor exchanges MongoDB databases monthly every ten seconds, so Internet users will automatically see updates, albeit with a slight lag.

DDP is developing rapidly, as Tim said, so this option can be a little more stable.

In terms of hosting for scalability, I recommend separating the MongoDB instance from the free meteor.com website using a Mongolian host such as MongoHQ.

+3
source

What about other cases? I mean browser applications?

0
source

All Articles