GithubHelp home page GithubHelp logo

dmreiland / lambda_proc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jasonmoo/lambda_proc

0.0 2.0 0.0 200 KB

Running a companion process to an AWS Lambda function in go

Shell 6.01% JavaScript 22.78% Go 71.20%

lambda_proc's Introduction

lambda_proc

This is experimental and passes tests but should be considered experimental.

Leverages container reuse in aws lambda by starting go proc as companion process, communicating via stdin/stdout with parent nodejs process.  Run takes a handler function and runs it once per json payload received from the parent nodejs process.  Lambda containers may be frozen and thawed between invocations. This allows a go proc to live for many requests, allowing memoization, startup cost elimination, and performance benefits.  Observed lambda run times between .5ms-15ms after first invocation.

index.js has much more robust error handling than typical examples and will restart the go companion process when it dies, syscall writes to it fail, or other error scenarios.

the example folder build.sh script and code are all complete examples of a working lambda.


License: MIT 2015

lambda_proc's People

Contributors

jasonmoo avatar

Watchers

Dan Reiland avatar James Cloos 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.