Results 1 to 4 of 4

Thread: Services should be stateless?

  1. #1

    Default Services should be stateless?

    Hi.

    Is stateless service singletons prefered way of designing service layer ? Problem is that sometime I need some statefull service, but it simply doesn't work since most of my clients demand balancing my web app across multiple servers, thus avoiding single point of failure...

    Any suggestions ?

    -Vjeran

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Could you not store state in your client (ie webapp) tier? Thus using the web server's session replication capabilities if this is actually required.

  3. #3

    Default

    I don't see web session as shared storage solution in many cases. First, it is only shared among one client's requests. And second, it last only for some time, not indefinetily.
    Let's say I wan to start some scheduler that will do some actions periodically, maybe send emails once per day, and various client actions can affect it by fetching it's reference through BeanFactory and update it's workings. And it works fine until you cluster your whole application on multiple servers, since scheduler isn't singleton on cluster level anymore...?

  4. #4
    Join Date
    Aug 2004
    Location
    Columbus, OH, USA
    Posts
    133

    Default

    I store certain kinds of states in a database, and one that comes immediately to mind is processing requests in a physical access management system because these have to survive for up to 30 days.

Similar Threads

  1. ACEGI Security and Web Services
    By bbailey in forum Security
    Replies: 5
    Last Post: Dec 22nd, 2005, 03:11 PM
  2. Securing Spring-based services with Acegi
    By Andrei Lissovski in forum Security
    Replies: 3
    Last Post: Sep 23rd, 2005, 06:56 PM
  3. Exposing Services in a JMS based application
    By rsheldon in forum Architecture
    Replies: 1
    Last Post: Sep 21st, 2005, 12:56 AM
  4. Replies: 1
    Last Post: Sep 21st, 2005, 12:56 AM
  5. planning major migration to spring
    By wexwarez in forum Architecture
    Replies: 21
    Last Post: May 23rd, 2005, 01:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •