npm package: @jayesol/jayeson.lib.sports
Description: - Packages are classified into **"levels"**; **each vertical is a level. Veiwed from left to right** - Arrows define dependency. E:g A -> B means A depend on B - Any class can only depend on classes within it's package or classes from packages in previo
Latest version: 2.2.10

### Sportrelayereed

#### Packaging Structure
- Packages are classified into **"levels"**; **each vertical is a level. Veiwed from left to right**
- Arrows define dependency. E:g A -> B means A depend on B
- Any class can only depend on classes within it's package or classes from packages in previous levels
- There cannot be any dependency among packages of same level

#### Package-Info
- `jayeson.lib.sports.protobuf` - Classes generated by protobuf
- `jayeson.lib.sports.datastructure` - Core datastructure used across all classes
- `jayeson.lib.sports.filter` - Abstractions around IDataFilter combined with sport's datastructure
- `jayeson.lib.sports.mutable` - Provide Mutable builder's for jayeson.lib.record's datastructure
- `jayeson.lib.sports.util` - Static utility functions
- `jayeson.lib.sports.codec` - Definition of various message classes and logic to serialize data structure to Protibuf and vice versa
- `jayeson.lib.sports.core` - Core components used across whole library
- `jayeson.lib.sports.receive` - Implementation of logic to receive data from upstream
- `jayeson.lib.sports.receive.memory` - Implementation of logic to receive data in memory(E:g Bot)
- `jayeson.lib.sports.dispatch` - Abstractions for pushing received data downstream
- `jayeson.lib.sports.dispatch.relayer` - Abstratction to push data without any post-processing
- `jayeson.lib.sports.dispatch.tranrelayerorm` - Abstraction and logic to push data with post processing
- `jayeson.lib.sports.dispatch.network` - Abstraction and logic to push data via network
- `jayeson.lib.sports.client` - Abstrations for end under to consume data
- `jayesib.lib.sports.module` - Various module bindings


```


                     +-------------------------------------------------------------------------------+
                     |                                                                               |
                     |  +-------------+                                                              |
                     |  |   client    +---------------------+                                        v
                     |  +-------------+                     |                                    +-----------+
                     |                              +----+  |                                    | filter    +----------------+
                     |  +---------------------+     |    |  |                                    +-----------+                |
                     +--+  dispatch.tranrelayerorm +-----+    v  v                                                                 v
                        +---------------------+        +-------------+     +----------+                                +-----------------+
                                                    +->| dispatch    +---->|  core    +----+     +-----------+         |  datastructure  |
                        +--------------------+      |  +-------------+     +----------+    |---->| mutable   |         +-----------------+
                        |  dispatch.network  +---+  |          ^                  ^        |     +-----------+                  ^
                        +--------------------+   |  |          |                  |        |                                    |
                                                 +--+          |                  |        |                       +------------+
+-----------------+     +------------------+                   |                  |        |     +-----------+     |
|                 |     | dispatch.relayer +-------------------+                  |        |---->|   util    +-----+---+
|    Module       |     +------------------+                                      |        |     +-----------+     |   |   +-----------------+
+-----------------+                                                               |        |                       |   +-->|     protobuf    |
                                                                                  |        |                       |       +-----------------+
                        +-----------------+            +-------------+            |        |     +-----------+     |
                        | receive.memory  +----------->|   receive   +------------>        +---->|  codec    +-----+
                        +-----------------+            +-------------+                           +-----------+
```

#### Message Tranrelayerormation Flow  

Picture show how message gets tranrelayerormed when they are passed from one component to other

![Picture show how message gets tranrelayerormed when they are passed from one component to other](message-flow.png)


PS: Drawn using Gliffy. Get source diagram from jayeson's gliffy account

#### CI/CD guideline 

##### Publish

Guideline: [CI/CD guideline](https://docs.jayeson.com.sg/ops/operations/gitlab-cicd/usage#how-to-use)

- Publish for non prod repo:
  ```
     publish: snapshot 
  ```

- Publish for production repo:
  ```
     publish: prod
  ```


##### Deployment

Deploy to:

- **MyTest**
    ```
       deploy: myTestUnity       # For deploy to relayer of Unity in MyUnity environment 
     or 
       deploy: myTestVodds       # For deploy to relayer of Vodds in MyVodds environment

    ```


- **Staging** environment:
    ```
       deploy: stagUnity       # For deploy to relayer of Unity in Staging Unity environment 
     or 
       deploy: stagVodds       # For deploy to relayer of Vodds in Staging Vodds environment
    or
       deploy: stagFeed       # For deploy to relayer of Vodds in Staging Feed environment

    ```

- **Production** environment:
    ```
       deploy: prodUnity       # For deploy to relayer of Unity in Production Unity environment 
     or 
       deploy: prodVodds       # For deploy to relayer of Vodds in Production Vodds environment
     or
       deploy: prodFeed       # For deploy to relayer of Vodds in Production Vodds environment

    ```
    Note: To deploy to Kubernetes (k8s), need to add the parameter k8s: 1.