Announcement Announcement Module
Collapse
No announcement yet.
Spring in large app environment Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring in large app environment

    Hello there! I've been using Spring for small-mid size applications for over 2 years now. They all work great thanks!!! I know spring is robust enough for large projects, and cost me a great fight against other architects/developers to convince them so. We have a new project with over 5 million users and we expect over 2 million hits/day.
    So I'm bit concerned with spring now. We use SLSB for projects that size, trusting the conteiner's pool capabilities to handle so many requests.
    I know its possible to create pool around business objects in spring, but one thing that I did not understand is that on the reference it says it shouldn't be done.
    Ok, even my business objects are thread safe, let's suppose I wrap them in a transactional proxy factory bean. Do method calls become synchronized? I mean, hundreds of simultaneos request may lead to a problem with my consistency right?

    I know that my business object must be a prototype to use pools, but what if I'm using transactions? Do I wrap my transactional bean?

    Spring is great, today in our company if it's j2ee it must use spring, but I'd like to see a few articles, comments of spring in real large projects (clusters) and so on... Its the kinda of thing that one cant find in the documentation (and I don't believe it should be there either)

    So, any comments, best practices, articles, links would be very nice

  • #2
    Check out the SpringONE website. It has some nice presentations about real life big (mission critical) projects which use spring. You will need to register to download the presenationsheets.

    You might find these interesting:
    - Mission-Critical Lightweight JEE Technology (Day 1)
    - espacenet, a Spring-enabled search for patents (Day 1)
    - The Use of Spring in the Banking Sector (Day 2)

    For the remainder of your questions I have no answer until now I haven't used pooling and/or prototyping in a Spring container.

    However Spring doesn't forbid the usage of SLSB, it even has some nice Abstract classes for them, and some convenience proxies to do the lookups. (Section 18 of the Spring reference documentation 2.0RC2 that is).

    Comment


    • #3
      We use SLSB for projects that size, trusting the conteiner's pool capabilities to handle so many requests.
      I know its possible to create pool around business objects in spring, but one thing that I did not understand is that on the reference it says it shouldn't be done. Ok, even my business objects are thread safe, let's suppose I wrap them in a transactional proxy factory bean. Do method calls become synchronized? I mean, hundreds of simultaneos request may lead to a problem with my consistency right?
      Since you are talking about hits/day I'm assuming a web application. In a web application there is rarely any point to local session beans. In a non-SLSB web application the server would use the web threads to process requests. Since SLSB requests are synchronous, pushing the processing to a thread pool has limited usage. One such use is to limit the maximum number of service requests independant of the maximum number of web requests. But Spring has support for this without having to have a seperate thread pool with ConcurrencyThrottleInterceptor.

      I know that my business object must be a prototype to use pools, but what if I'm using transactions? Do I wrap my transactional bean?
      I would recommend getting rid of the pools for local services. As for transactions, as long as your code is thread safe, adding a transaction proxy will maintain thread safety. This is because Spring's transaction support stores intermediate information in a ThreadLocal object. So no matter how many requests you have or how many threads, concurrency is never an issue.

      A good resource that I think explains why you don't need EJB for many cases is Rod Johnson and Juergen Hoeller's "Expert One-on-One J2EE Development without EJB".

      Comment


      • #4
        Originally posted by wpoitras
        A good resource that I think explains why you don't need EJB for many cases is Rod Johnson and Juergen Hoeller's "Expert One-on-One J2EE Development without EJB".
        Read it many times One of the finests

        Comment

        Working...
        X