0.0.11 • Published 6 years ago

mitol v0.0.11

Weekly downloads
3
License
ZLIB
Repository
github
Last release
6 years ago

unmaintained It was great developing the high performance HTTP server alternative for NodeJS, but I don't have the time to continue development of the project. If anyone wants to continue development, feel free to contact me...

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('mitol')
  • 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 node-gyp, python and build-tools (GCC, etc.) installed. To build the node package do the following:

npm i mitol

To test the project you can use the following script

(Single process):

const http = require('mitol');
 
let server = http.createServer((req, res) => {
    res.end('Hello World!');
});
 
server.listen(8080, () => {
    console.log('Example app listening on port 8080!')
});

(Multi process):

const cluster = require('cluster');
const numCPUs = require('os').cpus().length;
const http = require('mitol');
 
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, () => {
        console.log('Example app listening on port 8080!')
    });
}

Like the project?

You can support me by donating: https://www.paypal.com/paypalme/helidium


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.

0.0.11

6 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago