rbkit
rbkit copied to clipboard
Message aggregator should prepare a string dictionary and send that as a message over to the client
Whenever strings are encountered, we should put that into a dictionary, basically a hash that looks like :
{ 1 => 'MyClass', 2 => 'my_method', 3 => 'String' }
This could be sent to the client when a message batch is dispatched. The client will need to keep referring this reconstruct strings in the UI. This is going to bring down our network cost by a lot, I have not measured how much yet.
I am thinking of adding a separate event type called dictionary
or something with the following format :
{
timestamp: <timestamp in ms>,
event_type: 'dictionary',
correlation_id: <id indicating event this message is part of>,
complete_message_count: <total number of messages this event is split into>
payload: {
<unsigned long number>: <string>,
...
}
}