SupercondActor Business Platform defines three types of business services - API Service, Scheduled Service, and Long-running Service
The API Service connects to underlying Service Fabric infrastructure, receives HTTP calls directed to the hosting Service Fabric Stateless Service. All you need to do is to provide a JavaScript code responding to the HTTP request. Proxying, routing, and load balancing details are taken care of by the Service Fabric and Azure networking services.
In the diagram above, the API Service receives calls from the Internet and sends messages to a Queue.
The Scheduled Service runs your JavaScript code on a predefined schedule, for example every 15 seconds or at 1:00 am every Saturday.
In the diagram above, the Scheduled Service retrieves data from a Database and sends messages through an external Email Server.
The Long-running Service runs your JavaScript code indefinitely, during the whole life of the service. Your code is not supposed to exit, should run, for example, an infinite loop. This service can wait for some external event, like a message arriving through a queue, or IOT data stream.
In the diagram above, the Long-running Service subscribed for the Queue events acting as a message consumer - processes messages from the Queue and saves them into a Database.