Server B makes a HTTP POST request to Server A and A returns the results of a mysql query.
At first I simply fetched the results via PDO and brought them into JSON format. Server B did a simple json_decode()
then.
But sometimes millions of rows need to be transfered, so the JSON overhead blew up the response data size.
I'm about to format the query results to csv, send them to B and turn them into an array of objects again.
My question: Is that a practical way? Why does no one else seem to prefer a solution like this? I'm surely not the only one who's trying to solve that problem.