background preloader

Wcf

Facebook Twitter

WCF P2P: How To Design State Sharing in a Peer Network. How To Design State Sharing In A Peer Network Kevin Hoffman In recent years, people have started to discover the amazing power and functionality that can be provided by an application that communicates over a peer network.

WCF P2P: How To Design State Sharing in a Peer Network

So-called peer applications cover the gamut from simple file sharing to instant messaging (IM) to full-on collaborative applications such as shared white boarding, Voice over IP (VoIP) calling and conferencing, social networking, and much more. Think about how your Xbox 360® automatically detects the presence of another computer running Windows Media® Center and can immediately begin sharing audio and video with that computer, allowing you to play music from your computer on your Xbox®. Wouldn't it be great if business applications sported the same kind of peer awareness and capability? This article is all about peer-enabling business applications by allowing them to share state in a serverless peer network. Fixed State Server Transient Elected State Server. Protobuf-net - Project Hosting on Google Code. Introduction protocol buffers is the name of the binary serialization format used by Google for much of their data communications. It is designed to be: small in size - efficient data storage (far smaller than xml) cheap to process - both at the client and server platform independent - portable between different programming architectures extensible - to add new data to old messages protobuf-net is a .NET implementation of this, allowing you to serialize your .NET objects efficiently and easily.

It is compatible with most of the .NET family, including .NET 2.0/3.0/3.5, .NET CF 2.0/3.5, Mono 2.x, Silverlight 2, etc. The short version (see also the old home page) Serialization is a pain. protobuf-net is designed to be easily used on your existing code with minimal changes (of from an optional .proto schema), enabling fast and portable binary serialization on a wide range of .NET platforms. // write to a fileSerializer.Serialize(outputStream, person); "v2" released.

Creating high performance WCF services - Scott Weinstein on .Net, Linq, PowerShell, WPF, and WCF. I had a WCF service where I wanted to be able to support over a hundred concurrent users, and while most of the service methods had small payloads which returned quickly, the startup sequence needed to pull down 200,000 records.

Creating high performance WCF services - Scott Weinstein on .Net, Linq, PowerShell, WPF, and WCF

The out of the box WCF service had no ability to support this scenario, but with some effort I was able to squeeze orders of magnitude performance increases out of the service and hit the performance goal. Initially performance was abysmal and there was talk of ditching WCF entirely ( and as the one pushing WCF technology on the project this didn't seem like a career enhancing change ) Here's how performance was optimized. These are listed in the order they were implemented. Some are fairly obvious, others took some time to discover. [OperationContract] Byte[] GetData( and the implementation to var bf = new BinaryFormatter(); using (var ms = new MemoryStream()) { bf.Serialize(ms, groupeList); // and best to cache it too return ms.GetBuffer(); }