Remoting + compression + binaryformatter

Posts   
 
    
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 14-Aug-2007 12:03:08   

Hello,

Having read tons of threads on this forum about remoting, I decided to evaluate its potential for my own application. Using my llblgen project, I created a simple client-server-interface project and got it to work with a TCPchannel object.

Here's what it does: 1) The client call a remote function 2) The server queries the database 3) EntityCollections are sent to the client

I have read that it's possible to have big performance gains by using binaryformatters instead of XML and stream compression. Unfortunately, after half a day spent searching on google, I couldn't find how these features can be implemented in my code. So if someone has experience and could give me one hint or two, I would really appreciate.

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 14-Aug-2007 15:21:56   

Perhaps by using GenuineChannels http://www.genuinechannels.com/ (not free). You may also opt for WCF aka Indigo http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1520385&SiteID=1

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 14-Aug-2007 15:54:57   

This is build in (in v2.5, it's much much faster, and compression can be added).

Simply open a remote channel over TCP (not WCF, that's ALWAYS xml) and enable fast serialization (see Adapter section in manual) and you can add a compressor on top of it, to compress the byte array even more. simple_smile

Frans Bouma | Lead developer LLBLGen Pro
alexdresko
User
Posts: 336
Joined: 08-Jun-2004
# Posted on: 14-Aug-2007 17:40:19   

Otis wrote:

This is build in (in v2.5, it's much much faster, and compression can be added).

Simply open a remote channel over TCP (not WCF, that's ALWAYS xml) and enable fast serialization (see Adapter section in manual) and you can add a compressor on top of it, to compress the byte array even more. simple_smile

Man, it's been a long time since I've posted here.. might need to revive the TGIF post in a couple of days or something... simple_smile

Anyway, I might be misunderstanding you, Frans, but WCF isn't ALWAYS XML. There are many different bindings you can use, including binary.. AND you can layer compression on top of that.

WCF roxorz my soxorz..

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 14-Aug-2007 18:05:35   

Hehe, yeah ok it supports remoting, but that's basicly vanilla remoting as it is known in .NET 2.0, am I correct? As my understanding of the variety of new WCF channels is that it's all xml, or better: it always uses the XmlSerializer or friends, so it always bakes an xml packet. (but I might be seriously wrong here of course wink )

Anyway, the remoting stuff in v2.5 is a big BIG step forward simple_smile

Frans Bouma | Lead developer LLBLGen Pro
stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 14-Aug-2007 21:27:00   

Thanks Mihies and Otis, I've already noticed Genuine channels during my searches, of course I think it could do the trick and doesn't cost that much but I'd like to see what can be done with the standard .net functionalities before opting for a third party product.

Considering I'm working on a new app, perhaps I should not wait too much before switching to llblgen 2.5. I also tried webservices hosted on IIS, was impressed by their ease of use but everywhere on the net people are saying it's so much slower than remoting. I am confused about all this.

Good to hear that llblgen has new features that greatly improves serialization. I think it means that the amount of data sent over the wire is smaller, right? I'm currently using remote methods like

EntityCollection<ArticlesEntity> GetOrderArticles( OrderEntity order ) { (...) };

Should I rather work with byte arrays instead of concrete llblgen objects?

PS: I sincerely appreciate your help simple_smile

stefcl
User
Posts: 210
Joined: 23-Jun-2007
# Posted on: 14-Aug-2007 22:01:22   

Forgot to mention that: It's intended to be used over a 5000/500 WAN connection, not a gigabit LAN network.

mihies avatar
mihies
User
Posts: 800
Joined: 29-Jan-2006
# Posted on: 17-Aug-2007 10:48:28   

Otis wrote:

Hehe, yeah ok it supports remoting, but that's basicly vanilla remoting as it is known in .NET 2.0, am I correct? As my understanding of the variety of new WCF channels is that it's all xml, or better: it always uses the XmlSerializer or friends, so it always bakes an xml packet. (but I might be seriously wrong here of course wink )

From what I understand, WCF is totaly flexible and it produces whatever packets one wants. IOW it is certainly not limited to XML.