Git Product home page Git Product logo

offworker's Introduction

Offworker: An Offloading Framework for Parallel Web Applications

Official source code for the paper, "Offworker: An Offloading Framework for Parallel Web Applications," authored by An-Chi Liu and Yi-Ping You.

Offworker Architecture

Setup

Tested in Ubuntu, but other Linux distributions may also work.

$ sudo apt install g++ make curl unzip wget

Installed Node.js 14 by NVM. Install NVM first:

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

Reopen the shell, and install Node.js 14, note that Offworker only work with Node.js 14:

$ nvm install 14
$ nvm use 14

Install Node.js dependencies, build and run tests for both front-end and back-end:

$ make

Run

Back-end Manager

The default port is 8080. You can change at offworker/backend/src/config.ts

$ cd backend
$ npm run dev # dev mode

Now the back-end manager is running, use Chrome to open http://{http_server_ip}:8080 (e.g. http://localhost:8080), you should see Upgrade Required in the page.

Example

Copy the built front-end library to the example. Once you include Offworker front-end library at the beginning in the application, Offworker's front-end manager will start to work automatically.

$ cp frontend/build/offworker.bundle.js example/pi-proxy

Run the HTTP server, which uses 8081 port by default:

$ cd example; node http-server.js

Use Chrome to open http://{http_server_ip_port}/pi-proxy/index.html?host={offworker_backend_ip_port} (e.g. http://localhost:8081/pi-proxy/index.html?host=localhost:8080). Offworker will recognize the host flag and connect to the back-end manager.

You should see the result with Offworker:

pi: 3.141592653589782
time: 5.999s

You may also want to see the logs in the Chrome console.

You can also turn off Offworker by offload=false flag, open http://localhost:8081/pi-proxy/index.html?offload=false.

If you run the example natively on a slow device (usually a smartphone) and offload workers to a high-performance machine (server), you will see the performance dramatically become better.

Benchmark

Offworker use two benchmark suites for evaluation, which are Rodinia-JS and Hopscotch-JS.

Citation

If you use Offworker for academical purpose, please cite the followings:

License

MIT

offworker's People

Contributors

tigercosmos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.