@jayesol/jayeson.lib.sports 2.2.6-beta.0 → 2.2.6-beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +113 -113
- package/lib/dispatch.js +0 -1
- package/package.json +49 -49
package/README.md
CHANGED
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
### Sportrelayereed
|
|
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.tranrelayerorm` - 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.tranrelayerorm +-----+ 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 Tranrelayerormation Flow
|
|
55
|
-
|
|
56
|
-
Picture show how message gets tranrelayerormed when they are passed from one component to other
|
|
57
|
-
|
|
58
|
-

|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
PS: Drawn using Gliffy. Get source diagram from jayeson's gliffy account
|
|
62
|
-
|
|
63
|
-
#### CI/CD guideline
|
|
64
|
-
|
|
65
|
-
##### Publish
|
|
66
|
-
|
|
67
|
-
Guideline: [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
|
-
|
|
79
|
-
|
|
80
|
-
##### Deployment
|
|
81
|
-
|
|
82
|
-
Deploy to:
|
|
83
|
-
|
|
84
|
-
- **MyTest**
|
|
85
|
-
```
|
|
86
|
-
deploy: myTestUnity # For deploy to relayer of Unity in MyUnity environment
|
|
87
|
-
or
|
|
88
|
-
deploy: myTestVodds # For deploy to relayer of Vodds in MyVodds environment
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- **Staging** environment:
|
|
94
|
-
```
|
|
95
|
-
deploy: stagUnity # For deploy to relayer of Unity in Staging Unity environment
|
|
96
|
-
or
|
|
97
|
-
deploy: stagVodds # For deploy to relayer of Vodds in Staging Vodds environment
|
|
98
|
-
or
|
|
99
|
-
deploy: stagFeed # For deploy to relayer of Vodds in Staging Feed environment
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
- **Production** environment:
|
|
104
|
-
```
|
|
105
|
-
deploy: prodUnity # For deploy to relayer of Unity in Production Unity environment
|
|
106
|
-
or
|
|
107
|
-
deploy: prodVodds # For deploy to relayer of Vodds in Production Vodds environment
|
|
108
|
-
or
|
|
109
|
-
deploy: prodFeed # For deploy to relayer of Vodds in Production Vodds environment
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
Note: To deploy to Kubernetes (k8s), need to add the parameter k8s: 1.
|
|
113
|
-
|
|
1
|
+
### Sportrelayereed
|
|
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.tranrelayerorm` - 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.tranrelayerorm +-----+ 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 Tranrelayerormation Flow
|
|
55
|
+
|
|
56
|
+
Picture show how message gets tranrelayerormed when they are passed from one component to other
|
|
57
|
+
|
|
58
|
+

|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
PS: Drawn using Gliffy. Get source diagram from jayeson's gliffy account
|
|
62
|
+
|
|
63
|
+
#### CI/CD guideline
|
|
64
|
+
|
|
65
|
+
##### Publish
|
|
66
|
+
|
|
67
|
+
Guideline: [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
|
+
|
|
79
|
+
|
|
80
|
+
##### Deployment
|
|
81
|
+
|
|
82
|
+
Deploy to:
|
|
83
|
+
|
|
84
|
+
- **MyTest**
|
|
85
|
+
```
|
|
86
|
+
deploy: myTestUnity # For deploy to relayer of Unity in MyUnity environment
|
|
87
|
+
or
|
|
88
|
+
deploy: myTestVodds # For deploy to relayer of Vodds in MyVodds environment
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
- **Staging** environment:
|
|
94
|
+
```
|
|
95
|
+
deploy: stagUnity # For deploy to relayer of Unity in Staging Unity environment
|
|
96
|
+
or
|
|
97
|
+
deploy: stagVodds # For deploy to relayer of Vodds in Staging Vodds environment
|
|
98
|
+
or
|
|
99
|
+
deploy: stagFeed # For deploy to relayer of Vodds in Staging Feed environment
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- **Production** environment:
|
|
104
|
+
```
|
|
105
|
+
deploy: prodUnity # For deploy to relayer of Unity in Production Unity environment
|
|
106
|
+
or
|
|
107
|
+
deploy: prodVodds # For deploy to relayer of Vodds in Production Vodds environment
|
|
108
|
+
or
|
|
109
|
+
deploy: prodFeed # For deploy to relayer of Vodds in Production Vodds environment
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Note: To deploy to Kubernetes (k8s), need to add the parameter k8s: 1.
|
|
113
|
+
|
package/lib/dispatch.js
CHANGED
|
@@ -134,7 +134,6 @@ let EndPointGroupManager = class EndPointGroupManager {
|
|
|
134
134
|
return this._grp;
|
|
135
135
|
}
|
|
136
136
|
pushFullSnapshotWrapper(epg, epd) {
|
|
137
|
-
console.log("FULL SNAPSHOT: " + epd);
|
|
138
137
|
let stream = epd.stream();
|
|
139
138
|
epd.isInitialized().then((ready) => {
|
|
140
139
|
if (ready) {
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@jayesol/jayeson.lib.sports",
|
|
3
|
-
"version": "2.2.6-
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "gulp compile",
|
|
8
|
-
"clean": "gulp clean",
|
|
9
|
-
"clean:all": "rm -rf node_modules dist",
|
|
10
|
-
"test": "gulp test",
|
|
11
|
-
"full-build": "npm run clean:all && npm install && npm run build"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"@jayesol/jayeson.lib.delivery": "2.0.
|
|
15
|
-
"@jayesol/jayeson.lib.record": "2.1.
|
|
16
|
-
"@jayesol/jayeson.lib.streamfinder": "2.0.0",
|
|
17
|
-
"@jayesol/jayeson.model": "2.
|
|
18
|
-
"circular-json": "^0.4.0",
|
|
19
|
-
"estraverse": "^5.3.0",
|
|
20
|
-
"injection-js": "^2.2.0",
|
|
21
|
-
"long": "^4.0.0",
|
|
22
|
-
"protobufjs": "^7.2.4",
|
|
23
|
-
"reflect-metadata": "^0.1.13",
|
|
24
|
-
"ts-promise": "^1.0.0",
|
|
25
|
-
"typescript-collections": "^1.3.3",
|
|
26
|
-
"underscore": "^1.13.0"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@types/jasmine": "^4.3.0",
|
|
30
|
-
"@types/node": "^20.19.24",
|
|
31
|
-
"chai": "^4.3.0",
|
|
32
|
-
"del": "^6.1.1",
|
|
33
|
-
"eventemitter3": "^5.0.0",
|
|
34
|
-
"glob": "^7.2.3",
|
|
35
|
-
"gulp": "^4.0.2",
|
|
36
|
-
"gulp-install": "^1.1.0",
|
|
37
|
-
"gulp-jasmine": "^4.0.0",
|
|
38
|
-
"gulp-jspm-builder": "^1.1.1",
|
|
39
|
-
"gulp-rename": "^2.0.0",
|
|
40
|
-
"gulp-run": "^1.7.1",
|
|
41
|
-
"gulp-typescript": "^5.0.1",
|
|
42
|
-
"gulp-uglify": "^3.0.2",
|
|
43
|
-
"jasmine": "^4.5.0",
|
|
44
|
-
"merge-stream": "^2.0.0",
|
|
45
|
-
"protobufjs-cli": "^1.1.3",
|
|
46
|
-
"semver": "^7.5.0",
|
|
47
|
-
"typescript": "^4.9.0"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@jayesol/jayeson.lib.sports",
|
|
3
|
+
"version": "2.2.6-beta2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "gulp compile",
|
|
8
|
+
"clean": "gulp clean",
|
|
9
|
+
"clean:all": "rm -rf node_modules dist",
|
|
10
|
+
"test": "gulp test",
|
|
11
|
+
"full-build": "npm run clean:all && npm install && npm run build"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@jayesol/jayeson.lib.delivery": "2.0.7",
|
|
15
|
+
"@jayesol/jayeson.lib.record": "2.1.1",
|
|
16
|
+
"@jayesol/jayeson.lib.streamfinder": "2.0.0",
|
|
17
|
+
"@jayesol/jayeson.model": "2.1.1",
|
|
18
|
+
"circular-json": "^0.4.0",
|
|
19
|
+
"estraverse": "^5.3.0",
|
|
20
|
+
"injection-js": "^2.2.0",
|
|
21
|
+
"long": "^4.0.0",
|
|
22
|
+
"protobufjs": "^7.2.4",
|
|
23
|
+
"reflect-metadata": "^0.1.13",
|
|
24
|
+
"ts-promise": "^1.0.0",
|
|
25
|
+
"typescript-collections": "^1.3.3",
|
|
26
|
+
"underscore": "^1.13.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/jasmine": "^4.3.0",
|
|
30
|
+
"@types/node": "^20.19.24",
|
|
31
|
+
"chai": "^4.3.0",
|
|
32
|
+
"del": "^6.1.1",
|
|
33
|
+
"eventemitter3": "^5.0.0",
|
|
34
|
+
"glob": "^7.2.3",
|
|
35
|
+
"gulp": "^4.0.2",
|
|
36
|
+
"gulp-install": "^1.1.0",
|
|
37
|
+
"gulp-jasmine": "^4.0.0",
|
|
38
|
+
"gulp-jspm-builder": "^1.1.1",
|
|
39
|
+
"gulp-rename": "^2.0.0",
|
|
40
|
+
"gulp-run": "^1.7.1",
|
|
41
|
+
"gulp-typescript": "^5.0.1",
|
|
42
|
+
"gulp-uglify": "^3.0.2",
|
|
43
|
+
"jasmine": "^4.5.0",
|
|
44
|
+
"merge-stream": "^2.0.0",
|
|
45
|
+
"protobufjs-cli": "^1.1.3",
|
|
46
|
+
"semver": "^7.5.0",
|
|
47
|
+
"typescript": "^4.9.0"
|
|
48
|
+
}
|
|
49
|
+
}
|