-
Notifications
You must be signed in to change notification settings - Fork 7
Nerlnet App Flow
all communication in Nerlnet is HTTP based. if an entity wants to communicate with another, it must call nerl_tools:sendHTTP/4 which generates a new HTTP request using httpc:request. the relevant entity will get and handle the request in the appropriate handler
Stage 1: App start and Initator After install and build of the platform, you can run the NerlnetRun.sh to start the app. This will start the Nerlnet app, which waits for an initiator to tell it what entities this device needs to open. The Nerlnet app open its own cowboy server (open in IP:8484), which has several handlers:
- IoT handler: query to this page will return whether this app has an active nerlnet model
- json handler: gets the arch and conn jsons that initialize the app and its entities on device
after initiator was received (from json handler), can proceed
Stage 2: init local entities arch and conn jsons are received and read by jsonParser module. This module saves the data in an ets named "nerlnet_data" that entities have access to. afterwards, the main app opens all entities on the device.
Stage 3: Idleing after all entities and their servers have opened, they are all ready to get messages from the api server (thru the main server). This concludes that init stage.
before an experiment (or training/predication phase) can start, the relevant data needs to be uploaded to the sources / sensors. This