Dividing db records between instances


EJB design: Dividing db records between instances

  1. Dividing db records between instances (1 messages)

    I'm new to EJB and I'm looking for a way to divide records in a db table between some bean instances. I'm monitoring some data feeds (say 500 - each with a db record) and I'd like 5 instances to each service 1/5 of the load. I'd also be interested if I should just have 500 instances - this approach seems troubling when numbers grow into the 1000's. New record created in the table need to be sent to one of the instances. I'd appreciate anyones experience in such a model. Thanks!
  2. One way of doing this have load balancer session bean do the splitting and post messages to a MDB configured for a queue..and the mdb with a pool size has the logic of updating the database. loadbalancer bean needs to have the intelligence of dividing based on number of instances 500 or 1000 etc., caveats....challenging things if they exist are data integrity - data stomping, constraints, duplicates....etc., if each feed is totally independent from other,..like mathematically -)) no relationship with other... you are all set for a using queue to manage the jobs.... Bhagvan K http://www.jroller.com/page/bhagvank