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 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. Subsequent chapters will cover developing loosely-coupled services, runtime configuration and topics such as integration with Java Persistence Architecture (JPA).
This manual .

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 instead the paper by :

...

...

...

  • ), which presents a balanced and accurate overview of SCA.

...

  • Jim Marino and Michael Rowley, Understanding SCA (Addison-Wesley), which provides an in-depth treatment

...

  • The Standalone Server: Fabric3 includes a server that can be run in a single VM or in a distributed environment with multiple runtime clusters. 
  • The Fabric3 Tomcat Runtime: This runtime is hosted in a Tomcat server. The Fabric3 Tomcat Runtime is integrated with Tomcat facilities including JMX and logging. This runtime provides additional services including support for service clustering, JTA transactions, and datasource pooling.
  • The Fabric3 WebLogic Runtime: This runtime is hosted in a WebLogic server. The Fabric3 WebLogic Runtime is integrated with WebLogic facilities including clustering, transactions, datasources, JMX and logging.
  • The iTest Runtime: The iTest runtime allows applications to be tested as part of a Maven project build. Fabric3 provides facilities for writing automated tests and mock services that can used to verify a complete application or individual subsystems in an automated fashion.

...

/bin

 

 

 

 

Startup modules

 

/lib

 

 

 

 

Modules required to start the runtime host

 

/boot

 

 

 

 

Modules required for the runtime bootstrap and primordial system services

 

/host

 

 

 

 

Libraries shared between the runtime and application (e.g. web services annotations)

 

/extensions

 

 

 

 

Extension modules that are able to be loaded by all runtime instances

 

/runtimes

 

 

 

 

Specific runtime instance configuration is hosted by default under this directory

 

 

<runtime-name>

 

 

top level directory for a runtime configuration

 

 

 

/config

 

 

Contains systemConfig.xml for configuring the runtime and extensions

 

 

 

/deploy

 

 

File system deploy directory for the controller and single-VM runtimes

 

 

 

/repository

 

 

 

 

 

 

 

/runtime

 

Extensions only loaded for the runtime image

 

 

 

 

/user

 

User contributions (only populated on the controller and single-VM runtimes)

 

 

 

/data

 

 

Persistent data directory for a runtime instance (e.g. transaction log)

 

 

 

/tmp

 

 

Temporary data and artifact cache for a runtime instance

 

...

java -jar server.jar controller 

launches a runtime using the runtimes/controller image

java -jar server.jar vm

launches a runtime using the runtimes/vm image

java -jar server.jar participant

launches a runtime using the runtimes/participant image

java -jar server.jar foo

launches a custom runtime using the runtimes/foo image

...

  • of SCA using Fabric3. 

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 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 Fabric3 runtime

...

  • 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.

...

  • Start the server. 

...

  • Deploy the application.

...

  • The web calculator UI can be accessed at:

http://localhost:8181/ calculator/entry.html.

  • The REST calculator resource can be accessed using a GET with the formula to calculate included in the URI as in:

http://localhost:8181/calculator/1+1

  • The web services calculator can be accessed at:

http://localhost:8181/calculator
and its WSDL from:
http://localhost:8181/calculator?wsdl
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.

...

  • 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:

  • 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


  • 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.

...

for use with the sample applications.

Sections

Page Tree
root@self