从MySQL服务器数据的访问和存储大量 [英] Access and store large amount of data from mysql server

查看:185
本文介绍了从MySQL服务器数据的访问和存储大量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发其从服务器下载大量数据的的iOS / 的Andr​​oid 应用程序。

We are developing an iOS/Android application which downloads large amounts of data from a server.

我们正在使用 JSON 在服务器和客户端设备之间传输数据。

We're using JSON to transfer data between the server and client devices.

最近我们的数据的大小增加了不少(约30000条记录)。

Recently the size of our data increased a lot (about 30000 records).

在获取这个数据,服务器请求被超时而没有数据得到牵强。

When fetching this data, the server request gets timed out and no data gets fetched.

任何人都可以建议最好的方式来实现数据的快速传输?

Can anyone suggest the best method to achieve a fast transfer of data?

有没有后开始prepare数据和下载数据的任何方法?

Is there any method to prepare data initially and download data later?

有没有在设备中使用多个数据库(的SQLite DBS)和执行并行插入到数据库的?

Is there any advantage of using multiple databases in the device(SQLite dbS) and perform parallel insertion into db's?

目前我们正在下载/上传不仅改变了数据(使用 UUID 和时间戳)。

Currently we are downloading/uploading only changed data (using UUID and time-stamp).

有没有实现这一点的最佳方法有效?

Is there any best approach to achieve this efficiently?

---- -----编辑

---- Edit -----

我认为它不仅记录mysql的问题,在高峰时期多个设备连接到服务器来访问数据,因此连接也去等待。我们使用的是高性能服务器。我主要是寻找一个解决方案的设备来处理此同步。有什么好的方法来简化同步,或使其更快使用多线程,多sqlite的分贝等...?或数据通信pression,使用视图还是...?

i think its not only the problem of mysql records, at peak times multiple devices are connecting to the server to access data, so connections also goes to waiting. we are using performance server. i am mainly looking for a solution to handle this sync in device. any good method to simplify the sync or make it faster using multi threading, multiple sqlite db etc,...? or data compression, using views or ...?

推荐答案

一个很好的方式实现这一目标很可能是在所有下载任何数据。

A good way to achieve this would probably be to download no data at all.

我想你也不会显示这些30K线在你的客户,那么,为什么在第一时间下载它们?

I guess you won't be showing these 30k lines at your client, so why download them in the first place?

这可能会更好,以在服务器上创建一个API,这将有助于移动设备与数据库进行沟通,使客户只下载他们实际需要/想要的数据。

It would probably be better to create an API on your server which would help the mobile devices to communicate with the database so the clients would only download the data they actually need / want.

然后,在移动端的高速缓存系统,你可以让自己确保客户端不会下载同样的事情,每一次,他们已经看到了将可脱机内容。

Then, with a cache system on the mobile side you could make yourself sure that clients won't download the same thing every time and that content they have already seen would be available off-line.

这篇关于从MySQL服务器数据的访问和存储大量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