I use a webservice to pull some data from it everyday & update it on my MySQL database. I'll make around 600 calls to this service. The webservice response is very slow (takes around 30 minutes to complete 600 transactions) & during this time, the MySQL is also giving slow response which is affecting other DB operations.
So, I was thinking of an alternate way to store the data obtained from the webservice on filesystem or something temporarily & dump it all at once to database after completing 600 transactions instead of keeping the MySQL connection ON for 30mins.
Which is the best way to store this kind of data? Should I use filesystem or any caching mechanisms etc?
I was thinking of storing it as JSON like this:
{
"table_name": "webservice",
"entry": {
"a": [
"1",
"2",
"3"
],
"b": [
"1",
"2",
"3"
],
"c": [
"1",
"2",
"3"
]
},
"status": "OK"
}