MessagePack
#2903
Replies: 1 comment
-
I am unfamiliar with MessagePack. Prior to CSLA 6, any serializer that was compatible with BinaryFormatter was an option - as long as the serializer honored the BinaryFormatter attributes, interfaces, and semantic behaviors it would work. With CSLA 6, because Microsoft has deprecated BinaryFormatter, we've made no attempt to ensure that something like BinaryFormatter continues to work. However, I did fix some bugs that prevented the use of other custom serializers, so it should be possible to create and use a custom serializer as long as it mirrors MobileFormatter, or (probably) works like BinaryFormatter semantically. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a possibility to use MessagePack for serialization? I tried using it out of the box, but then I believe the only way to do it is to write a custom formatter for MessagePack that works like the MobileFormatter. However then I think about the MobileFormatter would perhaps be able use MesssagePack instead of BinaryFormatter?
A bit of insight: We wrote an API around our business layer where the API has Patch methods to update properties, let business rules run and then returns a response with the updated properties. However the patch methods are not at full speed, they take between 300 and 500 ms even for simple property updates.
One of the bottlenecks is that we are caching our full blown businessobject in Redis. Performance profiling and benchmarking tells me that the serialization using the MobileFormatter is between 15 ms and 17 ms and the deserialization using the MobileFormatter is between 47 ms and 56 ms on my machine, but on my machine a patch request is around 150 ms, so 30% of the time goes into deserializing from cache.
I tried to use memorycaching, but that is not distributed and using affinity cookies or something alike has disadvantages as well.
Beta Was this translation helpful? Give feedback.
All reactions