MCPcopy Create free account
hub / github.com/cocaine/cocaine-core

github.com/cocaine/cocaine-core @0.12.0.9

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.12.0.9 ↗ · + Follow
1,061 symbols 1,710 edges 139 files 4 documented · 0% updated 8y ago0.12.0.9 · 2015-04-23★ 1,0375 open issues

Browse by type

Functions 591 Types & classes 470
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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.

-- J. J. Cale, cover version by 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 requirement as well.
  • We got services: this concept is similiar to Google App Engine's services. Simply speaking, services are privileged 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. Your app can seamlessly use those services however it wants.
  • 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 pure CGroups and Docker for isolation.
  • 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++
  • Go
  • Java
  • Node.js
  • Python
  • Ruby
  • [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

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!

Hey kids, don't try cocaine! For serious web developers only.

Check out our wiki for installation instructions, reference manuals and cookies! We also got a bit outdated docs for v0.9, but worry not, up-to-date documentation is on its way!

Also you can find us on Freenode IRC, we're available for a chat on the #cocaine channel.

Core symbols most depended-on inside this repo

Shape

Method 571
Class 457
Function 20
Enum 13

Languages

C++100%

Modules by API surface

include/cocaine/dynamic/converters.hpp50 symbols
include/cocaine/dynamic/constructors.hpp44 symbols
src/service/locator.cpp32 symbols
src/service/node/engine.cpp31 symbols
src/context/config.cpp31 symbols
src/service/node/slave.cpp28 symbols
src/service/node/app.cpp28 symbols
include/cocaine/traits/tuple.hpp28 symbols
src/dynamic.cpp27 symbols
include/cocaine/idl/locator.hpp21 symbols
tests/benchmark.cpp19 symbols
include/cocaine/forwards.hpp19 symbols

For agents

$ claude mcp add cocaine-core \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page