0.5.0 • Published 6 years ago

elio v0.5.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

elio

Full-blown, fully open-source server-less infrastructure for Node.js that can run anywhere, anytime and at any scale.

Architecture

Elio was built from ground up to rely on short-running processes called Nodes that handle numerous functions under the same VM. This means that optimization passes done by a VM can apply to the entire session.

Getting Started

const Elio = require('elio');
const crypto = require('crypto');
const { InMemoryPipelines } = Elio.services;

const elio = new Elio({
  maxNodes: 3, // Total number of concurrent workers (should be higher than core count for redundancy)
  ttl: 30000 // Maximum execution time for functions
});

// In Memory Storage
elio.use(new InMemoryPipelines());

const source = `
  module.exports = async (context) => ({
    result: context.name || "echo"
  });
`;
const sourceSHA1 = crypto.createHash('sha1').update(source).digest("hex");

// Emitted after at least one Node is online
elio.on('ready', async () => {
  await elio.deploy('myFunction', source, sourceSHA1);
  const result = await elio.invoke(sourceSHA1, { name: 'test' });
  console.log(result);
});

/* Output: 
{
  result: "test"
}
*/

Extending Elio

Features such as NPM support and signing are available as Elio services:

const Elio = require('elio');
const { Signature } = Elio.services;

const elio = new Elio();

// Requires digest to be a signature of source code signed by a key pair
elio.use(new Signature([["userA", Buffer.from(publicKey)]]));

Services

  • Package (support for NPM)
  • Signature (key pair signing for all deployments)

Roadmap

  • Support for pipelines
  • Support for A/B
  • API for custom services
  • Rollbacks

License

MIT License

0.5.0

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

7 years ago

0.3.8

7 years ago

0.3.7

7 years ago

0.3.6

7 years ago

0.3.5

7 years ago

0.3.4

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago