Skip to content
Snippets Groups Projects

Draft: Add documentation

Closed Jacopo Zorzetto requested to merge jacopo/eddie:main into main
4 unresolved threads
1 file
+ 111
0
Compare changes
  • Side-by-side
  • Inline
DOCS.md 0 → 100644
+ 111
0
 
# EDDIE project
 
The eddie repository is home of a middleware in the Oniro Project to enable distributed intelligence on Oniro devices.
 
 
The objective of the EDDIE project is to design a middleware running on top of the operating system of the various Oniro devices,
 
capable of giving to the applications and services a global view on a unified pool of virtual resources
 
that can be exploited for an efficient execution of any application or service required by the user.
 
 
## Build instructions
 
 
### Prerequisites
 
The following part of the document details how to install
 
and configure all packages and libraries required to have
 
a working copy of EDDIE.
 
 
- libcoap
 
 
libcoap is a C implementation of the application-level protocol CoAP.
 
The version of libcoap currently used by EDDIE is `version 4.3.0`.
 
 
 
libcoap itself requires some package to correctly complete its installation procedure:
 
they can be installed with the following commands:
 
 
```console
 
$ (sudo) apt-get install autoconf -y
 
$ (sudo) apt-get install libtool -y
 
```
 
 
Then launch these commands to install libcoap in your machine:
 
 
```console
 
$ git clone https://github.com/obgm/libcoap.git
 
$ git checkout release-4.3.0
 
$ cd libcoap
 
$ ./configure --disable-documentation --disable-dtls
 
$ make
 
$ (sudo) make install
 
$ (sudo) ldconfig
 
```
 
For further details on libcoap have a look at the [github repository](https://github.com/obgm/libcoap)
 
and at the [official libcoap documentation page](https://libcoap.net/).
 
 
- Glib
 
 
Installation instructions for Glib and its requirements can be found at the
 
[Glib installation page](https://github.com/GNOME/glib/blob/main/INSTALL.md?plain=1).
 
 
### Build
 
- If you want to run EDDIE on your local machine build the CMake project:
 
 
```console
 
$ mkdir build && cd build
 
$ cmake ..
 
$ make
 
```
 
then you can run one of the following binaries:
 
`resource-directory`,
 
`eddie-endpoint`,
 
`eddie-virt-server` or
 
`eddie-virt-client`
 
 
- If you want to build the Oniro Blueprint for the EDDIE project, and run on an Oniro supported target: follow the instructions in the [EDDIE blueprint git repository](https://booting.oniroproject.org/distro/blueprints/eddie/meta-oniro-blueprints-eddie).
 
 
## EDDIE structure
 
The structure of the EDDIE project is horizontally divided into layers and
 
this division is reflected structure of the EDDIE repository.
Please register or sign in to reply
 
 
While the communication and the virtualization layer are detailed below and already present in the EDDIE repository,
 
an intelligent layer is planned, to enable reasoning and smart resource distribution across the EDDIE network.
 
Currently, there is only a mocked version of this layer.
 
 
Lastly an application management layer is also planned, providing advanced functionalities for process management
 
in both local and remote EDDIE nodes.
 
 
### Layers
 
In the following paragraphs there is a more detailed description of the layers of EDDIE.
 
 
- **Communication Layer**
 
 
 
The bottommost component of EDDIE is the communication layer: it is responsible for all the networking bits of EDDIE,
 
from the creation and setup of the connection to the message dispatching to other nodes.
 
 
Every device that runs EDDIE has a server component, application logic that describes what capabilities (resources) that device has and answers to requests from other nodes.
 
Alongside the server element, a EDDIE device is equipped with a client component, allowing the device to comunicate actively in the network, performing requests to other devices.
 
 
Additionally, one node in the EDDIE network is elected as Resource Directory (RD): a new EDDIE node that wants to connect to the network should post its description in the RD, while from the RD he can retrive the descriptions of other nodes.
    • Suggested change
      87 Additionally, one node in the EDDIE network is elected as Resource Directory (RD): a new EDDIE node that wants to connect to the network should post its description in the RD, while from the RD he can retrive the descriptions of other nodes.
      87 Additionally, one node in the EDDIE network is elected as Resource Directory (RD): a new EDDIE node that wants to connect to the network should post its resources description in the RD, while from the RD it can retreive the descriptions of other nodes.
Please register or sign in to reply
 
 
The communication layer exposes a list of APIs to the higher layers of EDDIE, allowing complex actions and queries to be executed in the EDDIE network.
 
<!-- The APIs exposed are:
 
- `API 1`
 
- `API 2`
 
- `API 3`
 
- `API 4` -->
Please register or sign in to reply
 
 
 
- **Virtualization layer**
 
 
 
The Virtualization layer is responsible for the interaction between the EDDIE network (through the communication layer) and the single EDDIE-enabled application running on the device.
 
 
This layer is composed of two elements that are communicating through the IPC mechanism of d-bus: the receiver component exposes over d-bus its interface and its functions, while the sender component is able to send requests over d-bus
Please register or sign in to reply
 
 
This layer contains a receiver component that exposes its API on d-bus, allowing multiple applications to interact with EDDIE at the same time.
 
The API is composed of a single function `PerformAction` that models the action that the application wants to execute on the network, like changing or getting the status of a resource.
 
 
A sender component is also present in the virtualization directory with the role of transmitting the requets generated by EDDIE-enabled application to the EDDIE component of the device.
 
 
 
## Common usage patterns (Internals)
 
Examples on how to use the internal functions of EDDIE can be found in `/linux/examples`.
Loading