Versions Compared

Key

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

Introduction

Fabric3 is a platform for developing, assembling, and managing distributed applicationsservices. Fabric3 provides the following features:

  • A programming model based on Service Component Architecture (SCA) that is specifically designed for building and integrating Java programming features such as asynchronous invocations and pub/sub channels for building loosely-coupled systems .The ability to use a variety of remote communication protocols that can be used with POJOs or Spring.
  • Local and remote service wiring and dependency injection. Think of Spring or Guice for distributed, loosely coupled services.
  • Support for multiple communication protocols and messaging patterns in a unified, consistent manner without tying application logic to specific transport APIs. A cross-application policy framework for implementing and enforcing policies such as security and SLAs throughout an organizationUse ZeroMQ, REST, messaging middleware (JMS), Web Services, and file-based transports without polluting application code with complex API calls and configuration.
  • A management framework for provisioning, controlling, and monitoring production deployments via a RESTful API.
  • Portability across a variety of middleware environments including Tomcat, and WebLogic.
  • Support for open standards including JAX-RS, JPA, WS-*, and SCA. 


Info
titleFabric3 Benefits

If you would like a hands-on example of how Fabric3 simplifies application development and the advantages it brings, please look at the BigBank sample application.


In this chapter, we cover the basics of setting up and deploying an application using Fabric3. 

The documentation assumes a basic understanding of SCA concepts. Before proceeding, if you have not done so, we recommend familiarizing yourself with SCA. The specifications themselves (http://www.oasis-opencsa.org) are generally not the most accessible source of introductory information. We recommend:

The Samples

The Fabric3 samples are organized as follows:

  • StarterGetting Started: Contains  Contains several variations of a calculator application that show how to create services, wire them, and expose them as a web services endpoint and REST resource. Also
    Features: Contains contains applications that demonstrate how to use specific Fabric3 features, including JPA/Hibernate, pub/sub eventing, websocketsadvanced wiring, and timers, and custom policies.
    Apps. Contains complete applications that demonstrate SCA and Fabric3 best-practices. There is currently one application, BigBank.
  • BigBank. BigBank demonstrates how to build an end-to-end application composed of distributed services.
     
  • FastQuote is a Forex trading application that shows how to build low-latency, high-performance services. 

For projects that intend to use Spring, Fabric3 also ships with a set of dedicated Spring samples. These samples are ports a subset of the SCA Java samples described in this chapter, with SCA Java components replaced by Spring beans. Basic layout, configuration and deployment remain the same across both sets of samples.

Prerequisites

The samples may be downloaded from from http://www.fabric3.org/downloads and require the following software:

Info

Note that it is not necessary to download the Fabric3 runtime distribution in addition to the samples as the sample . The build process will automatically download a distribution and configure a Fabric3 runtime cluster. 

Building and Deploying The Starter Applications

...

  • Build the starter modules.

In the directory where you extracted the samples distribution, go to the /starter project folder and execute: 

{code{color:#333333}} mvn clean install

...

for

...

mvn -o clean install

...

The build will create three server images located in the target directory of each module under /servers/cluster: controller, zone1, and zone2.
Follow the steps in the previous section to build the BigBank application. When the build completes, launch the H2 database, controller and zone runtimes:

  1.  
  • Launch the shared H2 database process from cluster/database:

...

  • From the controller/target/image/bin directory:

java -jar server.jar controller


  • From the zone1/target/image/bin directory:

java -jar server.jar participant


  1.  
  • 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 cluster zones. Note the runtimes may be on the same machine or different machines.
Copy bigbank-loan-1.7.jar to the controller/target/image/runtimes/controller/deploy directory. The controller will provision the loan service to zone1 and the backend services to zone2.
To run additional zone participants, copy one of the images and follow the instructions above for launching the servers. If more than one server is run on the same machine, you will need to modify the HTTP and HTTPS ports in config/participant/systemConfig.xml.

...

use with the sample applications.

Sections

Page Tree
root@self