The World’s Leading Microsoft .NET Magazine
   
 
The .NET Addict's Blog

My Top Tags

                                                           

My RSS Feeds








Latest Diggs - Programming

Internet Blogs - Blog Top Sites

Site Hits

Total: 2,551,710
since: 19 Jan 2005

Peer Networking Series - Why Peer Networks Aren't Enough

posted Fri 16 May 08

In the past couple of posts on peer networking , I've been doing a lot of talking about how amazingly powerful peer networks are and how much more compelling your applications can be if you make them aware of their peers, whether those peers are other instances of the same app, or instances of a companion application elsewhere on the network. I've talked about the means by which you can peer-enable your applications: discovery and publication systems like Bonjour and PNRP and peer programming APIs like the WCF Peer Channel.  I have even talked briefly about sharing state in a peer network and I even have an upcoming MSDN Magazine article (July issue) on that very topic, which includes code samples.

What I haven't talked about is where peer network applications fall short. If you've been following along throughout the peer networking series, you might have noticed a potential use case/scenario that is very common but is completely ignored by all of the peer networking technology that I've discussed so far. Here is that scenario:

Let's say you have an application that allows you to track bank transactions. You want this application to also share those transactions with anybody else on the family's home network. This allows you to log all your receipts for the day and have them show up on your computer and anybody else's computer that is running the application. There are a lot of techniques to make this happen, and everything seems to be working great. Now picture this - you log into the application and log a few hundred dollars worth from your latest Best Buy spending spree. You shut your computer off. Your wife then logs into her version of the app and logs the expenses from her latest trip to Macy's and then shuts her computer off. The two of you go about this same behavior for the next week until finally your bank balance drops below 0 and a huge fight ensues.... Why? What happened? None of your transactions ever made it to your wife's application and none of hers ever made it to yours. This is the core limitation of peer networking technology for modern applications:

All pure peer networking architectures require that at some point, at least two peers be connected to the mesh at the same time for the application to work properly. Data cannot be synchronized and state cannot be shared when all nodes connect at different times and never speak to each other.

So when you're thinking about building your application and you're thinking about peer-enabling it, you absolutely, positively, must consider the scenario where for an extended period of time, no two nodes in your peer mesh are ever connected at the same time. If this has little to no impact on your application, then  you are safe using nothing but peer communication systems like the WCF PeerChannel. However, if this will break your application or cause a perceived failure on the part of the end user (or worse, a huge fight over money and bills!) then you need to build some kind of mechanism on top of the peer network that allows you to swap/share data even when the nodes in the mesh are never connected at the same time.

Is there a solution? What can you do about this? There are many solutions, most of which require a ridiculous amount of coding...but the solution I'm going to talk about in my next post is Live Mesh. See, you were wondering when I was going to get around to talking about Live Mesh... stay tuned!

tags:              

links: digg this    del.icio.us    technorati    reddit




Tag Related Posts

MobileMe vs. Live Mesh Throwdown - Round 1

Wed 16 Jul 08 10:33 A GMT-05

Peer Networking Series - What is PNRP?

Wed 30 Apr 08 2:59 P GMT-05

CLINQ v1 Demo - Network Message Filtering

Wed 09 Jan 08 7:47 P GMT-05
tags:        

Orcas' Hidden Gem - The managed PNRP stack

Fri 11 May 07 6:45 P GMT-05
tags:        

On MUDs

Thu 08 Mar 07 5:00 A GMT-05
tags:                    

What I think is a bug in WCF POX messaging

Thu 04 Jan 07 4:58 P GMT-05
tags:      

Ulysses Agenda Makes Redmond Developer News

Wed 29 Nov 06 7:10 P GMT-05
tags:                

Ulysses Agenda - Network Engine Test 1

Mon 09 Oct 06 2:26 A GMT-05
tags:              

Ulysses Agenda : First Cut Networking Design

Thu 14 Sep 06 12:46 A GMT-05
tags:                  

First Impressions of Windows Vista RC1

Thu 07 Sep 06 1:30 P GMT-05
tags:                      

.NET Framework 3.0 June CTP is out!

Fri 23 Jun 06 6:23 P GMT-05
tags:                

Tech-Ed 2006 - Session Reviews

Tue 13 Jun 06 6:22 P GMT-05
tags: