Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Roadmap

tomyan edited this page Oct 19, 2011 · 2 revisions

Roadmap (draft)

Remove JSGI

Proton is a webserver that allows you to load in web apps that (roughly) conform to the JSGI Spec, by exporting a "class" that can be instantiated and have requests handled by calling a "handle" method that follows the JSGI interface. JSGI has a fairly compelling design and it seemed like it would be convenient to the proton split between web server (proton) and web application (not-proton).

OTOH, it doesn't seem entirely clear if JSGI is going to turn out to be Betamax, or if it makes sense to implement many of the parts of web applications as "middleware" in the first place. Proton's philosophy is that, while Node.js has made it very easy to create a basic web-server, you shouldn't have to make a web-server every time you make a web application. Connect's approach seems to be to make creating this web-server easier, which isn't entirely in-line with Proton's, but the API we've chosen is intended to make it possible to run Connect applications with Proton.

After the change, proton will be able to load in web-apps defined like:

var Webapp = module.exports = function () {
    this.onBeforeStart = function () {
        // this allows you to perform some action before Proton starts your app (e.g. load in templates)
        // if you return a promise (promised-io recommended) it will wait for that to be resolved
    };
};

WebApp.prototype.handle = function (request, response) {
    // ...
};

The signature of the latter is intentionally compatible with the handle method you get in a connect application.

Testing, Testing, Testing

Proton was a little ugly on the inside and not tested. We have great features, like the ability to hot-reload code without having to watch for file changes, but the code needed work. This is in progress.

Utilise Mutliple-Cores

Add the ability to accept requests from multiple child processes (default one per CPU core).

Clone this wiki locally