forked from VaughnVernon/IDDD_NYSE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.txt
71 lines (59 loc) · 2.94 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
The IDDD_NYSE repository contains a set of projects
that reflect my take on the SpringTrader project
(formerly NanoTrader). It's my attempt to improve
the model using a DDD approach.
This is a work in progress. The various Bounded Contexts
(iddd_nanotrader, iddd_algotrader, iddd_nanoreports) and
the Supporting Subdomains and reusable tools found in
iddd_tradercommon are not complete. In particular when
a market order and a slice order are executed, the
requests just fall off a cliff. Currently the models
go no further than to track the number of shares
conceptually purchased, and that's it. There are other
holes in the models, too, and it will require more time
with my volunteer domain expert before this effort
provides a more realistic simulation of stock purchases.
In all this example provides a fairly decent look at
Aggregate design and the use of Domain Events in a simple
Event-Driven Architecture. Actually none of the Events
are currently crossing Context boundaries. Still, you
can look at the tests to see how the Events would be
handled if the Bounded Contexts were actually deployed.
You can also see a bit of Published Language in the
Notifications that (would) arrive in the iddd_algotrader
and iddd_nanotrader Bounded Contexts.
Note that the Account Subdomain in iddd_nanotrader has
lost its way. This should (very likely) be in its own
Bounded Context. It seems like many trading providers
are full-on financial services organizations, and user
accounts may include checking, savings, 401K, etc., in
addition to a standard brokerage/trading account. Yet,
leaving the Account Subdomain in this model allows me
to use it to teach some Context Mapping and Subdomain
identification techniques in class. It's a darling of
a legacy smell, even though I have cleaned up the model
substantially compared to the original.
I created a simple Pub-Sub messaging mechanism that I
named SlothMQ. (Yeah.) The tests that run the Sloth are
a bit slow since they pause to allow time for the creature
to scoot messages across the wire like a sloth drags its
butt across the ground. Anyway, it works, if even at a
slothful rate, and it can be run just about anywhere.
The run the tests:
1. Install Java SDK 1.7.?
2. Install Gradle 1.5 (doing all the GRADLE_HOME and PATH set up)
3. Grab the code using git into a project root named IDDD_NYSE
4. In the IDDD_NYSE root, run: gradle clean build
That's just about it. You should see the gradle test
output in each of the subprojects:
iddd_algotrader/build/reports/tests/index.html
iddd_nanoreports/build/reports/tests/index.html
iddd_nanotrader/build/reports/tests/index.html
iddd_tradercommon/build/reports/tests/index.html
Actually iddd_nanoreports doesn't do anything yet. It's
just a placeholder to remove the reporting type things
from the iddd_nanotrader Bounded Context. This may change
quite a bit by the time it's done.
If you get a chance to help, I welcome your participation!
Vaughn Vernon
Author: Implementing Domain-Driven Design