I currently have 7 different data sources:
- 2 HTML websites,
- 2 stateless soap (xml/custom format),
- 3 TA based (basically plain text over socket communication).
I take the data from there, and when the user takes an action that needs to be synced there, I sent them data.
Each request gives 100-800Kb of data (but I do 900 of them), and after I parse that data, I end up with arrays of objects like this one:
Code:
$fare_tpl = array(
'id' => 0,
'airline' => 0,
'consolidator' => 0,
'cost' => 0,
'tax' => 0,
'adult_cost' => 0,
'adult_tax' => 0,
'child_cost' => 0,
'child_tax' => 0,
'infant_cost' => 0,
'infant_tax' => 0,
'flights' => array(),
'filters' => array(
'outbound_start_date' => 0,
'outbound_end_date' => 0,
'outbound_duration' => 0,
'outbound_stops' => 0,
'inbound_start_date' => 0,
'inbound_end_date' => 0,
'inbound_duration' => 0,
'inbound_stops' => 0,
'duration' => 0,
'stops' => 0,
'airline' => '',
'price' => 0,
),
);
// That's just a random object I got at the end of the line.
The one the workers return has about 100 fields per object, and each worker returns about 100 of these objects, each of these objects with about 100 different flight objects, each flight with 1 to 5 legs. (ex: $fare[0]->fights[24]->legs[outbound][1]->departure_time).
So each worker returns about 100KB to 500KB of json/serialized (it's gziped content so there's no problem for the network).
How long should it take to parse that json (encode/decode)?
Maybe I'm missing something stupid here...
Bookmarks