Build Web Apps with spring Web flow and terracotta

Source: Internet
Author: User

What is Spring Web Flow?

Spring Web flow is a Web application component in the spring framework that provides an easy way to write stateful and session-based Web applications. Spring Web flow makes logical processes a top citizen in a WEB application, allowing you to define self-contained modules to be configured and reused independently of the rest of the application. It is not dependent on the framework to be easily used with the optional Web application framework, such as spring MVC, struts, or JSF.

Page flow is configured using a Domain definition language (DSL) that is specifically developed to define and combine page flows. The current implementation is XML and Java.

Spring Web Flow introduces several stateful data domains that address a wide range of user stories and needs: request, flash, flow, and conversation, which gives you great flexibility and power to develop stateful Web applications.

Here is a quick overview of the most interesting features in 1.0 release:

Define all the control logic for the application task in one place rather than the logic in many places, such as a search process.

Combine simple flows together to create a rich control module.

Use natural and object-oriented linear programming models rather than lengthy if/else blocks to define strict user navigation rules.

But the memory that you allocate in the flow execution is automatically cleared when the flow ends or expires.

Deploy an executable flow in a servlet environment that uses the underlying web framework of your choice.

Change the web framework (such as struts, Spring MVC, JSF, and others) without modifying the flow definition.

Change with the environment without having to modify your flow definitions, such as from JUnit testing to portlets.

Develop your app navigation rules continuously without restarting the container.

Automatically responds correctly to browser buttons (back, forward, refresh) without the need for custom programming.

Store task data in 4 managed domains: request, flash, flow, and, conversation, and so on, each with its own unique semantics.

Separate test flow from the container. To ensure that the application control logic works properly before deployment.

Visually edit your flow navigation logic diagram using Spring IDE 2.0

What is terracotta for Spring?

Terracotta for Spring is a spring application-based runtime that provides transparent, high-performance cluster support for spring applications, with minimal impact on application code and deployment and configuration processes. It is clustered instead of directly clustered by applying the heap level below.
This allows developers to develop a single-node stateful spring application that is different from stateless methods. This allows the cluster to be designed regardless of the application that needs to be extended. When applications need to be extended or to ensure availability and failback, they only need to define in the terracotta configuration file which beans in the context of the spring application needs to be clustered. Terracotta for Spring enables applications to be automatically and transparently clustered, as well as to ensure semantic and single nodes between clusters.
This is actually simpler for spring Web flow. In order to gain the status of the Web app and the ability to cluster on a continuous warehouse, users simply declare a specific web app in the Terracotta configuration file as Enabled "Session-support". (See the following section, "Declarative Configuration" for more information)

From a macro perspective, Terracotta for Spring provides:

A cluster of HTTP session states. Ensures high availability and resiliency of the user state in spring Web flow and the extended warehouse or other states that are placed in the HTTP session.

A cluster of Spring beans. The life cycle semantics and domains of Springbeans are saved between clusters, and they are in the same applicationcontext on "logic". The bean types that can be clustered now are singleton and session scoped. Users can declaratively configure which bean in the application contexts needs to be clustered.

Transparent cluster Pojo. There is no need to modify the existing code, not even the source code. Application is based on a very small declarative XML configuration file, which becomes transparent at onboarding time. Terracotta for spring does not require classes that implement Serializable, externalizable, or other interfaces. The reason for this is that it does not use serialization, but only the actual difference and the changed data transfer to the currently needed node (lazily).

Virtual memory management. It also provides distributed garbage collection and virtual heap functionality. For example, it can run a Web application that requires a 200G heap on a 4G ram machine, because it is swapped in and out as needed in physics. This also means that you don't have to worry about whether the size of the spring Web Flow session data exceeds the physical heap size.

Build Web Apps with spring Web flow and terracotta

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.