RSMS Final Presentation
description
Transcript of RSMS Final Presentation
RSMS Final PresentationRSMS Final PresentationCOMP 415COMP 415
December 5, 2005December 5, 2005
Remember!Remember!Please put in your name for the Please put in your name for the raffle for a free copy of Visual raffle for a free copy of Visual Studio 2005 Professional and SQL Studio 2005 Professional and SQL Server 2005 StandardServer 2005 Standard
““Real World” Software Real World” Software EngineeringEngineering• Fictitious Software CompanyFictitious Software Company
– Six studentsSix students– One semester development cycleOne semester development cycle
• Real Customer: HBK InvestmentsReal Customer: HBK Investments– Student lead customer interactionStudent lead customer interaction
• Conference XP MeetingsConference XP Meetings• Customer Resources Sharepoint Site and E-Customer Resources Sharepoint Site and E-
mailmail• Trip to DallasTrip to Dallas
What does HBK want?What does HBK want?
Stock Market SimulatorStock Market Simulator
– Plug-inPlug-in HBK stock market participants HBK stock market participants– PushPush market information to the clients market information to the clients– InteractInteract with historical market data with historical market data– ImplementImplement some broker behaviors some broker behaviors
A Robust, Scalable, ExtensibleA Robust, Scalable, Extensible
Stock Market OverviewStock Market Overview
• NYSE, NASDAQ, NIKKEINYSE, NASDAQ, NIKKEI• Auction-StyleAuction-Style
– Post BidsPost Bids– Post OffersPost Offers– Transact if they matchTransact if they match
• Time criticalTime critical• Huge data throughputHuge data throughput• Market strategy critical to successMarket strategy critical to success
Development Life CycleDevelopment Life Cycle
DeveloperDeveloper CustomerCustomer
Customer Driven Customer Driven DevelopmentDevelopment• Initial specificationInitial specification• Proof of concept codeProof of concept code• Small development cyclesSmall development cycles
Customer Driven Customer Driven DevelopmentDevelopment
DevelopmentDevelopment Customer FeedbackCustomer Feedback
ReleaseRelease
Development EnvironmentDevelopment Environment• Venture into new technologies and Venture into new technologies and
architecturesarchitectures– .NET Framework 2.0 Development.NET Framework 2.0 Development
(August CTP => RTM)(August CTP => RTM)– Visual Studio 2005 Team Suite EditionVisual Studio 2005 Team Suite Edition– Visual Studio 2005 Team Foundation ServerVisual Studio 2005 Team Foundation Server– SQL Studio 2005 Enterprise Edition/Developer EditionSQL Studio 2005 Enterprise Edition/Developer Edition– Microsoft SharePoint TechnologiesMicrosoft SharePoint Technologies
Development EnvironmentDevelopment Environment
• Unit Testing Capabilities built into the Unit Testing Capabilities built into the Development EnvironmentDevelopment Environment
• Performance ProfilingPerformance Profiling• Refactoring CapabilitiesRefactoring Capabilities• Team Collaboration through Team Collaboration through
SharePoint, Team Foundation ServerSharePoint, Team Foundation Server
Team Foundation ServerTeam Foundation Server
TeamFoundatio
nServer
Team Foundation Server Client
Visual Studio 2005
VersionControl
WorkItems
TeamBuild
SharePointTeamSite
RSMS ArchitectureRSMS Architecture
• Market EngineMarket Engine• Broker LayerBroker Layer• Market Statistics AggregationMarket Statistics Aggregation
MarketMarket
QuoteQuoteServerServer
ClientClient
• Pushes (vs. Polling) Market Pushes (vs. Polling) Market DataData
• Best Bids and OffersBest Bids and Offers• ExtensibleExtensible
• HumanHuman• Historical DataHistorical Data• Unmanaged C++ ClientUnmanaged C++ Client
Quote ServerQuote Server
Market Web ServiceMarket Web Service
Overall ArchitectureOverall Architecture
CLI
EN
TSE
RV
ER
Market Data-StoreMarket Data-Store
Human ParticipantHuman Participant ITCH ParticipantITCH Participant C++ ParticipantC++ Participant
Quote ServerQuote Server
Market Web ServiceMarket Web Service
MarketMarket
CLI
EN
TSE
RV
ER
Market Data-StoreMarket Data-Store
Human ParticipantHuman Participant ITCH ParticipantITCH Participant C++ ParticipantC++ Participant
Data-Store AdaptorData-Store Adaptor
ASP.NET Web ServiceASP.NET Web Service
SQL Server 2005 DatabaseSQL Server 2005 Database
MarketMarket
• Service Oriented Architecture (SOA)Service Oriented Architecture (SOA)• Use of ASP.NET Web ServicesUse of ASP.NET Web Services• Exposes Service ContractsExposes Service Contracts• Stateless ArchitectureStateless Architecture
MarketMarket
• AdvantagesAdvantages– Focus ourselves on exposing services to Focus ourselves on exposing services to
be consumed by othersbe consumed by others– Interoperability between different Interoperability between different
PlatformsPlatforms– Built upon existing technologies such as Built upon existing technologies such as
HTTP, IIS and XMLHTTP, IIS and XML– Scalable ArchitectureScalable Architecture
Market OverviewMarket Overview
RSMS MarketRSMS Market
Web Service ProxyWeb Service Proxy
Data-Store AdaptorData-Store Adaptor
SQL 2005 DatabaseSQL 2005 Database
HTTP/IISHTTP/IIS
Web Service FaçadeWeb Service Façade Quote ServerQuote Server
Roles of the MarketRoles of the Market
• Market EngineMarket Engine– Accepts ordersAccepts orders
• via Web Servicesvia Web Services
– Stores ordersStores orders• via SQL technologyvia SQL technology
– Matches ordersMatches orders• via SQL queriesvia SQL queries
– Generates and Stores transactionsGenerates and Stores transactions– Pushes data to Quote Servers (using Pushes data to Quote Servers (using
MSMQ – Microsoft Message Queuing)MSMQ – Microsoft Message Queuing)
Role of the MarketRole of the Market
• Simulated TimeSimulated Time– Allows the Market to run faster or slower Allows the Market to run faster or slower
than real-time (for Historical Data)than real-time (for Historical Data)
• Broker LayerBroker Layer– Encapsulates Market IntelligenceEncapsulates Market Intelligence
• Market Statistics AggregationMarket Statistics Aggregation– Participant/Stock Statistics, Total Traded Participant/Stock Statistics, Total Traded
Volume/Amount, etc.Volume/Amount, etc.
Quote ServerQuote Server
Market Web ServiceMarket Web Service
Quote ServerQuote Server
CLI
EN
TSE
RV
ER
Market Data-StoreMarket Data-Store
Human ParticipantHuman Participant ITCH ParticipantITCH Participant C++ ParticipantC++ Participant
MSMQMSMQ
Data-Store Adaptor
Data-Store Adaptor
Data-Store AdaptorData-Store Adaptor
ASP.NET Web ServiceASP.NET Web ServiceWindows Application/ServiceWindows Application/Service
SQL Server 2005 DatabaseSQL Server 2005 Database
The Quote ServerThe Quote Server
• Allows Clients toAllows Clients to– Listen to Market EventsListen to Market Events
• New, Modified and Deleted OrdersNew, Modified and Deleted Orders
– Listen to TransactionsListen to Transactions– Listen to Changes in Best Bids/OffersListen to Changes in Best Bids/Offers
• Pushes data to Clients via .NET Pushes data to Clients via .NET RemotingRemoting
Reliable Message PassingReliable Message Passing
• Use of MSMQ (Microsoft Message Use of MSMQ (Microsoft Message Queuing)Queuing)
• Allows a cluster of Market Servers to Allows a cluster of Market Servers to pass messages to another cluster of pass messages to another cluster of Quote Servers using MulticastingQuote Servers using Multicasting
• .NET Programmability Support means .NET Programmability Support means passing of managed objects passing of managed objects (serialized)(serialized)
Scalability ConcernsScalability Concerns• Market (Web Service)Market (Web Service)
– Application can be deployed as Application can be deployed as Web Gardens/Web FarmsWeb Gardens/Web Farms
– Backend SQL Database can also be Backend SQL Database can also be deployed as a fail-over SQL clusterdeployed as a fail-over SQL cluster
– High Availability and ScalabilityHigh Availability and Scalability• Quote Server (Windows Quote Server (Windows
Service/Application)Service/Application)– Application/Service can be deployed on Application/Service can be deployed on
multiple serversmultiple servers– MSMQ Multicasting causes virtually no MSMQ Multicasting causes virtually no
overhead for adding Quote Servers to the overhead for adding Quote Servers to the MarketMarket
The Big PictureThe Big Picture
Offer
Event
Bid
Quote ServersQuote Servers
Market Market Web Service Web Service
ClusterCluster
Market Market Data-StoreData-Store
SQLSQLServerServer
20052005
ASP.NETASP.NETWebWeb
ServiceService
MSMQ IP Message MulticastMSMQ IP Message Multicast
Transact
BenchmarkBenchmark
• Dell Precision WorkstationDell Precision Workstation• Dual Intel Xeon 3.4Ghz ProcessorDual Intel Xeon 3.4Ghz Processor• 1GB DDR2 Ram1GB DDR2 Ram• Western Digital 80GB HardriveWestern Digital 80GB Hardrive• Windows 2003 Enterprise EditionWindows 2003 Enterprise Edition• SQL Server 2005 Enterprise EditionSQL Server 2005 Enterprise Edition• Market Web Service on IIS 6.0Market Web Service on IIS 6.0• Quote Server Enabled (no Clients Quote Server Enabled (no Clients
Connected)Connected)
Benchmark ResultsBenchmark Results
Benchmark ResultsBenchmark Results
Benchmark ResultsBenchmark Results
ServerServer
•Management ConsoleManagement Console–Resetting MarketResetting Market–Viewing/Querying Bids and OffersViewing/Querying Bids and Offers–Browsing Past Transactions and Market Browsing Past Transactions and Market OrdersOrders–Viewing Market StatisticsViewing Market Statistics–Displaying Participant Information and Displaying Participant Information and StatisticsStatistics–Displaying Stock Information and StatisticsDisplaying Stock Information and Statistics
ServerServer
•Benchmarking DemonstrationBenchmarking Demonstration•Load TestingLoad Testing
Quote ServerQuote Server
Market Web ServiceMarket Web Service
ClientClient
CLI
EN
TSE
RV
ER
Market Data-StoreMarket Data-Store
Human ParticipantHuman Participant ITCH ParticipantITCH Participant C++ ParticipantC++ Participant
.NET Remoting.NET Remoting SOAP Web Service CallsSOAP Web Service Calls
Client API OverviewClient API Overview
RSMS Client (Inherits AParticipant)
RSMS Client (Inherits AParticipant)
Policy Enforcer LayerPolicy Enforcer Layer
Initialization & DiscoveryInitialization & Discovery
Unified Data Representation
Unified Data Representation
Market Network AdaptorMarket Network Adaptor
Quote Server AdaptorQuote Server Adaptor
ValidationValidation
The ClientThe Client• Scalable Application FrameworkScalable Application Framework
– Participant APIParticipant API– Enforcer LayerEnforcer Layer
• Major participants:Major participants:– Human ParticipantHuman Participant– Historical Data ParticipantHistorical Data Participant– Unmanaged C++ ParticipantUnmanaged C++ Participant
Human ParticipantHuman Participant ITCH ParticipantITCH Participant C++ ParticipantC++ Participant
The Human ParticipantThe Human Participant
• Post Bids and OffersPost Bids and Offers• Cancel ordersCancel orders• View market eventsView market events
– Market data is pushed to the GUIMarket data is pushed to the GUI
• Graphs market informationGraphs market information
Human ParticipantHuman Participant
The Historical Data The Historical Data ParticipantParticipant• Reads historical data from filesReads historical data from files• Uses parsers for specific file formatsUses parsers for specific file formats
– ITCHITCH
• Uses market time to send ordersUses market time to send orders
ITCH ParticipantITCH Participant
The Unmanaged C++ ClientThe Unmanaged C++ Client
• Interacts with black box Interacts with black box applicationsapplications
• Listens for events from Listens for events from applicationsapplications
• Pushes market data to Pushes market data to applicationsapplications
• External applications are External applications are decoupled from RSMSdecoupled from RSMS C++ ParticipantC++ Participant
Architecture ExtensibilityArchitecture Extensibility
• Architecture decoupled and scalableArchitecture decoupled and scalable– Participant FrameworkParticipant Framework
• Allows any proprietary protocol to interact Allows any proprietary protocol to interact with the marketwith the market
• Easily extendedEasily extended
– Policy Enforcer FrameworkPolicy Enforcer Framework• Transparent and secureTransparent and secure• Ensures participant integrityEnsures participant integrity
– Not specific to any type of marketNot specific to any type of marketExtensible
SecureTransparent
ClientClient
•Initialization FormInitialization Form•Log inLog in•Specify MarketSpecify Market•Specify ParticipantSpecify Participant•Connect to Quote ServerConnect to Quote Server
ClientClient
•Human Participant GUIHuman Participant GUI–Market tabMarket tab–Current bids and offersCurrent bids and offers–SortSort–Cancel bid or offerCancel bid or offer–Post matching bid or offerPost matching bid or offer–External modification of orders pushed to External modification of orders pushed to GUIGUI–Pump historical dataPump historical data–Graphical data analysisGraphical data analysis–Query best prices Query best prices
ConclusionConclusion
MSMQMSMQ .NET Remoting.NET Remoting Pushes Market Pushes Market
EventsEvents ExtensibleExtensible ScalableScalable
Market Web Service Quote Server Client
Architecture Service Oriented Service Oriented
ArchitectureArchitecture High AvailabilityHigh Availability ScalabilityScalability SOAP/XMLSOAP/XML SQL DatabaseSQL Database TransactionsTransactions
ExtensibleExtensible SecureSecure Market AdaptorMarket Adaptor Quote Server AdaptorQuote Server Adaptor Policy EnforcersPolicy Enforcers
Complete Architecture for Stock Market Simulation/Strategy Testing
A Special Thanks to…A Special Thanks to…
Thank you for Coming!Thank you for Coming!And the winner is…And the winner is…