Basically, I need some way to share something (a full object if I can get away with it) between two applications on the same system. I've done the Google search, and found these:
1. Remoting -- I've found it extremely unreliable with objects that need to persist for more than a few minutes (yes I'm aware that you can respond to a callback to keep an object alive. That part is very reliable -- it reliably doesn't work). Also very slow for large objects
2. Shared Memory -- Doing this in C# requires a lot of de/serialization, which makes it incredibly slow and memory-intensive when large objects are involved; solving that would require rewriting my stuff in C++.
3. ".shared" sections -- ditto on the rewriting, and it's a security problem anyway
4. Named Pipes -- Better for passing bits of information around, not so good for sharing something more concrete
5. WM_COPYDATA -- ditto
Okay, so does anyone know of a reliable, fast way to share something cross-process in C#? I'll rewrite for C++ if I absolutely have to, but that's a rather drastic step I'd rather not take.
Basically what I'm looking for here is something similar to a COM server setup, but without the COM. Or maybe with the COM, if that's achievable through some .NET CCW magic.
Question
smurfiness
Basically, I need some way to share something (a full object if I can get away with it) between two applications on the same system. I've done the Google search, and found these:
1. Remoting -- I've found it extremely unreliable with objects that need to persist for more than a few minutes (yes I'm aware that you can respond to a callback to keep an object alive. That part is very reliable -- it reliably doesn't work). Also very slow for large objects
2. Shared Memory -- Doing this in C# requires a lot of de/serialization, which makes it incredibly slow and memory-intensive when large objects are involved; solving that would require rewriting my stuff in C++.
3. ".shared" sections -- ditto on the rewriting, and it's a security problem anyway
4. Named Pipes -- Better for passing bits of information around, not so good for sharing something more concrete
5. WM_COPYDATA -- ditto
Okay, so does anyone know of a reliable, fast way to share something cross-process in C#? I'll rewrite for C++ if I absolutely have to, but that's a rather drastic step I'd rather not take.
Basically what I'm looking for here is something similar to a COM server setup, but without the COM. Or maybe with the COM, if that's achievable through some .NET CCW magic.
Link to comment
Share on other sites
12 answers to this question
Recommended Posts