New mobile serializer and compression

New mobile serializer and compression

Old forum URL:

bdeluard posted on Wednesday, August 01, 2012


I’m developing a big app with CSLA.Net, based on all the good ideas in the ebooks serie.

At first, I had not integrated the compression with SL client. With data more than 5Mb, I received errors (server not found) indicating (with WCF tracing) a possible network error or invalid data….

I had also an error (the same server not found) at the very first CSLA call to the server from SL client, only when WCF CSLA service was called the first time : if I do the call a second time just after the error of the first, it completes correctly. A little mysterious!

I saw that there was a better mobile serializer in the 4.3.13 release and I updated all my projects to use it, and modified WCF service web.config and initialization of the SL data portal in the client app.

All the tests who fail as indicated runs now correctly! I’m very happy J

My question is simple: is it now always necessary to use the compression with my SL client app to reduce the traffic and transfer time ? And, if yes, can I follow instructions in the data portal ebook or have I to modify something due to the presence of the new serializers?

Thanks for your answer.


RockfordLhotka replied on Wednesday, August 01, 2012

In 4.3 Sergey did a lot of work on the MobileFormatter to enable it to create a much smaller byte stream for serialized data. Depending on your object graph, it can reduce the size of the byte stream by around 70% - which isn't far off what you'd get by using compression.

You can still use compression along with the new serializer enhancements to get some savings on byte stream size, but it won't make nearly as big a difference as with the older serialization scheme.

My recommendation is to only use compression if necessary, because it incurs CPU overhead on client and server, so it may or may not add real value to your app.

bdeluard replied on Wednesday, August 01, 2012

Ok Rocky, I will follow your advice.

Thanks for your quick answer.


Copyright (c) Marimer LLC