The daemon is also responsible for End-to-End
Encryption (E2EE) of logs, local disk persistence, and
data dispatch for cloud storage. Logs are first en-
crypted and persisted on the local disk for quick ac-
cess and then submitted to the cloud storage server.
Logs are only retrieved from the cloud when the local
copy is outdated, according to the rules:
1. If the Log Does Not Exist Locally: a local copy
is created from the remote copy and used for read-
ing operations.
2. If Log Exists Locally: the hash of the local copy
is sent to the server and compared with the hash
present in the metadata of the remote copy. The
remote copy replaces the hash’s local copy if it is
different, and the remote copy has a more recent
modification date. Otherwise, the local copy is
used for reading operations, avoiding unnecessary
updates.
3.3.3 Database
Runlet uses PostgreSQL, an open-source object-
relational database that uses the Structured Query
Language (SQL) language and is highly scalable both
in the amount of data it can manage and in the number
of concurrent users it accommodates (PostgreSQL,
2020). The database stores data from users and jobs.
It also provides relational operators to manipulate
data, is highly scalable in terms of data it can store
and supports many concurrent users.
However, the database does not store job logs.
They are shared between devices using RabbitMQ’s
messaging system. This decision reduces security
concerns related to leakage of sensitive information
that records may have and improves performance by
ensuring that updates are queued and delivered reli-
ably without the need for querying and storing large
amounts of data from a database.
3.3.4 Cloud Storage
A cloud-based solution is used exclusively for log
storing. This eliminates ownership costs associated
with managing a data storage infrastructure and en-
sures data durability, availability, and security.
Log storing is accomplished with MinIO, an open-
source distributed object storage server designed to be
cloud-native, performant, scalable, and lightweight.
The server runs as lightweight containers by external
orchestration services and is highly efficient in its use
of CPU and memory resources (MinIO, 2020).
3.3.5 Server
The server is the central point of the architecture and
consists of a NestJS API, a RabbitMQ message bro-
ker, and metric tools Prometheus and Grafana for
monitoring. It orchestrates the communication be-
tween daemons and the message broker through an
API, persists data in the database, and files in the
cloud.
RabbitMQ is the message broker that handles
message exchanging between network devices. It has
two subcomponents: (1) a server operator where all
broker features are configurable, such as clustering,
high availability, persistence, and access control; and
(2) a web-based tool for external management, moni-
toring, and short-term visualization of broker events.
A topic exchange is created for each user. This
type of exchange is used for multicast routing of mes-
sages as it routes messages to one or many queues
bound with a matching binding key. All exchanges
are durable and survive broker restart. On the other
hand, queues are temporary and short-lived to re-
duce workload and avoid leaving unused queues be-
hind failed connections. They are both exclusive, and
auto-deleted, meaning that they are only used by their
declaring connections and are automatically deleted
when the last consumer is gone or cancels its sub-
scription.
Queues are also created following the single re-
sponsibility principle that dictates that each queue has
a single concern. That means that jobs end up having
multiple queues to control execution rather than hav-
ing a single queue for everything.
4 EXPERIMENTAL EVALUATION
This section describes the experiments that evaluate
Runlet in regards to interactivity and reliability. The
server, currently hosted on DigitalOcean, is a stan-
dard droplet with two (2) vCPUs, four (4) GB RAM,
fifty (50) GB SSD storage, and four (4) TB of data
transfer. A vCPU is a processing power unit that cor-
responds to a single hyperthread on a processor core
(DigitalOcean, 2020). The testbed of devices used
for the experiments is presented in table 1, including
device model, CPU, RAM, operating system, and a
nickname used for study reference.
4.1 Interactivity
Two (2) experiments are conducted to evaluate the
user’s capability to interact with job executions and
make decisions when requested.
Runlet: A Cross-platform IoT Tool for Interactive Job Execution Over Heterogeneous Devices with Reliable Message Delivery
263