-
- run
npm install
in terminal to install all dependent packages - run
docker-compose up -d
in the terminal to start the service of nats-server and mongodb - run
node src
in terminal to start up the whole services - run
npm test
in terminal to start the unit-testing of whole project
- run
-
- measureService
- it is presented as Pre-Layer Measurement Generator in the architecture, which is the cron job to be triggered regularly for invoking the APC service
- apcService
- it is presented as APC service to calculate and return the period and temperature result by the type of stake
- paramsService
- it is presented as Control Parameter Generator in the architecture, which is the cron job to be triggered regularly for publishing the thickness factor and moisture factor to the APC service. These two factor will be used as the parameters in specific strategy of APC service
- measureService
-
- the config file is in the path of
./config/default.js
- change the value of config.nats.connection when you want to connect to the external nats-server, the default number is the local nats-server of
127.0.0.1:4222
- measureService is cron job which is triggered once with the period of config.cron.measurePeriod, the default number is
10000ms
- paramsService is cron job which is triggered once with the period of config.cron.paramsPeriod, the default number is
15000ms
- change the value of config.nats.connection when you want to connect to the external nats-server, the default number is the local nats-server of
- the config file is in the path of
-
- the thickness factor and moisture factor are stored in the memory cahce on
global.cache
of./src/index.js
. Is that possible to leverage MongoDB to store and retrieve this data? - there are two strategies (sharonStrategy and defaultStrategy) in
./src/apcService/utilities/strategyUtil.js
, can you extent for more strategies to meet the requirement of more possibilities? - there are only two stake types (SHARON and RIB_EYE) in
./src/measureService/index.js
, can you extend it to support more types of stake for the caculating in APC service? - Can you provide the unit test files for all services in this project?
- the thickness factor and moisture factor are stored in the memory cahce on
-
- jest unit test tutorial (https://www.softwaretestinghelp.com/jest-testing-tutorial)
forked from lusifar/apc_simulator
-
Notifications
You must be signed in to change notification settings - Fork 0
gamerslouis/cloudnative_apc_simulator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
the project to simulate the APC scenario
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- TypeScript 98.1%
- Dockerfile 1.1%
- JavaScript 0.8%