Home > Blogs > VMware vFabric Blog


Sneak Peak at VMware’s Nanotrader Reference Architecture

(Note: See a newer article on the renamed SpringTrader.) vFabric’s Reference Application, Nanotrader, provides customers with an end-to-end solution for developing, provisioning, and managing a distributed application in a cloud environment. The reference application and architecture provide customers and partners with a blueprint for development, infrastructure, and operations teams.

The Nanotrader application is based on the web based Trading application, Day Trader. The legacy Day Trader application provides context for application modernization by representing the “before” picture while Nanotrader provides developers with a blueprint for achieving the “after” picture. Functionally, both applications allow users to login, view their portfolio, lookup stock quotes, and buy or sell stock shares. However, this is where their similarity ends. The following table describes key high-level differences in the application design:

The VMware Nanotrader Architecture

See Nanotrader High-Level Architecture to the left for reference.

1. Presentation – Nanotrader’s user interface is built upon open standards such as HTML 5, CSS 3, and Javascript. The user interface provides an optimized experience for clients with different form factors: browser, tablet or phone. The majority of the client side code is shared regardless of the client type.

Register for VMworld!
Click Here

Register for Session TEX1409 – A Reference Architecture for Cloud Application Design using VMware’s vFabric and vSphere:
Click Here

Follow all vFabric updates at VMworld on Twitter:
Click Here

Follow us @vmwareappmgmt:
Click Here

Unlike legacy presentation techniques, the reference application never performs full-page refreshes from the server side (multi-page interface). Once loaded, the client side invokes the server side application services to retrieve data in JSON format. This way, only sections of the page that have changed are updated. This approach improves client side performance and overall usability of the application. Developers commonly refer to this approach as a single page interface

2. Application Services Application functionality is exposed through lightweight, REST style services that expose JSON. The Application Services interact with the Data Tier to retrieve information on behalf of the client. For long running processes (such as buying and selling stocks), these services place a message onto the Message Broker for asynchronous processing.

3. Message Broker The Message Broker is used for asynchronous processing and for inter-JVM processing between the Application Services and Integration Services. The Message Broker also decouples these services, allowing the Integration Services to be taken offline for maintenance while the Nanotrader application remains online.

4. Integration Services The Integration Services are responsible for processing long running business transactions. These services listen for messages that arrive at the Messaging Broker and perform the required integration. In the case of Nanotrader, buy/sell operations perform the following multi-step process: orders are created, account balance updated, holdings updated, and stock volatility simulated.

5. Data Tier Nanotrader leverages an in-memory, SQL based database, which is built on a “shared nothing” architecture eliminating disk I/O which plagues traditional databases.

VMware Nanotrader Development Architecture: Spring and vFabric

The vFabric reference application uses modern frameworks to ensure high developer productivity, promote unit testing, and allow developers to focus on the application logic vs. infrastructure coding. The following diagram depicts the key technologies used in the Nanotrader reference application:

A) Nanotrader leverages “state of the art” client side technologies such as HTML 5, CSS 3, JQuery, Backbone, and Bootstrap. Static resources are served from vFabric Web Server.

B) The Application Services leverage the enterprise proven Spring Framework to expose REST style services to the browser. Spring Data JPA provides simplified access to SQLFire, Spring Integration provides code free connectivity with RabbitMQ, and Spring GEMFire combined with Spring’s Cache Abstraction provides declarative, application tier caching. Specifically, the Application Services embed a peer-to-peer GEMFire Cache in the deployment unit to allow caching of authorization tokens for the REST API. Spring Security is used to protect the services from unauthorized access.

C) RabbitMQ provides the inter JVM connectivity between the Application Services and Integration Services.

D) The Integration Services primarily leverage Spring Integration to receive messages from RabbitMQ. The framework also choreographs multi-step transaction with SQLFire.

E) SQLFire provides a low latency, highly scalable in-memory database. Nanotrader leverages SQLFire’s advanced partitioning capabilities to achieve web scale and eliminate the database as the performance bottleneck. Of course, other data services (e.g. vFabric Postgres or legacy RDBMS) could be used within the architecture.

Note: vFabric tc Server provides the runtime container for both the Application Services and Integration Services. vFabric TC Server is configured with EM4J (Elastic Memory for Java) to enable greater memory efficiency for Java workloads running in VMware virtualized environment.

VMware Nanotrader Operations Architecture

As previously mentioned, infrastructure for modern applications needs to be virtualized, automated, managed and monitored. In today’s cloud era, organizations need an optimized approach to accelerate application deployment across cloud environments. It’s not good enough to solely have a highly productive development experience but the infrastructure needs to be streamlined to support automated, one-click deployments of applications. There are three parts:

