What EJB(2.1) sould I use in a client-server app, with potentially thousands of concurrent users?

StackOverflow https://stackoverflow.com/questions/8827053

  •  15-04-2021
  •  | 
  •  

문제

I have to plan this big client-server app, communicating through EJB(2.1).

-The server serving these thousands (potentially tens of thousands) of clients is in one central place, and has 2 working threads.

-The EJB would basically serve back lists of tens-hundreds of not that huge DTO's (up to 10 primitive data / String fields ).

-The users's ID matters (the database queries do take into account the ID of the user)

I want to know what would be the best type of bean to use (even at first sight) in such an environment, meaning Stateless-Session, Stateful-Session, Entity or Message-Driven.

I'm thinking about possibly using a cache of Stateless-Session beans, seems less object creation-destruction and server resources, but i'm no expert.

If anyone has any expertise on this, i'd be really grateful.

Thx, you guys rule

도움이 되었습니까?

해결책

I believe you should start off with better understanding of the EJB types and EJB's containers/pooling mechanism in the first place. To run your ejb's you would need a proper j2ee container which manages its own pools of beans (configurable) and you don't specify in how many threads it should be invoked.

The specific EJB choice depends on how do you want to serve your data (synchronously or async. - stateless ejb or mdbs). Should the client-server interaction include session state - statefull ejb.

If its a new project and you are designing it from scratch why ejb 2.1 instead of 3.0+, for the database end consider using NoSql solution.

다른 팁

I don't really see a way for a server with 2 threads serving tens of thousands of clients ...ejb or no ejb :)

Stateless Session Beans but do not constrain your self with just two threads. For the high volumes you are predicting you will need to further understand the App Server architecture as well as decide on things like Clustering etc. HTH

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top