On Wed, 23 Aug 2000 11:23:01 +0100, Tim Fox <[EMAIL PROTECTED]> wrote:

>I have a question on the maintaining of state consistency and
>scalability on ejb servers.
>
>If I have, say, two ejb servers working in a load-balanced arrangements.
>
>Both servers are serving the same ejb classes.
>
>Client A is editing the Customer entity bean relating to "John Smith" on
>server A.
>The Customer entity bean relating to "John Smith" is also cached in
>memory on server B after a previous update. (I am assuming ejb servers
>cache objects in memory)
>
>Client A commits his changes to the underlying database.
>How does ejb ensure that the in memory cached instance of "John Smith"
>on server B is updated to reflect the changes made by Client A?
>Does it fire off an "update" event to all the servers?

There are many possible ways to do this, but yes, sending "update"
events would be one way to do it.

>If so, and we have n servers then I image we have a scalability problem
>of order n-1. (Ie the server has to notify every other server that the
>update has happened)/

If a real messaging system is used the effects wouldn't be that bad
(i.e. message batching and routing, etc.).

>If it doesn't then how can I possibly use entity beans in a load
>balanced environment?

Many take the "easy" way out and use commit option C (i.e. passivate on
tx commit). That way you never cache more than you have to and rely on
the database for caching and locking and sychronization. How the DB
performs this, well that's another story altogether..

/Rickard

--
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com

===========================================================================
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