Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
289 views
in Technique[技术] by (71.8m points)

distribution - How to share objects across processes in .Net?

I'm trying to "share" .net objects across separate processes. I have one type of process that's a web service that manipulates a set of domain entities. Another type of process is a window service that's doing some automatic batch processing on the same set of objects.

Beyond the typical solution of having the DB as the shared space where both types of processes read/write the objects, what might be a better, more distributed architecture for having these different processes see and work on the same objects?

I've considered using a distributed cache as a shared store for objects, but that doesn't fully support objects and their relationships. Object graphs inserted into a distributed cache are flattened and objects end up stored in multiple disconnected copies.

Is a "messaging bus" the right way to go about, letting the processes send each other updated copies of the objects?

Or are there other solutions altogether to consider?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I would suggest using WCF-services. For local using (calling from Windows Service) you can netNamedPipeBinding. That allow you to separate this two processes physacally in the future.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...