Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

BigBank demonstrates a complete distributed, multi-cluster loan processing application. BigBank is organized into several architectural tiers:

  • A loan service tier responsible for providing a RESTful and WS-* web service that receives loan applicationsresponsible that receives and processes loan applications over multiple transports, including Web Services (WS-*), REST/HTTP, and file-system messages.
  • A back-end services tier rating system responsible for performing credit checks , rating, pricing, and managing approvalsand application scoring.
  • A consumer web-based UI for submitting new applications and reviewing loan status.
  • A back-office web-based UI for managing loan approvals and viewing real-time business events and statistics.  
  • A database tier for persisting loan application data.
  • database for persisting loan application data.
  • Client applications that remotely connect to the loan service and submit applications.

BigBank can be deployed to the single-VM runtime used for the starter examples or deployed to the two- cluster topology that is configured under servers/cluster. In either case, application configuration remains the same. When deployed to the cluster environment, the loan service and web UIs will be deployed to the cluster zone1 while the back-end services will be deployed to the cluster zone2.  Fabric3 will wire the services by transparently provisioning a number of JMS queues and topics. 

Deploying to a Single VM

To build and deploy BigBank to the single-VM server, do the following:

Build the BigBank source. 

To build BigBank, go to apps/bigbank/bigbank_loan and execute: mvn clean install
.

The build will produce three archives: the loan application and back-end services contribution ( bigbank-loan-<version>.jar ); the consumer UI (bigbank-web-<version>.war); and the back-office UI (bigbank-backoffice-<version>.war). 

Info

Note both web applications currently do not support Internet Explorer. Please use FireFox, Chrome, or Safari.

Start the server.

Boot archive containing the loan services.

Start the server.

Build the single-VM Fabric3 runtime in /servers/vm by executing:

mvn clean install

When the build has completed, boot the Fabric3 runtime from the server/vm/image/bin directory by executing:

java -jar server.jar



Alternatively, the server can be started by providing the path to the seerver.jar archive relative to the current directory. e.g.:

java -jar target/image/bin/server.jar

Deploy the archives.

Copy bigbank-loan-<version>.jar to the severs/vm/target/image/runtimes/vm/deploy directory. Next, copy the two war archives to the deploy directory.

Deploying to a Distributed Domain

When working with the distributed domain setup, it is helpful to review Fabric3's approach to clustering and distribution described in The Domain.

The samples distribution also contains an automated build process for producing a set of clustered servers. To create the clustered servers, execute the following from the servers/cluster directory:mvn clean install.
 The build will create three server images located in the target directory of each module under /servers/cluster: controller, zone1, and zone2.

Info

Note that your local network must have multicast enabled. Also, some JVMs require IP4 to be set with the following command line option: -Djava.net.preferIPv4Stack=true

Follow the steps in the previous section to build the BigBank application. When the build completes, launch the H2 database, controller and zone runtimes:

  • Launch the shared H2 database process from cluster/database: java -jar target/h2-1.2.140.jar 
    * From the controller/target/image/bin directory: java -jar server.jar controller
 
    * From the zone1/target/image/bin directory: java -jar server.jar participant
 
    * From the zone2/target/image/bin directory: java -jar server.jar participant

After booting, the runtimes will discover each other and form a distributed domain consisting of two clusters (zones). Note the runtimes may be on the same machine or different machines. Copy the BigBank archives to the controller/target/image/runtimes/controller/deploy directory. The controller will provision the loan service and web UIs to zone1 and the backend services to zone2

Run the clients.

From your IDE, launch one of the client located in bigbank-client src/main/java/org/fabric3/samples/bigbank/client. The client will submit a loan application an wait for it to be processed.

The next section explains the BigBank application architecture in detail.