In This Section

Overview

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

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

Messages and State objects are generated by Talon's Application Data Modeler (ADM) from xml models. 

Continue Reading: Modeling Message and State

Application Event Handlers

 

Config Deployment Descriptor

 

See Also: Understanding Configuration