0

Assuming I am limited to .NET Framework 3.5 C# on the server side and GWT on the client side, what is your suggestion for the best/most efficiant way of communication + data transport protocol and why? e.g. JSON-RPC, XML-RPC, SOAP-WCF etc etc.

Shahid
  • 995
  • 3
  • 11
  • 24
  • Are you looking for the best one just out of curiosity, or you're looking for a good one for your use case? If it's the former, why don't you do a benchmark, and if it's the latter then how fast/efficient you need it to be to fulfill your requirements? – milan Jan 17 '12 at 11:42
  • I am looking for the best one in my case and I would like to choose the best combination in terms of scalability and application responsiveness. – Shahid Jan 17 '12 at 11:53
  • aha, good, you should edit the question and add this. why do you think communication protocol is the limiting factor when it comes to scalability and app. responsiveness in the first place? – milan Jan 17 '12 at 11:58
  • I may be wrong but I think the communication in combination with the data transfer protocol are the 2 major factors which would affect your application's responsiveness. for example if you choose JSON as compared to XML you may be considerably saving on the amount of data transfered per round trip. Similarly there may be reasons where if you use WCF-specific binary protocol with JSON or SOAP as compared to JSON-RPC or XML-RPC, that one would work out to be more efficiant than the other. Added the fact that I have both my server and client side platforms assumed. – Shahid Jan 17 '12 at 13:33
  • "assumption is the mother of all fu*kups" :) do you have any number to back up your claim? open firebug on few random websites and you'll see that it takes 2-4 sec to render the page (get all resources ...). and serialization you're talking about is measured in milliseconds. how do you explain this? – milan Jan 17 '12 at 13:43

2 Answers2

0

I think you answered your own question in your comment:

for example if you choose JSON as compared to XML you may be considerably saving on the amount of data transfered per round trip. Similarly there may be reasons where if you use WCF-specific binary protocol with JSON or SOAP as compared to JSON-RPC or XML-RPC, that one would work out to be more efficiant than the other.

There's no way to determine what is most efficient for your use case without knowing intricate details about your application. My assumption would be to use JSON-RPC, but again, there's no way to be sure without benchmarking.

(That being said, I'd avoid XML-RPC, if only for the considerable data transfer savings.)

Chris Cashwell
  • 22,308
  • 13
  • 63
  • 94
0

JSON-REST because JSON is native to javascript and is as such naturally supported on GWT. REST because .NET does not know GWT-RPC or RequestBuilder and REST is the next easiest way of accessing remote services in GWT.

On GWT side you can use gwt-rest-client.

Peter Knego
  • 79,991
  • 11
  • 123
  • 154