Giter VIP home page Giter VIP logo

apc_simulator's Introduction

User Guide

  • Environment Settings

    • 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
  • Features

    • 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
  • Config Settings

    • 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
  • Bonus

    • 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?
  • Reference

apc_simulator's People

Contributors

plchao avatar shandy-yuyu avatar linyc0817 avatar yinhsuan avatar lusifar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.