Tuesday, July 12, 2011

Fuel and StOMP - Best of Both

Web sites with need for low latency and dominated by read requests, would benefit from Fuel's deserialization  performance. On the other hand, serialization can also be heavily used in operations like saving data to database, storing data to allow undo/rollback, copy of data, etc. So a framework that performs like StOMP for serialization would be good to have.

After seeing how StOMP is faster for serialization and Fuel is excels in deserialization, it is tempting to hope for the two projects to learn from each other. Could we get StOMP's fast serialization and Fuel's fast deserialization in a single serializer?

Without knowing the internals of the frameworks, my guess is that the format of the serialized data makes it hard to combine the need for speed in both serialization and deserialization. So the initial answer is "no, sorry!"

But... A partial solution would be to use an intermediate format for serialization. This format would support fast serialization, and therefore be similar to StOMP's format. The intermediate format would for example be used when a user needs to quickly commit changes to a database. Later, the intermediate format could be transformed to a format that is better optimized for deserialization. This transformation would typically be done as a background task. The deserializer would be able to (transparently) understand both the intermediate format and the optimized format.

Even if you do not get the best combined performance of StOMP and Fuel, systems with the need for low latency for both writes and reads, and a period of time between these operations, could benefit.

No comments: