all groups > dotnet distributed apps > may 2007 >
You're in the

dotnet distributed apps

group:

WCF using MVC/Observer Pattern


WCF using MVC/Observer Pattern BogeyGolf
5/24/2007 7:34:01 AM
dotnet distributed apps:
Sorry for the cross-post, but It was needed to get an MVP to answer/manage.
The other post is in framework.remoting.

I could really use some help on this one.
Last year I developed a “Device Manager” application that managed the
configuration of devices mounted in a 19” equipment rack. This application
is a standalone Windows Forms app written in C# that uses Binary
Serialization for persistence and an Observer/MVC design for the User
Interface. In other words, on startup the entire Object Model of entity
objects is created from the binary file (like an in-memory OO database) then
the View/UI subscribes to this model so that any changes are displayed. This
application works really well.

Now I need to enhance this design to support about 5 clients. The clients
and server will be Windows Forms apps on the same LAN. This is an obvious
candidate for .Net Remoting or WCF(TCP Binding). I want the clients to
behave just like the standalone UI did (i.e. Observer/MVC).

What is the best way to go about distributing these entity objects to all of
the clients and synchronizing among them? The entity objects will need to be
Singleton objects on the server. Would WCF callbacks work here? These
clients need the ability to CRUD these server objects, so I will need to do
some sort of object locking. These sever objects are fairly light, but do
have many levels of composition (e.g. a room has racks which has card cages
which has slots which has devices etc.). All of this object composition
results in many collections. Will WCF support passing collections between
client and server? I may also want a PeerChannel so that I can multicast
status to all clients.

Any comments, examples, or references will be greatly appreciated.

RE: WCF using MVC/Observer Pattern BogeyGolf
5/25/2007 5:34:00 AM
This newsgroup appears to be dead, is anyone home?

Originally, I was planning to use a conventional client-server approach and
distribute the Singleton server objects to clients by reference (MBR).
However, the more I think about it, this approach will be very chatty, slow,
and won't scale.

My current idea is to do the following:

Have each client maintain its own copy of the shared entity objects. When a
client wants to make a change (e.g. CRUD), it requests a lock on the
object(s), makes the change, serializes the object(s) and multicasts to the
other clients. I will have to deal with startup synchronization, lock
timeouts, etc. Now each client User Interface can use MVC with its own
in-memory model. Hopefully, WCF will support this approach/architecture.

Any thoughts or comments?

Thanks, Jeff

Can you hear me now? BogeyGolf
6/4/2007 10:01:01 AM
This is a test post for Tommy.

RE: WCF using MVC/Observer Pattern stcheng NO[at]SPAM online.microsoft.com
6/6/2007 12:00:00 AM
Hi Jeff,

Regarding on this issue, I have seen your new thread posted under your
managed subscriber email and I have replied you there

Subject: Object Model Distribution and Concurrency
Newsgroups: microsoft.public.dotnet.distributed_apps

Please feel free to continue followup in that thread:

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button