Skip to main content

Sinfonia

Manages discovery of nearby cloudlets and deployment of backends for edge-native applications.

Tier 1 is located in the cloud and it tracks availability of Tier 2 instances at various cloudlets where backends can be deployed. Tier 3 is the client application that mediates the discovery and deployment process for edge-native applications.

This repository implements an example Tier3 client which can be used both as a command-line application, and as a Python library.

Installation

This should be installable with pip install sinfonia-tier3.

Usage

The sinfonia-tier3 application would normally be called by an edge-native application to start an application specific backend on a nearby cloudlet.

The information normally provided by the app are the URL of a Tier1 instance and the UUID identifying the needed backend. Finally the actual frontend application and arguments that will be launched once the backend deployment has started.

$ sinfonia-tier3 <tier1-url> <uuid> <frontend-app> <args...>

An example application with UUID:00000000-0000-0000-0000-000000000000 (or the convenient alias 'helloworld') starts an nginx server that will be accessible with the hostname 'helloworld'.

$ sinfonia-tier3 https://tier1.server.url/ helloworld /bin/sh
sinfonia$ curl -v http://helloworld/
...
sinfonia$ exit

When the frontend application exits, the network namespace and wireguard tunnel are cleaned up. Any resources on the cloudlet are automatically released once Tier2 notices the VPN tunnel has gone idle for some time

Installation from this source repository

You need a recent version of poetry

$ pip install --user pipx
$ ~/.local/bin/pipx ensurepath
... possibly restart shell to pick up the right PATH
$ pipx install poetry

And then use poetry to install the necessary dependencies,

$ git clone https://github.com/cmusatyalab/sinfonia-tier3.git
$ cd sinfonia-tier3
$ poetry install
$ poetry run sinfonia-tier3 ...
... or
$ poetry shell
(env)$ sinfonia-tier3 ...

Why does we need a sudo password when deploying

We need root access to create and configure a Wireguard tunnel endpoint that connects the local application's network namespace/container to the deployed backend. All of the code running as root is contained in src/sinfonia_tier3/root_helper.py

Right now it runs the equivalent of,

ip link add wg-tunnel type wireguard
wg set wg-tunnel private-key <private-key> peer <public-key> endpoint ...
ip link set dev wg-tunnel netns <application network namespace>

Release files for sinfonia-tier3 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinfonia-tier3 0.3.1
File Size Uploaded
sinfonia_tier3-0.3.1.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinfonia-tier3 0.3.1
File Interpreter ABI Platform
sinfonia_tier3-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 39.3 kB

Release files / sinfonia_tier3-0.3.1.tar.gz

Download URL sinfonia_tier3-0.3.1.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6118ab191e34bf0c27f13f6b882f6a6c0266c16d14ba5950387f7c1ae1829fd6
BLAKE2b-256 checksum
How to use checksums
29b5639ec2e74284bd4512d2f0fc8d8109a290cdd5d8ff82504ecddcc76f956c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.9.2 Linux/5.10.0-18-amd64

Release files / sinfonia_tier3-0.3.1-py3-none-any.whl

Download URL sinfonia_tier3-0.3.1-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0db38569eb409c276abc8601c4caf2984ecdc5bbf4153bd3d0eecc7d18236ce0
BLAKE2b-256 checksum
How to use checksums
ee5f57540e2b3b5fdde2e6e0b472fe121fb0484e8cc4e4cb3152cb5f7c7c63f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.9.2 Linux/5.10.0-18-amd64

Release history Release notifications | RSS feed

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

This release

0.3.1 This release

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page