
Ask HN: Best way to build a backend shared by iOS, Android and the Web? - raphaelj
Hey guys,<p>With Parse closing down, we are looking at reorganizing how our apps and web apps are interacting with our database&#x2F;backend, but we are facing major difficulties with all the solutions we can think of.<p>Currently, our mobile apps are recording health related data, that are synchronized to the cloud with Parse. We also have analytic tools and web apps, written in Python, that are fetching data from Parse.<p>We like Parse because it does all the synchronization and authentication in the mobile apps for us, and that has been really useful to develop our MVP. However:<p>- it&#x27;s impossible to make any complex queries (you better download all the database locally if you want to do any advanced computation on the data). We are not that much into the NoSQL hype, and we really enjoy the power that the SQL language provides. We also like schema&#x27;s.<p>- Parse doesn&#x27;t have transactions.<p>- how Parse handle permissions does not satisfy us.<p>- using Parse from Python is not really easy.<p>So now, we thought of several architectures for our backend, but we are having a hard time to determine which one to choose:<p>1. using Google Firebase instead of Parse. We&#x27;ll keep our mobile apps as simple as today, but it does not solve most of the issues we currently have with Parse. Also, Firebase support for Python seems to be very poor.<p>2. create our own REST web-service for the mobile apps, backed by a PostgreSQL database. This solves all the problems we currently have, and it&#x27;ll make it easier for us to write the web apps (a simple ORM that queries the database). However, this requires a significant amount of work on the mobile apps on the authentication and synchronization logic, times two (one for iOS and one for Android).<p>3. same as (2.), but we try to share our business logic between the iOS and Android apps using C++. Dropbox seems to do it this way.<p>I&#x27;d like to hear what you guys think about that. I&#x27;m pretty sure that we are not the first team to face these issues.
======
wayneacarter
[Architect from Couchbase]

You may want to take a look at Couchbase Mobile and see if it meets your
needs. It has an embedded database, synchronization, user/role based security,
and secure REST/Stream/Batch APIs.

[http://developer.couchbase.com/mobile](http://developer.couchbase.com/mobile)

------
jsemrau
We at tenqyu went for option 2 back in the day and are so far quite happy with
it. We operate on a php api REST layer on top of a memcached MySQL cluster. We
use python for a lot of maintenance tasks. So far it scales well and handles
unicode well. (Singapore-based with most users in Asia)

~~~
raphaelj
Thanks for the answer.

We think that we will have to move toward this kind of architecture at some
point. But the time we have at this stage is very valuable, and we don't know
is it's a good idea to move there now.

------
dazmiller
Check out Dreamfactory.
[https://www.dreamfactory.com/](https://www.dreamfactory.com/)

Really helps with your option 2

