Powered by
asq

Decentralized Computation Offloading on the Edge

with Liquid WebWorkers

ICWE 2018

Andrea Gallidabino Cesare Pautasso

Software Institute

Faculty of Informatics

USI Lugano, Switzerland

Introduction

One User, many devices

Liquid Software

Flow + Adapt

Liquid Software Features

Adapt the User Interface to the set of connected devices.
Seamlessly migrate running applications across multiple devices following the user attention.
Transparently distribute and synchronize the state of the application across all connected devices.

Liquid Software Features

Extension

Offload computations to neighbour devices in order to increase performance.

Aim to the edge

Close to the user

Liquid WebWorker

Goals (1)

Perform background computations in a parallel thread execution.

WebWorker

Goals (2)

Perform background computations in a parallel thread execution.
Transparently offload computation across devices.

Liquid WebWorker Assumptions

Stateless programming model.
Discrete atomic tasks.
Execution of a task produces all results at once.

Design

Architecture

Liquid WebWorker Pool

Constructor
LiquidWebWorkerPool(sendMessageFunction)
SendMessage Signature Return Value
sendMessage(deviceID, message) Promise(response)
Forward Message Signature Return Value
forwardMessage(message) Promise()

Liquid WebWorker Pool

Worker Lifecycle

Method Name Return Value
createWorker(workerName, scriptURI) Promise(workerInstance)
terminateWorker(workerName) Promise(workerName)
getWorkerList() Promise(workerNameList)

Script-URI or Script-String

Why?

Liquid WebWorker Pool

Inter Device Communication

Method Name Return Value
updatePairedDevice(deviceID, data) Promise(deviceID)
removePairedDevice(deviceID) Promise(deviceID)

Pairing Devices (1)

Pairing Devices (2)

Liquid WebWorker Pool

Task Execution

Method Name Return Value
callWorker(workerName, message) Promise(response)
_callWorker(workerName, message) Promise(response)

Liquid WebWorker Pool

Task Execution

Method Name Return Value
callWorker(workerName, message) Promise(response)
_callWorker(workerName, message) Promise(response)

Liquid WebWorker Pool

Force Local Execution

Method Name Return Value
callWorker(workerName, message) Promise(response)
_callWorker(workerName, message) Promise(response)

Implementation

Liquid.js middleware

Evaluation

What are the benefits of

Liquid Web Workers?

Image Processing

"Liquid Camera"

Execution Time Profiling

Process Time Total =
Preprocess Time +
Transmission Time +
Queue Time +
Worker Execution Time +
Marshalling Time +
Transmission Time +
Postprocess Time

Environment

Laptop (L)

MacBook Pro (Retina, 15-inch, Mid 2014)
2.2 GHz Intel Core i7
macOS High Sierra Version 10.13.2
Chrome Version 64.0

Tablet (T)

Samsung Galaxy Tab A (2016)
Octa Core 1.6 GHz
Android Version 7.0
Chrome Version 64.0

Phone (P)

Samsung J5 (2015)
Quad Core 1.2 GHz
Android Version 5.1.1
Chrome Version 62.0.

Experiment Variables

Image Size

Filter Complexity

- Sobel Filter

- Combination Filter

(Advanced Sobel Filter)

Sobel Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Sobel Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Sobel Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Sobel Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Combination Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Combination Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Combination Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Combination Filter

Local Communication Time [ms]
Remote Communication Time [ms]
Worker Time [ms]

Future Work

Policies

Decide how to

Minimize execution time

Transmission Time + OffloadComp Time ≤ LocalComp Time

Transmission Time = (DataOut Size * Bandwitdh Upload) +

(DataIn Size * Bandwitdh Download) + (Latency Time * 2)

Decentralized Computation Offloading on the Edge

with Liquid WebWorkers

ICWE 2018

Andrea Gallidabino Cesare Pautasso

Software Institute

Faculty of Informatics

USI Lugano, Switzerland

Backup

Sobel Filter BoxPlot

10 experiments - executed the filter operation 25 times for each experiment

Combination Filter BoxPlot

10 experiments - executed the filter operation 25 times for each experiment