[SERVER-1838] Any chance of building a mobile server or client libraries that run on mobile platforms (iPhone and Android). Created: 23/Sep/10  Updated: 08/Nov/18  Resolved: 08/Nov/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Ajai Khattri Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 23
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

iOS 4.x and Android 2.x.


Issue Links:
Depends
Duplicate
is duplicated by SERVER-6756 Low memory, small instance of MondoDB... Closed
Sprint: Dev Tools 2018-11-19
Participants:

 Description   

CouchDB now have a mobile version that runs on Android. It would be really nice to see the MongoDB also produce a small footprint mobile version for these kinds of devices.

CouchDB Mobile page:
http://www.couch.io/android



 Comments   
Comment by Andrew Morrow (Inactive) [ 08/Nov/18 ]

eno -

I'm pleased to announce that MongoDB Mobile is now generally available, so I am closing this ticket.

Documentation on MongoDB Mobile is available here: https://docs.mongodb.com/stitch/mongodb/mobile-overview/

Comment by Andrew Morrow (Inactive) [ 01/Jul/18 ]

I am very pleased to update this rather venerable ticket with the following exciting news: a beta version of MongoDB targeting iOS and Android was announced last week at MongoDB World 2018.

Please visit https://www.mongodb.com/products/mobile for additional information on MongoDB Mobile and the associated beta program.

We will keep this ticket open until MongoDB Mobile exits beta and is made generally available.

Comment by Ajai Khattri [ 07/Oct/14 ]

Interesting to note that as well as Couchbase, there is now another lightweight mobile database available for both iOS and Android: Realm (http://realm.io/). They are working on a server-side component too.

Comment by emre durmus [ 22/May/14 ]

Using mongodb as local database in android would be great.

Comment by Roland Kargl [ 05/Jun/13 ]

I would really appreciate a small mobile version to create some offline functionality.
In my use case data is geospatial and user are mostly interested in localized parts of the data.

Comment by Wilson Júnior [ 08/Aug/11 ]

I'm looking forward to a successful build

Comment by dmytty [ 07/Jul/11 ]

To compile for ARM, follow steps here: https://jira.mongodb.org/browse/SERVER-2883

Confirmed working on Pandaboard as mentioned here by T. Robinson:

I've built it on a Pandaboard using the latest Ubuntu natty packages from Linaro. You have to make sure to install the xulrunner-1.9.2-dev package, and remove xulrunner-2.0 if present (bug 2683). (Alternatively, you can use the v8 JS engine instead.) ( http://www.howsthe.com/blog/2010/feb/22/mongodb-and-v8/ )
From there, it's as simple as applying my patch for SERVER-2883 (patch -p0 -i ~/mongodb-bson-oid.patch) and running 'scons all'. I last did this about a month ago, but I just pulled the latest trunk from github, and it seems to be rebuilding nicely.

To clarify...Xulrunner / v8 javascript engines are necessary as MongoDB uses javascript for queries.

Xulrunner code should be available somewhere given that there's an Android port of Mozilla's 'Fennec' mobile browser. However, for Android it's .probably
easier to simply build against the static v8 library under Android NDK (note: v8 has been included in Android since Android 2.2)

building mongodb with v8 ... http://groups.google.com/group/mongodb-user/browse_thread/thread/d28b6316a3a526e8
building v8 for android ... http://groups.google.com/group/android-ndk/browse_thread/thread/898de0d0303143fb/ea7485579746ac95

Comment by Romain Griffiths [ 01/Jul/11 ]

Any news on successful compilation ?

Comment by Eric Mill [ 11/Jan/11 ]

Oh also, the latest version of the Android NDK provides STL support:
http://developer.android.com/sdk/ndk/index.html

"Provides a default C++ STL implementation (based on STLport) as a helper module. It can be used either as a static or shared library (details and usage examples are in sources/android/stlport/README). Prebuilt binaries for STLport (static or shared) and GNU libstdc++ (static only) are also provided if you choose to compile against those libraries instead of the default C++ STL implementation. C++ Exceptions and RTTI are not supported in the default STL implementation. For more information, see docs/CPLUSPLUS-SUPPORT.HTML."

Comment by Eric Mill [ 11/Jan/11 ]

As an Android dev (and a MongoDB fan for my web work) I would be all over this for my Android apps if there was an embedded mongodb. SQLite is quite slow and unwieldy by comparison.

Comment by Ajai Khattri [ 23/Sep/10 ]

The problem is not Android - the problem is support in NDK. Even the latest NDK doesn't have STL support.

Comment by Eliot Horowitz (Inactive) [ 23/Sep/10 ]

The server is all c++.
I think newer android versions have full c++ support.

Comment by Ajai Khattri [ 23/Sep/10 ]

I assumed the server was implemented in C++ right? Or is there a Java port of the server?

Right now running C++ code on Android can be a little problematic - the Android NDK allows you to build native binaries from C/C++ source but the C runtime is very limited. For example, there's no STL available. We have managed to get round this problem for some other libraries by patching the missing features into the NDK and then building the library.

Once the library is built, Android apps can use a JNI layer to talk to it. I might be interested in helping out and/or testing.

Comment by Eliot Horowitz (Inactive) [ 23/Sep/10 ]

An embedded version is something we would like to do at some point.

Would be curious to know what happened if someone tried to run the current version on android without and mods

Generated at Thu Feb 08 02:58:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.