Inputs from community for service monitoring/reliability scenario

iofog-controller
iofog-agent
microservice

(Jay Sharma) #1

Hello All,
I want your inputs for Micro-service monitoring and reliability scenario using ioFog:

There are 2 devices, these devices knows IP of each other.

Device 1 want to run a micro-service on Device 2 and get status of that micro-service as and when it changed. Additionally for micro-service reliability if it fails it should do retry.

For this scenario, I am thinking to Setup:
(a) one controller on a device (It can be any other device)
(b) one agent on Device 2

Device 1 can send rest request to controller to execute a micro-service on Device 2.

Queries:

  1. Is controller really needed here:

    • Can I directly send a curl/rest request from device 1 to agent to run the container?
    • Is there is any rest endpoint, by which agent can notify device 1 the status of micro-service?
  2. Is micro-service reliability provided by ioFog controller/agent ?

  3. Is there is any specific document for service Monitoring/Reliability that I can refer?


#2

This is a good use case, and some good questions. Firstly, yes you always need a Controller, this is what makes ioFog work. You can manage it all through iofogctl, or use the Controller API if you want to automate.

Yes, ioFog does support reliability in that if one of the microservices dies on one of the devices/agents it will attempt to restart it.

In this scenario I would do the following:

  • Install a controller somewhere not on either of the devices (cloud vm would work)
  • Install an Agent on each of the devices (and provision to the controller)
  • Write an Application flow that consists of two microservices. You can deploy one microservice to Agent 1 and the other to Agent 2.
  • MSVC2 can send ioMessages from to MSVC1. A good example of how to do this is in our node.js SDK: https://github.com/eclipse-iofog/iofog-nodejs-sdk

There are lots of examples in our examples repo of this simple message passing. A good one is the HealthcareWearable one.