Versions Compared

Key

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

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 (downloadable from {+}http://www.oasis-opencsa.org/+) are generally not the most accessible source of introductory information. We recommend:

The Samples

The samples are intended to demonstrate the capabilities of Fabric3 using the standalone or Tomcat distributions. The samples contain individual applications designed to showcase specific features and 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 integration and Pub/Sub eventing.Apps. Contains complete applications that demonstrate SCA and Fabric3 best-practices. There is currently one application, BigBank., pub/sub eventing, advanced wiring, and timers.

  • 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  and require the following software:

Info

Note that it is not necessary to download the Fabric3 runtime distribution in addition to the samples

...

. The build process will automatically download a distribution and configure a

...

Building and Deploying The Starter Applications

...

Fabric3

...

  • Build the starter modules

...

Note internet access is required the first time the project is built so Maven can download the required project dependencies. Remote access can be turned off for subsequent builds by executing:
mvn -o clean install
JARs containing the application artifacts will be created in the /target output directories for each application.

  • Build the Fabric3 server distribution.

...

runtime

...

for use with the

...

  • Start the server. 

...

  • Deploy the application.

...

The samples also contain a separate client for the web services calculator. The client module is located at /samples/wscalc-client. The WSCalcClient class can be executed using the Java command line or via an IDE.

Building and Deploying BigBank

...

  • Build the BigBank source.

...

The build will produce two archives: bigbank-loan-1.7.jar (the server module) and bigbank-client-1.7.jar (the web service client)

  • Start the server.

...

  • Deploy the archives.

...

  • Deploy and Execute the client applications

...

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.

...

sample applications.

Sections

Page Tree
root@self