New answers tagged

0

I don't know what kind of objects you are serializing, but generally speaking, a binary serialization, combined with something like LZ4 compression, makes much more sense than JSON.


1

Have a look at the notion of composable hash functions. The idea is that you have some snippets and you want to do some of the hashing for each snippet and the combine the hash results. So, some hashing API's are designed to allow you to start the hash, then add more into the hash, then finish. This is useful in a number of situations, for one, when you ...


0

That's the problem with mutable objects, that they can mutate. Quite obviously, if you managed to correctly serialise the state that your object has right now, it won't be the state that your object will have two seconds from now. So having the serialised state not match the current state must be acceptable, otherwise you have lost. If the changes to ...


0

I realize that your question is specifically about serialization, but I think you may be trying to solve the wrong problem here. I suggest you to think about whether you have separated concerns correctly in your application design. It may make more sense to consider the serialized state of a media file as a composition of some unique ID and some possibly ...


0

So how to achieve that efficiently? You need to store a version of your serialized data. You should also write a migration logic in your serializer so that if it encounters old version of the data, it would call data-migrator for it after deserialization. After migration the data should be saved in a new format. You can upgrade versions of your data on ...



Top 50 recent answers are included