Download presentation
Presentation is loading. Please wait.
Published byStephany Collins Modified over 8 years ago
1
SWE 622 Exchange Project Team 1 Design Review Spring 2009 Yanyan Zhu Virat Kadaru Koji Hashimoto Stephanie Buchner
2
Project Design Overview Design Issues/Questions Planned Experiments Implementation Plan Agenda
3
Design Modules: Middleware Only job is to connect, send and receive messages. Does not care about type of message being sent. Has threads for sending, receiving, detecting connection failure etc. Notifies trader/exchange of connection or delivery failure Trader Each Trader is an Independent process Has a reference to its own Middleware instance. Maintains a list of Order echo’s received. Exchange Each Exchange is an Independent process. Has a reference to its own Middleware instance. Maintains a list of Goods currently sold being sold and previous orders processed. Messages Many types of messages (order, echo, offset, etc) Contains a super class ‘Message’ which acts as a header Each message type (order, echo, etc) is a sub class of Message Project Design Overview
4
Exchange List of GoodsList of Traders Project Design Overview RMI Send (async.) Receive (callback) List of OrdersList of Exchanges Sending Thread Connection Thread Trader Middleware PToP Heartbeat Thread Processing Thread Receiving Thread Connection Failed (callback) : rmi/p2p : msg
5
OrderGenerator Generates orders automatically at a desired frequency Can be stopped or started at anytime Configuration Contains information about the exchanges Type of communication (RMI/PToP) Other information like IP and port of RMI registry etc. Project Design Overview
6
Design Issues/Solutions Absence of global clock Order of echos/late echos
7
Design Issues/Solutions Absence of global clock – Which one has the correct time or which one to follow? – All nodes do not communicate with each other Solution – Each trader maintains an offset relative to each exchange that it is connected to – Actual communication begins only after the offset is applied Other issues – How many samples of the offset should be taken? – Should they be averaged? – What about max and min values?
8
Trader’s List of Order Echoes – Verify Requirement: Display all order echoes in the order they were processed. Some echoes may be outstanding (late) and may not appear on the list. (A later order may appear, an earlier order is not on the list yet.) When a late echo appears, place in correct order. Mark as stale if > 10 seconds late. Design Issue
9
Tools used in evaluation - AspectJ - Systems will communicate over a VPN Dependent variable -Change configuration files at client side Performance Evaluation
10
Measure the latency between issuing an order and the last trader receiving its echo -Conduct this evaluation at client application level -Assumption: Trader T i issues an order to Exchange E y -Get T i ’s time t(T i ) before issuing order -Get last Offset value (O xy ) between T x (Trader x) and E y (Exchange y) before t(T i ) with (1<=x<=n), n:=trader number -Get each T x ’s time t(T x ) after receiving echo for T i ’s order A -The latency := Max( t(T x ) - O xy ) Performance Evaluation Issue 1 1<=x<=n
11
Measure the latency between trader’s failure and the last exchange stopping order echoes -Conduct this evaluation at client application level -Both Trader and Exchange applications register listeners to the Middleware, and middleware heartbeat each other -Assumption: Trader T i goes down -Get last Offset value (O iy ) between T i and E y with(1<=y<=m), m:= exchange number -Manually record T i ’s failure time ft(T i ) -Get the time st(E y ) when E y decides to stop echoing to T i -The latency := Max(st(E y )-O iy ) Performance Evaluation Issue 2 1<=y<=m
12
Calculate Clock Skew -Not using Global Network Protocol. -Trader and Exchange send offset messages periodically -Get all Offset values (O xy τ ) between T x and E y at τ time unit -Average Clock skew := AVG (O xy τ – O xy τ +1 ) -Maximum Clock skew := MAX (O xy τ – O xy τ +1 ) -The frequency of calculation is not decided yet. Performance Evaluation Issue 3
13
Roles and Responsibilities Trader – Virat and Stephanie Exchange – Koji Middleware – Koji, all Experiments – Yanyan, all Implementation Plan 3/223/294/54/124/194/264/30 Coding Testing Coding Experiment Presentation Prj2 Prj3 Development Timeline Prototype Implementation Evaluation Experiment
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.