-
Notifications
You must be signed in to change notification settings - Fork 7
Technical Design System design
Patrick van Dissel edited this page Aug 17, 2014
·
1 revision
-
Keep it Simple, Stupid
-
Don't Repeat Yourself
-
Follow the Unix Philosophy:
Write programs that do one thing, and do it well. Write programs that work together.
-- http://www.linfo.org/unix_philosophy.htmlEach program being a micro-service of the complete picture.
-
Each micro-service:
- Has its own git repo
- Has its own versioning/release
- Exposes:
- Metrics
- Logging
- API
- Packaged as a single executable jar
- Installable as you would with any other application, via an OS-dependant package, incl:
- its configuration
- its command script
- its OS dependend "start as daemon" scripts (eg. unix rc.d scripts)
- Micro-service theory presentations:
- From Macro To Micro - Sam Newman
http://www.youtube.com/watch?v=2ofzdPXeQ6o - Implementing Micro service architectures - Fred George
https://vimeo.com/79866979 - Micro Services: Java, the Unix Way - James Lewis
http://www.infoq.com/presentations/Micro-Services
- From Macro To Micro - Sam Newman
- Determine universal dataformat and protocol for the micro-services to communicate, candidates are:
- text streams
- atom/json over http
- messagebus/eventstream
- ...?
Namings in this roadmap are work-in-progress, just like the designs
Starting with a single application that does it all in a single process, calling external commands from the Runner
.
+---------------------------------------------------+
| Client |
|---------------------------------------------------|
| +----+ |
| +------------+ uses | | uses +----------+ |
| | Groovy DSL |<-------+Main+------>| Output | |
| +--------+---+ +-+--+ +----------+ |
| | | |
| |uses |uses |
| | | |
| +--------v--------------v---------------------+ |
| | Command-Query API | |
| +---------------------------------------------+ |
| ^ |
| |impl. |
| | |
| +-----------------------+---------------------+ |
| | Runner | |
| +---------------------------------------------+ |
+---------------------------------------------------+
(now called pipe
or pipe-runner
)
Start moving out the Runner
to its own application, introducing a Coordinator
to coordinate the runner processes.
+----------------------------------------+
| Client |
|----------------------------------------|
| +----+ |
| +------------+ | | +----------+ |
| | Groovy DSL | |Main| | Output | |
| +------------+ | | +----------+ |
| | | |
| +---------------+----+-------------+ |
| | Command-Query API | |
| +-----------------+----------------+ |
| | |
| +-----------------v----------------+ |
| | Coordinator | |
| +-----------------+----------------+ |
+--------------------|-------------------+
|
+-----------------v----------------+
| Runner(s) |-+
+----------------------------------+ |+
+-----------------------------------+|
+-----------------------------------+
Move out the Coordinator
to its own application as it proved to work in v2.
+----------------------------------------+
| Client |
|----------------------------------------|
| +----+ |
| +------------+ | | +----------+ |
| | Groovy DSL | |Main| | Output | |
| +------------+ | | +----------+ |
| | | |
| +---------------+----+-------------+ |
| | Command-Query API | |
| +-----------------+----------------+ |
| | |
+--------------------|-------------------+
|
+-----------------v----------------+
| Coordinator |
+-----------------+----------------+
|
+-----------------v----------------+
| Runner(s) |-+
+----------------------------------+ |+
+-----------------------------------+|
+-----------------------------------+
+-----------------------+
| pipe-poll |
|-----------------------|
| CSV |
| SVN+-+ + |
| | | |
Gitlab webhook | v v |
+ | +--+Providers |
| | | |
GitHub webhook | | +-----------+ |
+ | +--------------+| pipe-poll | |
| | | | +-----------+ |
+--+ | | +-----------------------+
| | |
+-----------|--|--|------------------------------------------+
| | | | pipe-listen |
|-----------|--|--|------------------------------------------|
| | | | |
| v v v |
| +-------------+ |
| | pipe-listen +-------------+Providers |
| +--------+----+ + + + |
| | +---+ | +-----+ |
| | | | v |
| | v | Pipe-poller |
| | GitHub | |
| | v |
| | Gitlab |
| | |
+-------------------|----------------------------------------+
|
| +-----------------------------------------+
| | pipe-monitor |
v |-----------------------------------------|
+----------------------------------+ | +---------------+ |
| event-queue / message-bus |<---------+ pipe-monitor +-----+Publishers |
+----------------------------------+ | +---------------+ + + |
^ ^ ^ ^ | | v |
| | | | | v Graphite |
| | | | | Ganglia |
+----------------|---------+ | | | +-----------------------------------------+
| pipe-messenger | | | | |
|----------------|---------| | | | +-----------------------------------------+
| +-------+------+ | | | | | pipe-client-api | +------+
| |pipe-messenger| | | | | |-----------------------------------------| +-------+|
| +-----+--------+ | | | | | +---------------+ +------------------+ +--------+|+
| | | | | +------------| event-store +------+ REST <-----+| Web-UI |+
| + | | | | +---------------+ | <-----++--------+
| Publishers | | | | | WebSocket/SSE <-----++--------+
| + + + + | | | +------------------------| <-----+| CLI |
| +--+ | | +-+ | | +-----|-----------------------------------+ +------------------+ +--------+
| v | | v | | | | pipe-worker |
| Campfire | | Email | | |-----|-----------------------------------|
| | | | | | | |
| v v | | | +--+--------+ |
| Gitlab GitHub | | | |pipe-worker+-------+scm-providers |
+--------------------------+ | | +-+---------+ + + + |
| | | +-+ | +-+ |
| | | v | v |
| | | Git v CSV |
| | | SVN |
| | | |
| +----|------------------------------------+
| |
| |
| +--|---------------------+
| | | pipe-runner |
| |--|---------------------|
| | | |
+----+ +> |
| |
+------------------------+
(diagrams simply drawn with http://www.asciiflow.com)