Giter Club home page Giter Club logo

open-lambda's Introduction

OpenLambda

OpenLambda is a project dedicated to bringing the Lambda ("serverless") computing framework to the open source world. The purpose of this is primarily to provide a platform for the exploration of research questions that serverless computing prompts (see the publication section).

Getting Started

These instructions will get you a copy of the project up and running in your environment for development and testing purposes. Because Docker requires root privileges and can consume a lot of disk space in the root directory, it is recommended to use OpenLambda in a virtual environment.

Installation

Grab and extract the open-lambda source package from github

wget https://github.com/open-lambda/open-lambda/archive/v0.1.1.tar.gz

Use the startup script to install requirements, build the project using the Makefile.

cd open-lambda-0.1.0
./tools/quickstart/startup.sh
make

Starting a lambda cluster locally

Use the start-cluster script to start a local cluster for testing. The cluster will use the Docker registry by default, or the OpenLamdba code registry if passed the optional flag

./util/start-cluster.py [--olregistry]

Use the setup.py script to push application handler code to the registry and run startup scripts (must be in a directory under the applications directory)

./util/setup.py --appdir pychat --appfile lambda_func.py

Send RPCs to the URL generated by the setup.py script

cat applications/pychat/static/config.json
curl -w "\n" <URL> -d '{"op": "init"}'
curl -w "\n" <URL> -d '{"op": "updates", "ts": "0"}'
curl -w "\n" <URL> -d '{"op": "msg", "msg": "hello"}'

Running the tests

To run the full suite of tests:

make test

Break down into end to end tests

Explain what these tests test and why

Give an example

Architecture

Diagram of overall architecture coming soon.

Load Balancers

All RPC requests to the system are issued directly to a load balancer. There, the load balancing policy selects a worker to handle the request, and proxies it.

Currently, we are using an Nginx instance for load balancing, with simple round-robin scheduling. We hope to soon experiment with more interesting load balancing policies, as the Lambda model prompts many interesting locality questions.

Registry

The registry is a shared code store for all of the registered handlers for RPCs. Workers pull code from this registry when they do not have the handler locally. This is often the slowest part of executing an RPC, which makes directing requests to a worker which has the handler locally an important consideration.

There are currently two implemented registries for use with OpenLambda, the Docker registry and our native code registry.

Workers

Sandboxes

Built With

  • Docker
  • go-dockerclient
  • Nginx
  • gRPC

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the complete list of contributors who participated in this project.

License

This project is licensed under the Apache License - see the LICENSE.md file for details.

open-lambda's People

Contributors

tylerharter avatar phonyphonecall avatar edoakes avatar benpgel avatar nnadams avatar sturdevant avatar lnyng avatar andthedaysgoby avatar hereneric avatar mkellum avatar

Watchers

James Cloos avatar Sravan S 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.