Coder Social home page Coder Social logo

cocaine-core's Introduction

What the hell is it? Build Status

If you wanna hang out you've got to take her out; cocaine.
If you wanna get down, down on the ground; cocaine.
She don't lie, she don't lie, she don't lie; cocaine.

-- Gary Louris & Eric Clapton

Your personal app engine. Technically speaking, it's an open-source cloud platform enabling you to build your own PaaS clouds using simple yet effective dynamic components.

Notable features:

  • You are not restricted by a language or a framework. Similiar to Heroku model, Cocaine simply spawns whatever you tell it to spawn. The only requirement is that these newly spawned apps must connect to their app controller for request load balancing. But we plan to get rid of this last requiremenet as well.
  • Your apps are driven by events, which is fancy. There are two sources of events for every app, and we got lots of predefined plugins providing those sources, so unless you need to handle clients via a PS/2 port, you're good.
    • First, there are services: this concept is similiar to Google App Engine's services. Simply speaking, services are other apps running in the same cloud. These apps can be anything ranging from a distributed storage access service or a publish-subscribe notification service to specially-crafted service for your own personal needs.
    • Second, there are event drivers: these are simple statically configurable objects attached to your app generating events from some predefined source, for example a recurring timer or a watched file on the filesystem.
  • We got dynamic self-managing worker pools for each app with a rich but simple configuration and resource usage control to scale with the app needs. Yeah, it's scales automatically, you don't need to think about it. As of now, we got support for CGroups and LXC support via Docker is on its way.
  • Even more, it scales automatically across your server cluser via automatic node discovery and smart peer-to-peer balancing. You can use a simple adhoc round-robin balancing for simple setups or a hardcore IPVS-based realtime balancer.
  • If your startup idea is about processing terabytes of pirated video, we got data streaming and pipelining for you as well, enjoy.

At the moment, Cocaine Core supports the following languages and specifications:

  • C++
  • Python
  • Javascript
  • [In development] Java
  • [In development] Racket

We have the following services:

  • Logging
  • Node-local file storage
  • MongoDB storage
  • Elliptics storage
  • Node-local in-memory cache
  • Distributed in-memory cache
  • URL Fetch
  • Jabber
  • [In development] Notifications
  • [In development] Distributed time service

And the following event drivers built-in:

  • Simple timer
  • Filesystem monitor
  • ZeroMQ

A motivating example

Here's some extremely useful Cocaine app written in Python.

#!/usr/bin/env python

from cocaine.services import Service
from cocaine.worker import Worker

storage = Service("storage")

def process(value):
    return len(value)

def handle(request, response):
    key = yield request.read()
    value = yield storage.read("collection", key)

    response.write(process(value))
    response.close()

Worker().run({
    'calculate_length': handle
})

Okay, I want to try it!

Then it's time to read our Wiki for installation instructions, reference manuals and cookies!

cocaine-core's People

Contributors

3hren avatar andrusha97 avatar berekuk avatar bioothod avatar bogdad avatar cpursley avatar creator-zz avatar diunko avatar iidioteque avatar ijon avatar mou avatar noxiouz avatar redbaron avatar savetherbtz avatar theinkvi avatar vickenty avatar

Stargazers

 avatar

Watchers

 avatar  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.