The Talon Manual

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

In This Section

Overview

As described in the The Talon Architectural Building Blocks section a Talon application consistsof the following ingredients: 

  • Modeled Messages: plain old java objects that are generated from an xml model that are used to communicate between apps. 
  • Modeled State: plain old java objects that are generated from an xml model that make up your applications persistent state. 
  • A Main Class Entry Point: serves as your application's entry point. This class defines event handlers that perform your application's business logic in response to received messages. The main class
  • Config DDL: An xml deployment descriptor model that configures applications, message buses, and application containers (XVMs) that together operate as a system of inerconnected and collaborating agents that provide overall business functions.  

This section introduces each of these ingredients at a high level as it pertains to starting a new project with Talon. Before digging into the sections below be sure to check out:

Project Layout

Assuming you haven't already starting tweaking the starter app introduced in the Get Started section, a good way to get started with developing a new Talon application is to use the Talon maven archetypes which generate bare bones functioning applications and project structure. The folder structure shown below reflects a typical project layout for a Talon as created using the talon-sr-processor maven archetype.

Breaking it down we can see:

Java Source Folders

  • The main class Application.java which contains the application's business logic in defined Event Handlers
  • Send and Receive drivers which are test applicatons used to drive traffic to the main application.

Model Source Folders

  • state.xml Contains the xml model defining the application's state
  • message.xml Contains the xml model defining the applications messages.

Test Source Folders

  • A TestFlow class which runs all of the applications in the JVM for easy testing of the entire application in a single process.

Conf Folder

  • Contains the DDL config.xml which defines:
    • Each applications in the project (in this case Application, Sender and Receiver
    • The message buses they use to communicate with one another
    • ...and The Talon XVMs, the contains used to launch instances of each application.

Maven Pom

  • The Talon archetypes use Maven to ease build and dependency management.
  • If you are using a different build tool you might have an additional library folders and build scripts.

 

The above project structure is a good starting point to use when starting to initially develop a single application. As the number of applications you are developing grows, you will likely want to consider separating out your parts of your state and message models into a separate project that is shared between multiple projects.

Message and State Modeling 

The state.xml and message.xml 

Continue Reading: Modeling Message and State

 

Config Deployment Descriptor

See Also: Understanding Configuration

 

  • No labels