Date post: | 22-Dec-2015 |
Category: |
Documents |
View: | 220 times |
Download: | 1 times |
Team A
3PB ProjectMidterm Progress Report
Original System Design
Current System Design
Server
Listener
Parser
Data Manager
3PB Computer
User
Interface
Display
User Interface
Server
Listener
Parser
Data Manager
3PB Computer
User
Interface
Display
User Interface Instantiate other classes (eg DataManager,
Listener) Get user authentication -- Listener Get stock symbol and time resolution from
user Send the symbol to Listener to register -->
Real Data Service
User Interface Send time resolution to Data Manager --
DataManager Display textual data -- Display Display activity (should be done for the first
iteration, but not yet) Display raw TOS data (should be done for the
first iteration, and it is!)
Data Manager
Server
Listener
Parser
Data Manager
3PB Computer
User
Interface
Display
Data Flow
Data Manager
3PB Computer
ParserUser Interface
DisplayTOS sampled every
time resolution
time resolution
3PB output (event)
TOS sampled every time resolution
new TOS
Data Manager Samples incoming TOS in 1-sec
interval (using sample-and-hold) Stores samples When sample for the next Time
Resolution is available, passes it to 3PB Computer
Pros: Independent of local system time Doesn’t need to be in separate thread
Data Manager
RecordTOS( newTOS ) called by Parser samples TOS, and store new samples when sample available for next Time
Resolution(s), passes it to 3PBComputer
Data Manager ChangeTimeResolution( newResolu
tn ) called by UserInterface changes Time Resolution starts from first sample and passes
sample at every new Time Resolution to 3PBComputer
3PB Computer Computes trends and break prices
using 3PB method from TOS data. Passes outputs to a Display.
3PB Computer FirstTOS( tos )
called by DataManager initializes starting price
NextTos( tos ) called by DataManager uses 3PB method to compute trend
and price break if has output, generates event for
Display
Server/Listener
Server
Listener
Parser
Data Manager
3PB Computer
User
Interface
Display
Server Sends TOS data every 2 seconds Threaded
One thread sends data One thread listens to the client
Allows stock symbol and price to change
Listener Threaded in a similar fashion. Functions:
Opening and closing a server connection
Stores username/password Sends stock/price changes to server
Sends server data to a Parser
Parser Packages server data into a TOS
object Implementing the Adapter Design
Pattern via Java Interfaces Sends data to DataManager
Overview of Demo Dummy data server starts UserInterface gets user ID, password,
stock symbol and initial time resolution Data server sends TOS every 2 seconds Listener gets raw stream and displays it ThreePBComputer computes and
displays results
What We’ll Do Next Allow user to change stock symbol Display trend information Indicate Fibonnaci points Connect to Real Data Service Indicator to show program running Codify Coding Conventions Organize CVS repository
Pros of XP Discovering design problems
earlier Easier debugging Larger skill set Problems can be solved in parallel No marathons – You are forced to
walk away from the code
Cons of XP Inter-pair Communication No detailed overall design Scheduling Can’t always work when the mood
strikes