Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / June 2007

Tip: Looking for answers? Try searching our database.

Object Model Distribution and Concurrency

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BogeyGolf - 05 Jun 2007 14:44 GMT
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.

Thanks,  Jeff
Steven Cheng[MSFT] - 06 Jun 2007 04:20 GMT
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.
Steven Cheng[MSFT] - 08 Jun 2007 11:23 GMT
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.
BogeyGolf - 08 Jun 2007 13:07 GMT
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.

Thanks,  Jeff
Steven Cheng[MSFT] - 11 Jun 2007 16:17 GMT
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.
BogeyGolf - 08 Jun 2007 12:55 GMT
Hi Steven,

Thanks for helping me with this issue.

> 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?
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.

> 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)?
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.

> 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
[quoted text clipped - 4 lines]
> serialize them when need to transfer between multiple client nodes over
> network.
Yes.  However, I would rather not "home brew" all of the middleware
(locking, concurrency, guids, callbacks, etc.).  I was hoping WCF would
rescue me.

> ** 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.

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

> 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.

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.
> Sincerely,
>
> Steven Cheng
>
> Microsoft MSDN Online Support Lead

Thanks,  Jeff

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.