One of the key features of the PHYSICS platform will be the ability to serve a FaaS application in various infrastructures in a distributed manner. For instance, in the agriculture sector, IoT-based applications leverage data from sensors placed in multiple greenhouses to train machine learning models towards optimizing the aggregated production. In such cases, deploying some parts (i.e., functions) of the application in different machines and locations is more efficient. In our example, the data preprocessing should be performed near each greenhouse, avoiding expensive data transfers, while the analytics part could be done in a server offered by a cloud provider.
To achieve this and automate the deployment of the given application, PHYSICS relies on custom semantics, reasoning, and interoperability techniques. Specifically, an ontology (see Figure 1) is created in order to accommodate reasoning over the structure, parameters, characteristics and requirements of an application designed within PHYSICS. Such an application is deployable on a continuum that encompasses multiple heterogeneous resources, and different components may be instantiated and executed in different resources. The PHYSICS ontology is devised in order to (a) guide the application design, (b) help define further characteristics that guide the deployment process, (c) provide the majority of the metamodel definition for the reasoning engine, (d) formalize the overall vision of the PHYSICS project in a widely understandable and interoperable way from the application perspective. In this way, each application and computational resource registered in the platform can be perceived as a graph.
Figure 1 – The PHYSICS Ontology
In the context of PHYSICS platform graphs are divided into the following four types illustrated in Figure 2:
- Application graph: Describes a given application that can consist of functions, flows, sub-flows, patterns and services.
- Resource graph: Describes a given computational resource such as public clouds and clusters that can consist of compute nodes, storage services, edge devices, etc.
- Global graph: Includes a given application graph with its nodes connected with the nodes of the available resource graphs that could deploy each node of the application graph.
- Deployment graph: Includes a given application graph with its nodes connected with the optimal nodes from the available resource graphs that will be used to deploy each node of the application graph.
Three dedicated components have been developed to perform inference over those graphs, namely the Application and Resource Semantics and the Reasoning Framework, forming the Semantics Block of the PHYSICS (see Figure 3).
Specifically, the Semantics Block could be perceived as an interface between the PHYSICS platform’s different layers, serving as a central repository for application and resource metadata. Hence, it interacts with various components that either provide or request data.
As far as the input data is concerned, it should be structured to data models according to the Linked Data principles before entering the Reasoning Framework. This will allow interoperability between the different components of the platform, seamless data sharing, and reasoning/inference on the data. This data could be divided into application and resource metadata. The former generated from the given application is processed by the Application Semantics component in order to be transformed according to the ontology descriptions and annotations. Accordingly, resource metadata is injected into the Resource Semantics component, which is responsible for “translating” the different resource data to the common language defined by the ontology. Thus, the Application (Resource) Semantics component creates an individual application graph (resource) for each new application (resource) registered on the platform that can be imported into the Reasoning Framework and stored to its quad-store.
On the other hand, the Reasoning Framework outputs data to other components based on their requirements. Hence, when an application needs to be deployed, its global graph (i.e., the application graph connected with the relevant resource nodes) created by the Reasoning Framework is passed to Global Continuum Patterns Placement for further optimization.
The Reasoning Framework comes with a REST API offering all the required endpoints to ease data injection and retrieval with all the other PHYSICS components.