Using REST service |
Hi everyone! I have question not quality related within CI except only that it'll be implement by using CI
I need to use REST from some data soccer provider and do some search, calculatings and so on with resieved data So I am thinking, do I need calls every time for data with REST or maybe create my own base and fill it for example one per day at night with REST data? would be the best choice? Pros I will have all data in my base and could fast calculate and search some values by searching any parameters I have Cons It will be very huge database and everyday I need to refresh all related soccer data in it by REST calls pros and cons only that i thinking and mb I am wrong Maybe REST excatly for porpose to recieve data and not for getting and store in my base - because if I will do this then we will have actualy two bases - one mine and other in data soccer provider So what u advice me guys from architectural view? Maybe u could advice to read me some books or tutorials for this topic? Any help will come in handy!!!
In my point of view, it'll depend on the frequency the data is updated on the soccer data provider. Does it update all their records everyday, once a day or the data has a process plan and stops there (i.e. after the match is done, the info stored is final).
Anyway, I'll be playing safe and advise to store the info on your database server and save the processed data in cache. This way, you save on time with the rest calls and save even more time showing pre-processed data via your favourite cache driver.
Best regards,
José Postiga Senior Backend Developer (01-26-2016, 08:12 AM)josepostiga Wrote: In my point of view, it'll depend on the frequency the data is updated on the soccer data provider. Does it update all their records everyday, once a day or the data has a process plan and stops there (i.e. after the match is done, the info stored is final). Many thanks for advice! That data in webservice updates for example after each game, so from this point of view, very often
I understand. But I think that after the game ends, the info won't be updated anymore. Am I correct? If so, then you can skip those records. Maybe check the last record updated and start from that row forward?
I'm speaking in an abstract way because I have no reference of the service in question but I think it should be in between those lines of thinking.
Best regards,
José Postiga Senior Backend Developer (01-26-2016, 08:59 AM)josepostiga Wrote: I understand. But I think that after the game ends, the info won't be updated anymore. Am I correct? If so, then you can skip those records. Maybe check the last record updated and start from that row forward? Data could be change by EVENT, for example - games. Data about many championships in many countries. I agree that would be good to change only that records of data which was updated but its only real if i already will have my database But I starting from that I have nothing and I need to fill my local DB, so this is one of problem, cause I need to insert all records from statr or what Thats I thinking about getting only via REST and mybe only cache requests by some identificator. Anyway, any help or advices very helpful!
(01-26-2016, 09:08 AM)scion Wrote: Thats I thinking about getting only via REST and mybe only cache requests by some identificator. Anyway, any help or advices very helpful! That might work well. I don't think you'll have any problem with using only REST calls. Also, you might be able to limit the number of records to process for each request. Like a limit parameter to avoid too much information being requested on a single call. That and a smart use of cache would be an interesting solution.
Best regards,
José Postiga Senior Backend Developer |
Welcome Guest, Not a member yet? Register Sign In |