Fab lab cloud APIs implement a centralized cloud-hosted hub to interconnect several networked fab labs and expose their infrastructure as REST services that can be accessed through a client application. The APIs endpoints are protected by Oauth. We use Auth0, an authentication as a service provider to secure our APIs. Auth0 provides a free tier that allows up to 7.000 users and unlimited logins.
Fig. 1 depicts the architecture of the software infrastructure that implements the cloud hub. The APIs provide endpoints to submit and monitor distributed fabrication batches to the networked fab labs. Fabrication requests are automatically routed by the business logic to the fab lab that is geographically closer to the requester.
Fig. 1: Cloud APIs Architecture
The APIs run on an Express.js server that also implements the business logic to connect to the service registry and to the service monitor. The registry keeps a record of all the on-line fab labs (machines, running and pending jobs, materials, etc.), whereas the service monitor implements a websocket connection with the networked fab labs. Every connected fab lab issues an event every time a change of state of a networked fabrication machine is detected (e.g. new service up or down) and the service monitor updates the service registry accordingly.
Node.js and JavaScript enthusiast.