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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Best way to sync data with JavaScript?

5 点作者 dcassiano超过 10 年前
We have a mobile app written on AngularJS - Phonegap&#x2F;Ionic-based, calling some REST APIs who store and process app&#x27;s data.<p>We&#x27;d like to store data locally and synchronise it later because we are having a lot of issues with internet connection on some regions.<p>So basically we&#x27;d like: Data -&gt; Local storage -&gt; {sync mechanism} -&gt; REST API -&gt; Database<p>We implemented something but it&#x27;s not working as well as we&#x27;d like.<p>Any ideas of architecture and&#x2F;or possible frameworks to solve this on a simple way?<p>Thanks!

2 条评论

jwflicker超过 10 年前
The IBM bluemix mobile data service sounds like a good match: <a href="https://www.ng.bluemix.net/docs/#services/mobiledata/index.html#gettingstarted" rel="nofollow">https:&#x2F;&#x2F;www.ng.bluemix.net&#x2F;docs&#x2F;#services&#x2F;mobiledata&#x2F;index.h...</a><p>&quot;With the Mobile Cloud Services SDK, you can embed a special managed directory in your application. Any files that are stored in this managed directory can be monitored and synchronized. The application can share the contents of this managed directory by connecting to Mobile Data with the same application ID and user ID. By sharing the directory contents, different instances of an application can have synchronized copies of the files&quot;
lightblade超过 10 年前
Well this is my opinion.<p>I always thought CouchDB offers a great RESTful interface to communicate with their database. CouchDB also offers great multi-master replication, this also includes your local data.<p>There is a JavaScript implementation of CouchDB&#x27;s data sync called PouchDB. I always thought it would be a great idea to just use CouchDB as your API layer. Anything your backend needs to do goes through Couch first and get synced to the client through Pouch.<p>I haven&#x27;t experimented on the idea yet, but maybe you can take it further.
评论 #8842674 未加载