CSPP 57100
Lab 1 Home Page
Lab 1 Page
Laboratory in Object Oriented
Technologies
Spring 2011
NB: If you have not already signed up for the course list, do so here.
Lab Description:
This first lab introduces the students to the central concepts
of frameworks, and introduces the students to:
1. the fundamentals of the .NET environment,
including both Windows and Mono, and
2. the business domain within which we will be
developing our framework: .NET within the financial markets,
and
3. the fundamentals of Framework development.
The framework you are to design and code throughout this lab
course
will support an existing code base of a trading system which I will
provide to you.
The code base for the trading system, written entirely in
C#, is available to you under my home directory's pub 57100
directory on the cluster found
at:
~mark/pub/57100/TradingSystemCode.zip
You can obtain this zip file (or a .tgz for Linux/OSX) by executing the following command from a
shell as:
scp
yourid@a_machine.cs.uchicago.edu:/home/mark/pub/57100/TradingSystemCode.zip
.
where "yourid" is your userid and "a_machine" is a machine (for
example, "ohare", listed via this
page. Just enter your user id, select Debian
Unstable and for location choose the Ryerson 4th floor labs.
The course will be taught using the Microsoft .NET Framework
utilizing C#. The default platform will be either a
platform-independent Mono environment on Linux or Mac OS X or Microsoft
Windows and the .NET Framework--it's up to you. No specific
advanced Microsoft technologies will be
required; however students may at their descretion utilize specific MS
technologies, such as Windows Communication Foundation, etc.
Basically,
the idea is this: You are to design and code an object oriented
framework in C# that provides certain foundational services that will
support the code for the existing trading system presented in the code
base. The code presents the fundamentals of using .NET to create an
equity trading system. The framework you will design and develop will
be integrated into the existing code base, and the code base will be
modified to support the framework. The code base will itself be
extended as we go through the labs to enhance its core capabilities.
Once finished, you will have a functioning equities trading system
which runs on the back of the framework you will be designing and
creating throughout the quarter. Each lab session will introduce new
concepts of the framework, and your work throughout the labs (and of
course outside the labs) will be to design and create the framework and
integrate it within your modified trading system.
By working diligently throughout the course, the student will amass practical knowledge of:
1. The fundamental features of equity trading systems, including
An order matching engine
Data conversion strategies
A market feed engine
An application engine
Security and interoperability strategies
Equity arbitrage strategies
2. Fundamental architectural patterns which facilitate the above features and fundamental features of the framework
3. Framework fundamentals and implementation
4. C# & .NET if you don't already have it
Nonetheless, there are several fundamental subsystems that we will not
be covering, including order management, risk management, limit
monitoring, position management, exchange gateways, and settlement
systems.
SETUP:
You have the choice (and there is no preference on my part which path
you choose--it's completely up to you and your preferences and goals)
of using a Windows .NET environment on a Windows computer or laptop, or
using a linux or Mac OS X box (cluster or on your laptop) running the
current Mono environment (1.9.1). So your choice of operating
system platform is completely up to you. I would like you to
inform me on
which platform you plan to be working. If you choose to run
on
Windows, download and install the current .NET 3.5 version along with
Visual Studio 2008 (all of which you can download for a period of time
free). If
you choose to run Mono either on Linux or Mac OS X, then simply
download the current version of Mono 1.9.1 and go from there.
You can get the current .NET 4.0 framework for Windows here.
Click on the Download button.
You can get the current Visual Studio 2010 for Windows student professional edition from dreamsparks here. 2010 Express C# edition is here.
Click on the "Install now..." button.
You can get the current Mono environment for multiple platforms (including Mac OS X and Linux) here:
If you're running on Windows, you can get Cygwin for Windows here.
Click on the "Install or update now" icon.
You can download the Visual Paradigm Community Edition here.
LAB 1 ASSIGNMENT (Read PNFM chapters 1 and 2).
You are to create use cases and an initial UML design for the
framework. You will find a "starter set" of use cases in my
pub/57100/Use Cases directory. You can use these as a starting
point for putting together your own set of use cases. Note that
some of the use cases are not currently used, such as archive and
manage operation. Nevertheless, these sample use cases should
give you an idea of what yours might look like (although they are a bit
light on detail). The basic idea in each use case (for the
framework capabilities listed below in bold) you are to detail your
idea of what the requirements of the framework should be. For
example, in considering the Log Information capability, what
information might the application(s) wish to log? Should they be
able to specify a log level (WARN, ERROR, INFO, etc.). Should
different actions be taken in response to each log level? How
might that be configured? Are we only logging to a file (which is
fine)? How can we make the configuration of logging easy for the
user? You may use existing logging frameworks (such as log4net)
as an example of what a robust logging framework might consist
of. You are of course not required to produce anything that would
"compete" with the capabilities of log4net. It's simply an
example that you might wish to refer to in order to see what other
designers have done.
For the UML design for the framework, I am not so much looking for a
class diagram as architecture diagrams representing how you see the
various components fitting together. You may also find such
diagrams in the PNFM text. Any diagram that shows the fundamental
services of the framework with the application layer on top is a good
start. You can also produce a "deployment" diagram sketching your
ideas on how the various components of the system will fit together
(matching engine, broadcast engine, data feed (which again is a text
file for our purposes), application & framework, etc.). Look
in the pub/57100/whiteboard.pics directory for some starter ideas on
the deployment aspects of the system. You are welcome and
encouraged to think up your own solutions for integration.
Requirements for the framework will be delivered
during the labs on an ongoing basis. After creating the initial
UML design, you are to create the high-level classes (code) that
support the framework's composition and integrate these initial main
classes (with copious stubbed out functionality) into the trading
system code base, so that it compiles and executes. You can and
should start off small, integrating your fledgling framework with just
the order matching engine to start with.
In your class design for the framework, you will want to make
significant use of inheritance and abstract classes. Although the
framework itself is linked to applications via composition, the
internals of the framework should leverage abstraction and inheritance.
Specifically, you are responsible for designing and coding the following five framework capabilities (and use cases for each):
Log Information (allows application to log information based on severity)
Exception Framework (creates a hierarchy of exceptions for the framework with alerting)
Runtime Monitoring and Tracing Service (monitors the runtime execution of the application with alerting)
Messaging Service (allows for delivery of system messages between framework and connected applications)
Notification Service (notifies via email/paging/txt msg on events)
(Note that several key components of a "real-world" framework are
missing, including persistence, security, state management, event
management, configuration management, rule management, lifetime
management, encryption service, etc.)
I can be reached at several email addresses, among them:
mark@cs.uchicago.edu
mshack@post.harvard.edu