Ayende @ Rahien

Refunds available at head office

Why Remoting is so painful?

Yes, I know, 2003 called and asked to get its distribution technology back. Nevertheless, remoting is an extremely useful tool, if you can make several assumptions about the way that you are going to use it.

In my case, I am assuming inter process, local machine configuration, with high expectation of reliability from both ends. Considering that I also need low latency, it seems like an appropriate solution indeed. I was pretty happy about this, until all my integration tests start to break.

After a while, I managed to figure out that the root cause for that is this error: Because of security restrictions, the type XYZ cannot be accessed.

Now, it worked, and it worked for a long time. What the hell is going on?

After thinking about this for a while, I realized that the major thing that changed was that I am now signing my assemblies. And that caused all hell to break lose. I managed to find this post with the solution, but I am still not happy. I really dislike things that can just go and break on me.

Comments

Frank Quednau
11/26/2008 09:13 AM by
Frank Quednau

Woa, in which case you dislike every single piece of...anything?

You'll have to stick to certain elementary particles. The electron is deemed quite stable and doesn't seem to have any motivation to just break.

Neil Mosafi
11/26/2008 02:34 PM by
Neil Mosafi

Urgh! Why not WCF with named pipes or something?

The Other Steve
11/26/2008 03:56 PM by
The Other Steve

Doesn't WCF have better support for remoting? Especially locally?

Chris
11/26/2008 04:04 PM by
Chris

Frank: electrons have a catastrophic failure mode in the presence of positrons.

Frank Quednau
11/26/2008 06:51 PM by
Frank Quednau

Chris, you're right, I forgot.

Sorry Ayende. Let's make this an...observation then: For every thing in our reality there is some other thing that will make the first thing break.

RafalG
11/26/2008 06:59 PM by
RafalG

The implementation of code-level security in .Net is like black magic to me, and my brain is totally resistant to it. I don't know anyone using it for any purpose, even no one who can tell where it could be sensibly used. The only option - give your code all possible permissions and pray it works.

And .Net remoting - very nice at the beginning and ready to bite you when your application grows more complicated. Maybe WCF is better, but I'm afraid it's just a bit more painful than remoting

Niki
11/27/2008 09:20 AM by
Niki

So... does that mean we can expect Rhino.Remoting soon? What interface would you use? Erlang-style message passing or RPC-style function calls.

RafalG
11/27/2008 09:58 AM by
RafalG

I think next version of C# will look like javascript and we'll use JSON for remoting. Microsoft must only realize that they need to get rid of compiler, static typing, generics, WCF/WF and all that disturbing sh*t and concentrate on making the framework easy to use.

Comments have been closed on this topic.