Print Page | Close Window

Different transport protocol

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3265
Printed Date: 13-May-2026 at 10:48am


Topic: Different transport protocol
Posted By: katit
Subject: Different transport protocol
Date Posted: 14-Feb-2012 at 6:48pm
This is half question and half suggestion
 
Since you released Fiddler plug in I looked around on how data transferred from client to server and back.
 
Have you thought about using google's protobuf for this? It would be faster than XML and payload will be much smaller.
Maybe as an option?
 
Thanks!



Replies:
Posted By: kimj
Date Posted: 15-Feb-2012 at 8:47am
Hi katit,
 
We haven't yet looked at using Google Protocol Buffers.  DevForce communications are built on a WCF stack, so we'd want to use something like protobuf-net or build some custom serializers and behaviors of our own to use protobuf.   DevForce currently uses the DataContractSerializer and a custom message encoder to compress binary data, but we are aware of the size of messages and that there's certainly room for optimization. 
 
Since the WCF stack can be customized in DevForce via configuration or code, you might be able to use protobuf-net today.  It would require specifying the binding and behaviors wanted to turn off DevForce defaults, and also possibly additional attribute markup with either Code First or customized T4 templates.  It would require some work, but could be worth it.
 
Thanks for the suggestion.  Since we're moving to more fully support a broader array of client types, we are also looking at how to use more lightweight communications.
 


Posted By: katit
Date Posted: 15-Feb-2012 at 9:02am
I checked around and protobuf-net still in beta also many people are using it already. There is some attempts (also I didn't find any solid examples) on replacing DataContractSerializer with protobuf. So, there is definitely some work in this area. One thing for sure - just config won't work as protobuf requires custom attributes on serialized objects.
 
In your case you can even try JSON - there is built-in serializer already and performance/payload much better than of XML
 
Will try it with my own REST services first and if works will try your suggestion on changing configuration.
 
I just released v1 of my app with Silverlight and was surprised how fast it is working online (not intranet). I can just imaging how it is going to be with smaller payload.


Posted By: kimj
Date Posted: 15-Feb-2012 at 10:23am
That's great that you're seeing good performance with your v1 release! 
 
We have looked at JSON, specifically JSON.NET since it handles object graphs with cyclic references.  Part of the issue with our message payload is that the query expressions we serialize to the server are very, very complex; returned results usually less so, depending on the data retrieved.  In general, though, streamlining the payload is the first step, and will make using other serializers easier.
 
If you get a chance to try protobuf-net, let us know how it turns out.



Print Page | Close Window