Hi Richard

Thanks for your helpful post. However can I request even more clarification?

You say:
        [snip lots of good stuff including description of smart keys on the
client]

> Doesn't the above code look much better?  Of course we had to build an
> entire
> infrastructure of smart keys which implement the remote interface,
> maintain
> their own identity (primary key), lookup the proper stateless session, and
> delegate requests to the stateless session bean.  Hmmm .... this all looks
> very
> familiar.  Don't entity beans accomplish basically the same thing?  They
> maintain an assocation between a remote reference used by the client and a
> primary key.  Of course they do it automatically on the sever and hide the
> details from the developer. If we had just used entity beans in the first
> place, we would have obtained exactly the same benefits with at least the
> same
> performance if not better.
>
However, it is not clear to me that these two solutions [smartkeys vs entity
beans] are really comparable from a performance point of view. In the smart
key case the references are held on the client. Thus the storage demand on
the server is constant as the number of clients increases. In the entity
bean case the server is maintaining some kind of entity-bean instance table
(mapping references) and this will use storage linear in the number of
concurrent clients and hence damage scalability (certainly in extreme
cases). Essentially, in the smartkey case, there need not be any bottle-neck
on the server until you get to the database whereas, in the entity bean
case, there also has to be this lookup as a bottle-neck.

Under what circumstances can the entity bean model outperform the smartkeys?
The scope for optimisations within the server seems to be quite restricted
by the EJB semantics. (However I'm probably missing some obvious point...)

Ben Strulo

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to