Fine Grained Distributed Objects

Sadly this is a common AntiPattern. The recipe is to create a nice domain model, then make every object distributed. This is very easy to do with RMI, CORBA etc. Indeed I've seen some CORBA vendors quote it as a feature.

You'l also get there if you don't truly understand how programmers can collaborate on source files, and you follow a policy of One Component Per Programmer Per Feature...

The problem is that remote procedure calls behave differently to local ones. Remote calls are orders of magnitude slower, and can fail.

As a result using FineGrainedDistributedObjects leads to terrible performance problems, together with reliability issues.

Instead you should use FacadesAsDistributedComponents or a BagOfJumpingBeans.


However this has changed with EjbTwo. Since LocalInterfaces? are now available then it's actually a good idea to have fine-grained entity beans with a stateless session bean in front of them. Of course one could argue that the entity beans that are only being exposed via a LocalInterface? aren't distributed objects.

Well they're not. The reason that you can make fine grained entity beans in EjbTwo is that they have local interfaces that are exposed to session beans in the same address space.


EditText of this page (last edited April 19, 2002) or FindPage with title or text search