Versions Compared

Key

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

...

Feature applications provide in-depth examples of how to use a particular Fabric3 feature, such as pub/sub eventing and are located under /features. As with the starter applications, a feature application can be built and deployed to one of the server configurations .

Info

Note browser support for Websockets is required for the chat sample.

Eventing

The eventing sample demonstrates the use of Channels to develop applications based on pub/sub communications and asynchronous events. The sample can be deployed to the single VM server or to the distributed domainlocated under /servers. For instructions on building the Fabric3 servers, see Starter Applications.

Channels

This sample demonstrates how to use pub/sub messaging and channels. Features covered are: LMAX Disruptor integration, ordered consumers, pooled workers, strongly-typed channels, and batch notifications.

For more on SCA eventing and pub/sub communications, see see PubSub Eventing.

...

Eventing

The timer eventing sample demonstrates the use of timer components to fire events at a specified interval. Two timers are deployed: a highly-available clustered singleton and a stateless timer that is deployed to all participants in a zone (cluster). The sample can be run on the single VM server or the distributed domain.

For more on timers, see Timer Components.

...

channels to develop applications based on pub/sub communications and asynchronous events. 

Hibernate

This application demonstrates exposing a component as a REST resource using JAX-RS annotations and persisting the resource to a database using Hibernate and SCA declarative transactions. The sample also demonstrates how to configure application data sources. The web-hibernate-client module  module provides a client to access the resource using the JAX-RS Jersey client API.

To run the web- hibernate-client from the commandline change to the /features/web-hibernate-client and  and type

mvn exec:java

Note web-the hibernate module jar must be deployed first and the server must be running in order to run the web- hibernate - client. For more on using Hibernate and JPA with Fabric3, see Data Access.

...

see Data Access.

Monitor

This application demonstrates how to use the Fabric3 low-latency, garbage-free monitor framework. This framework provides extremely high-performance processing of application events such a log data. The monitor framework uses type-safe proxies generated from application supplied interfaces for emitting events. The framework is designed for low-latency applications (where traditional logging solutions are not viable) and is able to persist messages to disk in sub-microsecond time with no object allocation. The sample demonstrates monitor configuration as well as extending the framework to create custom event sinks.  

For more information on the monitoring framework, see Monitoring and Logging.

Streaming

This sample demonstrates how to write streaming services capable of efficiently processing very large input messages typically encountered in batch style applications. 

 

Timers

 

The timer sample demonstrates use of timer components to fire events at a specified interval. Two timers are deployed: a highly-available clustered singleton and a stateless timer that is deployed to all participants in a zone (cluster). The sample can be run on the single VM server or the distributed domain.

 

For more on timers, see Timer Components.

Websocket Chat

The websocket chat application demonstrates how to use SCA eventing channels to push events to browser clients over websockets. The browser client uses JQuery and JSON to receive events from a server-based channel. After deployment to the single VM runtime, the browser client is available at http://localhost:8181/chat/chat.html.

The sample can also be deployed to a distributed domain. If more than one runtime is launched in a zone, the chat channel will replicate messages to every member in the cluster. This makes it possible for browsers connected via websockets to different runtimes to receive events broadcast by other members in the cluster.

Info

Note browser support for Websockets is required for the chat sample.

...

Wiring

This sample demonstrates sending monitor events to a custom channel. The channel is bound to a Websocket address, allowing monitor events to be pushed to a browser using JQuery. After deploying the application, point a browser to http://localhost:8181/monitor/monitor.html to receive events. Every fifth event is an error event displayed in red.For more information on using Fabric3 monitors to broadcast application events and log messages, see Monitoring and Logging.illustrates advanced wiring techniques including ordered injection and Map-based service references. These features are useful for applications that require support for extension points such as a message-processing service or rules engine that must dispatch to handlers or rule evaluators. A number of patterns are covered, including registries, white board and key-based message dispatch.