MCPcopy Create free account
hub / github.com/Helidium/Mitol

github.com/Helidium/Mitol @v0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.1 ↗ · + Follow
104 symbols 140 edges 16 files 18 documented · 17% updated 7y agov0.0.1 · 2017-06-03★ 17215 open issues

Browse by type

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

Mitol

Lightweight, high performance NodeJS Server.

Build Status Coverity Status


Project description

Project was born out of the need for faster performing server using NodeJS. Current implementation lacks focus on performance, which can be achieved by moving parts of code to native C++ bindings.

Aim of the project is to offer an alternative solution, which is using less memory and CPU power, giving you available resources for your code or handling higher number of requests.


Advantages

  • No changes required: Just replace require('http') with require('mns')
  • Top Speed: Roughly 3x better performance than integrated server
  • Additional features: Work in progress (Static file server, Router, ...)

Benchmarks

Benchmark


How to use

Currently only Linux has been tested. To install the project make sure you have build-tools installed. To build the node packages do the following:

cd node
make

The packages will be built in the dist folder, containing compiled packages as well as index.js module file. In your project copy the dist folder to:

node_modules/mns

To test the project you can use the following script

(Single process):

const http = require('mns');

let server = http.createServer((req, res) => {
    res.end('Hello World!');
});

server.listen(8080, function () {
    console.log('Example app listening on port 8080!')
});

(Multi process):

const cluster = require('cluster');
const numCPUs = require('os').cpus().length;
const http = require('mns');

if (cluster.isMaster) {
    // Fork workers.
    for (let i = 0; i < numCPUs; i++) {
        cluster.fork();
    }

    cluster.on('exit', (worker, code, signal) => {
        console.log(`worker ${worker.process.pid} died`);
    });
} else {
    let server = http.createServer((req, res) => {
        res.end('Hello World!');
    });

    server.listen(8080, function () {
        console.log('Example app listening on port 8080!')
    });
}

Thanks

My Family and Friends for supporting me!

All the fans for believing in the project!

Leandro A. F. Pereira For his wonderful Lwan project.

Alex Hultman For his wonderful uWebSockets project.

TechEmpower For Server benchmarks.

GitHub For code hosting.

Travis For code testing.

Coverity For code defects check


Copyright (c) 2017 Mitol Project - Released under the Zlib license.

Core symbols most depended-on inside this repo

Shape

Method 78
Class 17
Enum 5
Function 4

Languages

C++100%

Modules by API surface

node/http.h29 symbols
src/Response.cpp19 symbols
src/Server.cpp15 symbols
src/Request.cpp12 symbols
src/Socket.h6 symbols
src/Socket.cpp5 symbols
src/Request.h3 symbols
src/Http.cpp3 symbols
src/Variables.h2 symbols
src/Server.h2 symbols
src/Response.h2 symbols
src/Process.h2 symbols

For agents

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

⬇ download graph artifact

Ask about this repo answers extend the page