singletons vs scalability

Discussions

General J2EE: singletons vs scalability

  1. singletons vs scalability (1 messages)

    i spent some time now trying to design a business pattern
    for a project but something very simple is bothering me...

    well in some patterns u can see the use of singletones for example as a webApp ServiceLocator, why ? because creating objects does cost a lot you improve performance and u can always cache inside it .

    but isnt that just the situation to create an application that
    WONT scale ..?

    so you will say it depends ... ok i know it depends

    i can see the "pro's" when dealing with static data , cached data but in a dynamic data situations like DB queries isnt that a scalability killer..?
  2. !(singletons vs scalability)[ Go to top ]

    Hi Alon,
    but isnt that just the situation to create an application that WONT scale ..?

    If you use Coherence for both the cache and the clustered singleton you can guarantee near-linear scale due to the peer-to-peer nature of Coherence's clustering.

    so you will say it depends ... ok i know it depends i can see the "pro's" when dealing with static data , cached data but in a dynamic data situations like DB queries isnt that a scalability killer..?

    With Coherence's Partitioned Cache you can cache an unlimited amount of read/write data, since the entire cached data set is equally partitioned across the cluster and we provide cluster-wide concurrency mechanisms (i.e. lock). For scalable queries you can use our Distributed Query technology which allows for programmatic querying of the properties of the objects in the cache. This is equally as scalable as Coherence itself since the data and hence the "query" are partitioned across the cluster.

    Later,
    Rob Misek
    Tangosol, Inc.
    Coherence: It just works.