Groups | Blog | Home
all groups > dotnet distributed apps > june 2007 >

dotnet distributed apps : Object Model Distribution and Concurrency


BogeyGolf
6/5/2007 6:44:02 AM
I have a Windows Forms application that configures and monitors hardware
devices. I now need to run this application on about 10 PCs that are
interconnected via a 10/100 LAN. The PCs will all be running the same
Windows Forms application and need to share the same entity objects. The
object model that needs to be shared is very hierarchical (i.e. lots of
composition and collections), but is relatively small (generally less than a
few MBs).

What is the best way to handle object concurrency among these different
applications?

A single object model lock might be acceptable, but is would be nicer if the
applications could modify different parts of the model concurrently
(pessimistic locking should work well). I would prefer to use an “in memory”
object model that is persisted via Binary Serialization since this has worked
well for me in the past. However, I have not ruled-out an OODB or RDBMS with
an ORM.

The application frequently iterates over collections, so I don’t think MBR
will work. Instead the application needs its own “in-memory” copy of the
object model. I have looked at CSLA, WCF, .Net Remoting, etc. but have yet
to find a good match/architecture.

Any recommendations or comments will be greatly appreciated.

stcheng NO[at]SPAM online.microsoft.com
6/6/2007 12:00:00 AM
Hi Jeff,

From your description, you have multiple windows form applications deployed
on multiple machines in a local intranet environment and will need to
synchronize some certain status data at runtime, correct?

As for the shared and hierarchical data, are they freqently changed(by all
those client winform programs or may receive updated data from a central
backend data store)?

If the data is frequentely changed and will need to be sychronized among
all those clients whenever any client node update it, I think you may
consider the following approach:

** for the shared data objects which have complex hierarchy, you can use
.net custom class (mark as serializable ) to represent them and binary
serialize them when need to transfer between multiple client nodes over
network.

** Use raw socket interface to transfer the data between the center data
center and all those client nodes. Thus, the data center can work like a
UDP server which can receive update request from all client nodes and
whenever one node update the shared data, center can use UDP "broadcast" to
send notification to all other client nodes.

Using socket here is for performance consideration. Of course, other
districuted service like remoting or WCF can also do the same job, but may
involve some additional overhead.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.

==================================================


This posting is provided "AS IS" with no warranties, and confers no rights.
BogeyGolf
6/8/2007 4:55:17 AM
Hi Steven,

Thanks for helping me with this issue.
[quoted text, click to view]
Yes, there will be about 5 or 10 clients all running the same Windows Forms
application that will be sharing configuration data and status data.

[quoted text, click to view]
The "configuration data" can be modified (CRUD) by any of the clients. The
"status data" will generally emanate from a single source (e.g. server). The
"configuration data will not be changing frequently, but it will change, and
each client will need access to CRUD operations.

[quoted text, click to view]
Yes. However, I would rather not "home brew" all of the middleware
(locking, concurrency, guids, callbacks, etc.). I was hoping WCF would
rescue me.

[quoted text, click to view]

Yes, I am considering using multicast for "Status Data" distribution.

[quoted text, click to view]

I am now looking at the OO Database "db4o" for this job. However, I am not
sure if its Client/Server mode will work well for this scenario.
[quoted text, click to view]

Thanks, Jeff
BogeyGolf
6/8/2007 5:07:00 AM
Hi Steven,

Sorry for the delayed response. For some reason I did not see your response
until this morning. (Refresh must not have been refreshing).

Yes, I am looking into using an OO Database. Currently, db4o is the top
contender. However, I am not sure of its Client/Server capabilities.

I simply want the ability to work fully OO. In other words, have an object
model of entity objects to be shared/synchronized among clients on a LAN. I
can't imagine I am alone in this search for answers.

stcheng NO[at]SPAM online.microsoft.com
6/8/2007 10:23:55 AM
Hi Jeff,

Have you got any further idea on this issue? If there is any further
questions or anything we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
stcheng NO[at]SPAM online.microsoft.com
6/11/2007 3:17:51 PM
Thanks for your reply Jeff,

Yes, using WCF can help save much time on creating the communication and OO
model. For the DB4O you mentioned, I'm not sure on it. Anyway, if you get
any progress or need any further help, please feel free to post here.

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