Home arrow Technology
The Distributed Application Framework
TAF Architechture Overview


technology_mini.jpg

All TAF Co. software is built upon the Trading Application Framework (TAFTM), which facilitates rapid deployment of distributed, high-performance, fault-tolerant services, with such features as network load balancing and smart routing, remote network, service monitoring and maintenance, automatic self-diagnostics, and much more.

TAFTM is highly adaptable to a wide range of industry-standard and proprietary API's and middleware. Its multi-layer architecture is built upon the well-known and widely accepted ACE platform and TAFTM software reaps the portability benefits of ACE, enabling us to deliver our products on Windows (NT/2000/XP), Solaris (2.5-10), and Linux.

The ZIRCOMPTM adaptive distributed computation platform is just one of the higher-level applications that our framework makes possible. See http://www.zircomp.com for details. 

The Distributed Application Framework serves as a foundation for all business modules, services, and applications. It implements the major concepts of the design philosophy behind all TAF Co. products. As the lowest major layer in our systems’ architecture, it provides the highly optimized domain-independent building blocks on which all of our business logic implementation relies. Developed with a specific focus on scalability and performance under heavy loads, this infrastructure layer encapsulates many low-level details of effective distributed application design in several elegant abstractions.  

Distributed applications built using the TAFTM framework are generally decomposed into multiple independent logical units that communicate via asynchronous message passing. Hence, the basic building block in this framework is the Router Task, an object that combines a high-performance, thread-safe queue and a pool of threads. As an active object, the Router Task decouples the originator of a given request from the object or thread that processes it, and it is the basic pattern facilitating asynchronous message processing in all TAFTM products. However, unlike many common implementations of this pattern, it relies solely on compile-time binding of request types to request handlers, avoiding the run-time overhead and the often cumbersome inheritance hierarchies otherwise required to enable such polymorphism. The use of C++ templates provides an elegant and type-safe interface for users of Router Tasks. Moreover, the ability to tie an unlimited number of logical Router Tasks to a fixed-size pool of processor threads allows for a highly scalable design that frees the developer from being concerned with the underlying system’s multi-threading limitations when laying out the logical structure of an application.

The TAFTM framework further accommodates high-volume data processing with its introduction of the Bubble Queue, a modification of a Router Task for receiving data more rapidly than it can be consumed. This structure allows queued elements to accumulate updates while still waiting to be processed by the underlying Router Task, and this technique is especially handy when processing a huge load of real-time market prices for a fixed set of securities. In such applications, the consumer process is most often interested in a given security’s latest price at the moment that its price data is processed, and this allows all intervening price updates to essentially be collapsed without any performance cost.

And what if the end consumer is an analytical model (or, say, a 1-min bar maker) that requires all historical prices? The Bubble Queue likewise provides an elegant solution, allowing each of a Router Task’s queued elements to contain an internal queue of real-time updates. Like all queues, such internal queues are thread-safe and optionally bounded in size to keep the process’ memory usage within reasonable limits.

Another fundamental component covers network communications, supplying reliable multicast, multicast over a TCP/IP bridge, synchronous and asynchronous procedure calls over the network, and automatic discovery of network services. The TAFTM Network Channel was designed with an interface quite similar to the Task API, so that formerly collocated Tasks may be easily distributed across different processes while maintaining their logical status as the fundamental indivisible units of a distributed system. Answering a common need for decoupling the generation of requests from their transport across the network for remote execution, the Connection Handler provides a proxy for remote services, complete with a persistent queue of requests and automatic network connection recovery.

The Service Framework, a component that interfaces directly with the underlying ACE middleware, assists in the rapid development of applications that take advantage of this versatile multi-threaded environment. From the user’s standpoint, it provides a unified server skin with signal managing, exception handling, effective (and, of course, thread-safe) logging, and many other general features common to most servers.

In addition to the basic components outlined above, the Distributed Application Framework offers facilities for network monitoring, the collection and dissemination of statistics, and integration with third-party threading models (such as Windows, for instance). These capabilities are automatically inherited by all TAFTM servers and allow for easy administration of entire systems of such servers without the need for any dedicated development effort. Among other services, a GUI module displays the real-time status of all servers running in a network and allows an operator to start, stop, suspend, and resume these servers. It also collects and shows dynamic information about all process Tasks, including the assignment of logical Tasks to physical thread pools and the load on each Router Task queue. This arrangement is in keeping with the ideology that the Task is the logical computing unit while the thread pool and process to which a Task is assigned are of secondary importance, to be reorganized pragmatically.

On top of the generic Distributed Application Framework, TAF Co. has developed a Business Layer that utilizes the mechanisms outlined above for domain-specific distributed business applications. The Business Layer is geared towards providing a universal data representation and storage format for processing extremely large (terabyte-range) amounts of historical data for model simulation and real-time data for trading. The modularity of this framework allows developers to set up trials of new concepts for testing and models for trading with ease. In all aspects of this product, the end game is always to minimize the time from concept testing to trading. The advanced graphical representations included in the Business Framework, along with interoperability with Excel and Matlab, provide an added benefit.

The main abstractions defined in the Business Layer are the Point and the Series. The Point is a collection of floating-point values with corresponding keys, much like a spreadsheet row. The Reader and Writer classes provide fast, multi-threaded serialization for large amounts of data (represented as Point objects). The Series object defines a set of keys, and can be used to query for matching Point instances. In addition to this basic data representation, the Joiner allows one to collect 3-D cubes of Series, creating an ad hoc database. In testing, these objects were used to process raw OPRA and TAQ data to produce minute bars, which were then played over the Correlation Strategy Engine to verify the theory.

The Business Layer services include the Order Book, the Position Server, and the Analytic Server. These applications are applicable to both historical evaluation and real-time trading, and can be extended to serve specific needs.

TAF Architechture

 

architecture.jpg
 
Copyright 2003 - TAFcorp
The Trading Application Framework TAF™ and all TAF™ products are the sole property of TAF Co., all rights reserved.