UNPKG

5 kBMarkdownView Raw
1### SportsFeed
2
3#### Packaging Structure
4- Packages are classified into **"levels"**; **each vertical is a level. Veiwed from left to right**
5- Arrows define dependency. E:g A -> B means A depend on B
6- Any class can only depend on classes within it's package or classes from packages in previous levels
7- There cannot be any dependency among packages of same level
8
9#### Package-Info
10- `jayeson.lib.sports.protobuf` - Classes generated by protobuf
11- `jayeson.lib.sports.datastructure` - Core datastructure used across all classes
12- `jayeson.lib.sports.filter` - Abstractions around IDataFilter combined with sport's datastructure
13- `jayeson.lib.sports.mutable` - Provide Mutable builder's for jayeson.lib.record's datastructure
14- `jayeson.lib.sports.util` - Static utility functions
15- `jayeson.lib.sports.codec` - Definition of various message classes and logic to serialize data structure to Protibuf and vice versa
16- `jayeson.lib.sports.core` - Core components used across whole library
17- `jayeson.lib.sports.receive` - Implementation of logic to receive data from upstream
18- `jayeson.lib.sports.receive.memory` - Implementation of logic to receive data in memory(E:g Bot)
19- `jayeson.lib.sports.dispatch` - Abstractions for pushing received data downstream
20- `jayeson.lib.sports.dispatch.relayer` - Abstratction to push data without any post-processing
21- `jayeson.lib.sports.dispatch.transform` - Abstraction and logic to push data with post processing
22- `jayeson.lib.sports.dispatch.network` - Abstraction and logic to push data via network
23- `jayeson.lib.sports.client` - Abstrations for end under to consume data
24- `jayesib.lib.sports.module` - Various module bindings
25
26
27```
28
29
30 +-------------------------------------------------------------------------------+
31 | |
32 | +-------------+ |
33 | | client +---------------------+ v
34 | +-------------+ | +-----------+
35 | +----+ | | filter +----------------+
36 | +---------------------+ | | | +-----------+ |
37 +--+ dispatch.transform +-----+ v v v
38 +---------------------+ +-------------+ +----------+ +-----------------+
39 +->| dispatch +---->| core +----+ +-----------+ | datastructure |
40 +--------------------+ | +-------------+ +----------+ |---->| mutable | +-----------------+
41 | dispatch.network +---+ | ^ ^ | +-----------+ ^
42 +--------------------+ | | | | | |
43 +--+ | | | +------------+
44+-----------------+ +------------------+ | | | +-----------+ |
45| | | dispatch.relayer +-------------------+ | |---->| util +-----+---+
46| Module | +------------------+ | | +-----------+ | | +-----------------+
47+-----------------+ | | | +-->| protobuf |
48 | | | +-----------------+
49 +-----------------+ +-------------+ | | +-----------+ |
50 | receive.memory +----------->| receive +------------> +---->| codec +-----+
51 +-----------------+ +-------------+ +-----------+
52```
53
54#### Message Transformation Flow
55
56Picture show how message gets transformed when they are passed from one component to other
57
58![Picture show how message gets transformed when they are passed from one component to other](message-flow.png)
59
60
61PS: Drawn using Gliffy. Get source diagram from jayeson's gliffy account
62
63#### CI/CD guideline
64
65##### Publish
66
67Guideline: [CI/CD guideline](https://docs.jayeson.com.sg/ops/operations/gitlab-cicd/usage#how-to-use)
68
69- Publish for non prod repo:
70 ```
71 publish: snapshot
72 ```
73
74- Publish for production repo:
75 ```
76 publish: prod
77 ```
78
\No newline at end of file