High performance serialization: Java vs Google Protocol Buffers vs …?

前端 未结 7 1271
借酒劲吻你
借酒劲吻你 2020-12-04 08:05

For some caching I\'m thinking of doing for an upcoming project, I\'ve been thinking about Java serialization. Namely, should it be used?

Now I\'ve previously writt

7条回答
  •  悲&欢浪女
    2020-12-04 08:26

    What do you means by high performance? If you want milli-second serialization, I suggest you use the serialization approach which is simplest. If you want sub milli-second you are likely to need a binary format. If you want much below 10 micro-seconds you are likely to need a custom serialization.

    I haven't seen many benchmarks for serialization/deserialization but few support less that 200 micro-seconds for serialization/deserialization.

    Platform independent formats come at a cost (in effort on your part and latency) you may have to decide whether you want performance or platform independence. However, there is no reason you cannot have both as a configuration option which you switch between as required.

提交回复
热议问题