I. Nanotrader goes beyond the application development experience and leverages vFabric Application Director to provide automation and orchestration of the distributed application across the cloud environment. Using a model driven, service catalog based application blueprint, Application Director can deploy the distributed reference application in minutes vs. days/months seen with traditional application provisioning approaches. The following screenshot shows Nanotrader’s Application Blueprint within vFabric Application Director:

II. Once deployed, vFabric’s Application Performance Manager (APM) remains synchronized with the Application Director topology and provides deep runtime performance metrics of the reference application. APM provides real time performance dashboards to give deep insight into the distributed application. APM’s lightweight code agents provide code level diagnostic information allowing teams to quickly identify and correct problematic code.  Within Nanotrader, APM provides monitoring for both synchronous (REST – Spring MVC Endpoints) and asynchronous requests (Spring Integration, RabbitMQ).

III. VMware vSphere and vCloud round out the infrastructure to keep every element virtualized, scalable, and elastic. The features and advantages of VMware’s full infrastructure capabilities are leveraged in this architecture and provide a myriad of additional benefits from automation to high availability and more.

A sneak peak at the vFabric Reference Architecture will be available at VMworld.

About the Author: Brian Dussault is an Staff Engineer with the vFabric division of VMware and has 14+ years of experience in software engineering. Throughout his tenure, he has worked in both IT (High Tech Manufacturing, Financial Industries) and R&D positions. His experience spans multiple disciplines including web applications, integration, SOA, open source, and system design.

22 thoughts on “Sneak Peak at VMware’s Nanotrader Reference Architecture

  1. Denis Guyadeen

    It would have been great to add an analytics layer to this solution.. Cetas and Greenplum Chorus would have added icing to the cake.

    Reply
    1. Denis Guyadeen

      Serengeti would only be used to provision Hadoop VM’s (very rapidly) and Spring Hadoop allows the end user to develop MapReduce jobs (pig, hive, cascading, etc) in Spring, however with Cetas the analytics process is simplified (anyone can use it) and it can pull data from more then just Hadoop (think RDMS, NoSQL, NewSQL, etc) so it goes beyond Batch (real-time).

      Greenplum Chorus would interface with both the DB and Hadoop layers to enable a community for Data Scientists to collaborate and iterate on the same data to build Data Products.

      Reply
  2. Pingback: vFabric: 3 Points from the VMworld Opening Keynotes | VMware vFabric Blog - VMware Blogs

    1. Brian Dussault

      Load balancing on the front end (vFabric Web Server) can be handled using your preferred hardware or software load balancer. If your load balancer has an API, you can use the application director lifecycle hooks to add routes to the device dynamically. On the back end, SQLfire it’s locator technology to provide load balancing for the cache members.

      Reply
  3. Pingback: Making Sense of Spaghetti Transactions | VMware vFabric Blog - VMware Blogs

  4. Pingback: Powering Mobile Architecture with vFabric | VMware vFabric Blog - VMware Blogs

  5. Pingback: 3 Insightful vFabric Implementations to Learn From | VMware vFabric Blog - VMware Blogs

  6. Pingback: SpringSource, Cloud Foundry, and vFabric Teams at #JavaOne | VMware vFabric Blog - VMware Blogs

  7. Pingback: Find the vFabric Team at VMworld Europe | VMware vFabric Blog - VMware Blogs

  8. Pingback: vFabric @ SpringOne Next Week | VMware vFabric Blog - VMware Blogs

  9. Pingback: NanoTrader: Now The SpringTrader Reference Architecture | VMware vFabric Blog - VMware Blogs

  10. Pingback: VMware vFabric Blog: NanoTrader: Now The SpringTrader Reference Architecture | Strategic HRStrategic HR

  11. Pingback: Q&A with Brian Dussault | VMware vFabric Blog - VMware Blogs

  12. Pingback: VMware vFabric Blog: Q&A with Brian Dussault | Virtualization

  13. Pingback: The Best VMware vFabric Stories of 2012 & What’s In Store for 2013 | VMware vFabric Blog - VMware Blogs

  14. Pingback: 5 Characteristics of a Modern Mainframe Cloud App – Avoid Tornado IT | VMware vFabric Blog - VMware Blogs

  15. day trading

    Hello would you mind stating which blog platform you’re using?
    I’m looking to start my own blog in the near future but I’m
    having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for something
    completely unique. P.S Apologies for getting off-topic but I had
    to ask!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>