TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Mobile-first” databases that sync to a central server?

8 点作者 saurabhnanda大约 4 年前
I keep hitting the following problem over &amp; over again:<p>- Build a mobile app (mostly some sort of CRM&#x2F;ERP kind of app), where ALL the features need to work offline - This means that all the data (for the currently logged-in user) needs to reside on the mobile device. - This also means that any CRUD operation needs to hit the local data-store first, and should be synced in the background with a remote data-store. - This also means that if the user signs into another mobile device, a relevant subset of the remote datastore should be &quot;restored&quot; on the mobile device. - Probably a few other subtleties that I haven&#x27;t thought through yet.<p>Is there any stable&#x2F;production-grade DB that solves this problem? Bonus points if it&#x27;s an RDBMS, because building reports for a CRM&#x2F;ERP is 10x easier on top of an RDBMS vs a document&#x2F;JSON DB.

8 条评论

gt565k大约 4 年前
Sybase MobiLink does this. It has a central sync server that manages syncing data between a RDBMS and the phone&#x27;s database. It got bought by SAP and might have been deprecated.<p><a href="https:&#x2F;&#x2F;help.sap.com&#x2F;viewer&#x2F;4949f39728bd400ebee2fb94687cc74f&#x2F;17.0&#x2F;en-US&#x2F;81cb5d6a6ce21014afd7b01bc41d7276.html" rel="nofollow">https:&#x2F;&#x2F;help.sap.com&#x2F;viewer&#x2F;4949f39728bd400ebee2fb94687cc74f...</a>
评论 #26407982 未加载
auganov大约 4 年前
I&#x27;ve worked on (and actively promoted) products in this space but nowadays I&#x27;m rather disillusioned with the dream of effortless sync. It works pretty well in dev. But once you have to deal with aggregations and security it all falls apart. You end up having to reinvent a regular backend in a very convoluted way on top of a second-rate db. It&#x27;s like all the problems with ORM but on steroids.
simplerman大约 4 年前
I tried to build this for my MVP which was also CRM. I stopped for other reasons, but this is how I was doing:<p>1. Store data locally in SQLite.<p>2. Export from DB to JSON string.<p>3. Encrypt JSON with in memory password.<p>4. Save encrypted string on backend server running Laravel and MySQL.<p>Basically, I provided backend only for sync functionality. And I liked that data was encrypted on client, so I had less liability.
LarryMade2大约 4 年前
I&#x27;ve done one with a LAMP stack on android with a distributed DB setup you got the varsatility of PHP and all the libraries you need. The challenge is if you want the client not to have local code.data access and to have confident security setup for updating from a remote app to the server.
steerpike大约 4 年前
I&#x27;ve tried to find something similar and as far as I can tell the best current candidate available is pouchdb syncing to a couchdb instance.<p>If offline first isn&#x27;t a must have and you&#x27;re ok supporting &#x27;intermittent offline&#x27; then Firestore with offline enabled is probably your simplest option
UK-Al05大约 4 年前
I don&#x27;t know but you would have to work out how to resolve conflicts as well. So you would need something like a version vector or vector clock.
avinassh大约 4 年前
Have you looked into Realm? It might fit your use case<p>[0] - <a href="https:&#x2F;&#x2F;realm.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;realm.io&#x2F;</a>
jsilence大约 4 年前
also interested in this with a different use-case. We&#x27;d like to have agricultural applications &#x27;offline first&#x27; so that they always work no matter whether connectivity is there or not.