[英]Importing large data by API
I am trying to develop a system in which I will sync my database with 3-Party database by provided API. 我正在尝试开发一个系统,我将通过提供的API将我的数据库与3方数据库同步。 The API has format in which we can provide From-Date and To-Date
API具有我们可以提供From-Date和To-Date的格式
Problems 问题
Note : As per the previous requirement i Have already developed the system in which i can Specify the From-Date and To-Date the record get updated (its completed with the GUI no ajax was uses). 注意:根据之前的要求,我已经开发了一个系统,我可以在其中指定记录的日期和日期更新(使用GUI完成,没有使用ajax)。 and even if I request 1 day records the system get time out error.
即使我要求1天的记录,系统也会出现超时错误。
NOTE 2 : I really should no say but the client is too strict (DUMB);( he just need the solution nothing else will do 注2:我真的不应该说,但客户端太严格(DUMB);(他只需要解决方案别的什么都不会做
Assuming that the data doesn't need to be "fresh" can you not write a process to run hourly / nightly fetching that days worth of data and processing it into your DB? 假设数据不需要“新鲜”,您是否可以编写一个进程来每小时/每晚运行那些数据并将其处理到数据库中?
Obviously this would only work if you're sure previous records are not updated? 显然,这只有在您确定以前的记录未更新时才有效吗?
Does the API provide batches? API是否提供批次?
Why did you you choose a web client with Ajax to process this data? 为什么选择使用Ajax的Web客户端来处理这些数据? Would a windows / console application be better suited?
Windows /控制台应用程序会更适合吗?
If the data is too big to retrieve by any given query, you're just going to have to do it by ID. 如果数据太大而无法通过任何给定的查询进行检索,那么您只需通过ID进行检索即可。 Figure out a good size (100 records? 250?), and just spin through every record in the system by groups of that size.
找出一个好的大小(100条记录?250?),然后按该大小的组旋转系统中的每条记录。
You didn't say if you're pulling down data, pushing up data, or both. 你没有说你是在拉下数据,推高数据,还是两者兼而有之。 If you're only pulling it down, then that's the best you can do, and it will get slower and slower as more records are added.
如果你只是把它拉下来,那么这是你能做的最好的,随着更多记录的增加,它会越来越慢。 If you're only pushing it, then you can track a "pushed date".
如果您只是推动它,那么您可以跟踪“推送日期”。 If it's both, how do you resolve conflicts?
如果是两者,你如何解决冲突?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.