Re: Complimentary App Server
Re: Complimentary App Server
- Subject: Re: Complimentary App Server
- From: Andrus Adamchik via Webobjects-dev <email@hidden>
- Date: Sun, 16 Feb 2020 13:02:36 +0300
Good question... With the decline in server-generated HTML, the session state
can be shuffled outside the server app:
* Client UI state is kept on the client (browser, mobile app)
* Security state (authentication, roles) is restored based on a client-passed
token either from a server DB or by decoding the token itself (see JWT - JSON
Web Token).
The traditional session approach is still possible, just more rare. Most
engines still have an underlying HttpSession object mandated by the Servlet
spec. With this you have two options:
1. Keep the state in memory on a single server and configure the load balancer
to route each client to their assigned instance. This doesn't protect against
server failures, but at the same time it is easy and lightweight.
2. You can make HttpSession persistent and replicated across the cluster, like
the appservers of old did. Lots of overhead for very little gain, but still
possible with (embedded) Jetty, Tomcat and others.
I certainly prefer stateless apps, and strongly dislike opaque sessions
carrying around megabytes of garbage, due to developers having a hard time
tracking reference chains of their objects. Worst case scenario I'd go with
session routing via load balancer (#1 above).
Andrus
> On Feb 16, 2020, at 12:29 PM, Gino Pacitti via Webobjects-dev
> <email@hidden> wrote:
>
> Thanks for everyones thoughts on the subject.
>
> I tried out Bootique and Spring Boot and worked around a few demos and
> scenarios.
>
> What I don’t seem to understand yet is instance management?
>
> How do you manage sessions across instances of these ioc containers that seem
> to be standalone web server and resource handlers…
>
> Any illuminating comments appreciated..
>
> Gino
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden