Seam’s 2 new contexts : conversation and business process

Last night i attended a presentation of Seam and the speaker told us that Seam introduces 2 new types of contexts: business process and conversation.

What do they bring to the four well-known other contexts (page, request, session, application) ?

Here is the answer that the author of Seam in action, Dan Allen, gave me in the Javaranch forum :

The conversation is a slice of the HTTP Session dedicated to a single browser viewport (tab or window). It maps one-to-one with a use case involving a single user, where the boundaries are something you decide based on the business logic. Those boundaries can be set various ways, either declaratively (XML) or programmatically (Java/Groovy/EL). The main purpose of the conversation is to extend the persistence context across more than one request to avoid detached entities. You also have the option of binding the conversation to a stateful pageflow, which makes the boundaries more well defined and constrains the user on a predetermined navigation path.

The business process is a persistent context (i.e., stored in a database) and therefore can stretch across any number of requests, sessions, or even application restarts. It maps one-to-one with a use case involving one or more users. The boundaries are controlled by a business execution language. Seam relies on jBPM to drive the business process described in jPDL. In some regards the business process is a multi-user conversation, though each task in the business process can itself be a single-user conversation. You can start to see how these two contexts build on one another.

Scalability (with Terracotta)

Last night, I attended a meeting about Terracotta and the presenter was the creator, Ari Zilka. Among his slides was what i found an interesting slide about Terracotta’s advantages : scalability and availability.

I reproduced it here. Scalability is a term often used in the computing area.

Writing data in memory is less scalable than writing on hard disks but on the other side data written in memory is more available (in terms of speed access) than data written on disks.

Link: http://www.terracotta.org/web/download/attachments/14155789/fig_104_1_grad.png