Monitoring Trading Applications with Flex Yakov Fain Farata Systems
What is this talk about What makes Flex suitable for financial applications The power of Flex data processing Flex Communication protocols Best practices: using the CDB code generator Developing a monitoring dashboard for financial applications
Introducing Farata Systems
The Timeline Min 2-10 Flex communication protocols Min 11-20 Auto-generation of the CRUD Flex/Java/BlazeDS/Tomcat/MySQL application with Clear Data Builder 3.0 Min 21-30 Addition of the pre-created Charting and Consumer components and a sample Java data feed Min 31-45 Code overview and Q/A
Why Flex is suitable for financial applications Browser-independent,secure runtime:flash Player VM Fast communication protocols that are extendable Support of the real-time server push and messaging Natural integration with J2EE systems Java or.net developers can be easily Flex-trained Flex is an open source product with great community
Who s da man in a RIA project? Jessica, The Trader Steve, User Experience Designer Yakov, Front-End Developer Mary, Back-End Developer
Who s da man in a RIA project? Jessica, The Trader Steve, User Experience Designer Yakov, Front-End Developer Mary, Back-End Developer
Who s da man in a RIA project? Dear user, I m your friend again! What do you want me to change?
Communication protocols Active Messaging Format (AMF): binary HTTP-based protocol, compressed, RPC or polling Java (C#, Python, Ruby) objects get serialized on the server and deserialized inside the Flash Player. Real-Time Messaging Protocol (RTMP): binary socket-based messaging protocol Supports real server push, can be extended and enriched, publish-subscribe paradigm
Flex/Java communications today Live Cycle Data Services ES v. 2.5 $$$$ AMF protocol uses binary RPC or polling channels over HTTP with significant performance and bandwidth advantages over text-based HTTP. Channels can be created on the fly or configured with failover URIs. RTMP binary socket-based protocol based on messaging (Consumer/Producer). LCDS 2.5 includes RTMP server. BlazeDS free AMF, StreamingAMF, Long-Poll AMF, Long-Poll HTTP (blocking I/O) HTTP-based end-points are used for messaging (no RTMP, no server push) Near-real-time messaging (ties up a thread on the server) Farata s class library theriabook supports server push over BlazeDS the server can make RPC calls on the client
Enhancing RTMP for a foreign-exchange trading application We were invited to evaluate suitability of Flex protocols for an FX trading application. Here s what we ve added to RTMP: Handling network congestions QoS info to messages Processing of out-of-sequence messages Reverse RPC ( the server code calls functions on the client)
FX Trading Application
LCDS ES 2.6 public beta An HTTP request comes with keep alive connection You ll get a Connection object from the new Servlet API (JSR 315). Client s HTTP request uses non-blocking I/O, and the server can keep thousands of open connections (no threads, no synchronization). The server will be able to identify the client. LCDS 2.6 comes with NIO-based HTTP Server that supports polling and long polling. It s not sevlet-based and does not create a thread for each request.
Monitoring logs with Flex and Java
A Monitoring Application
On the client: Tools utilized in this demo 1. Eclipse (Eclipse foundation), Java, (Sun Microsystems) free 2. Flex Builder plugin for Eclipse, Flex framework (Adobe) free for me 3. Clear Data Builder Plugin 3.0 Beta (Farata Systems) free 4. Component Library theriabook (Farata Systems) free On the Server 1. Tomcat (Apache) free 2. BlazeDS (Adobe) free 3. MySQL Server (Sun Microsystems) free
Contact info Email: yfain@faratasystems.com I ll be running public Flex training on June 2-6, 2008 in this very building Web sites: www.faratasystems.com www.myflex.org Components for Flex 3 will become free in June 08 www.theriabook.com