What is Kettle?

Kettle is a framework for building server-side Web applications using JavaScript. Originally created by the Fluid community for the Fluid Engagemobile application, Kettle is designed to provide a quick and easy way to deliver data feeds and rendered markup on the server. Kettle uses Fluid Infusion throughout, offering client-side JavaScript developers a natural starting point for building server-side code. Because it is written in JavaScript, Kettle provides the opportunity to share code between client and server seamlessly. As a result, the architectural partitioning of responsibilities between client and server can be defined and reconfigured based on the requirements of the application, not based on programming language boundaries.

The primary development metaphor in Kettle are Spouts, which represent high-level handlers for incoming Web requests and outgoing responses. By default, Kettle provides two types of Spouts that can be defined declaratively; markup spouts, which provide rendered HTML content, and data spouts, which handle JSON-based feeds. Programmers who need a lower level of abstraction can drop down to a CherryPy-inspired API where individual handlers can be bound to specific URL paths in the application.

Kettle also offers built-in support for the CouchDB database, a document-based store that is a good match for JavaScript-based, collaborative Web applications.

What's the Status of Kettle?

Kettle is currently a proof-of-concept framework which has seen some limited real-world testing under load through the Fluid Engage mobile pilot at the McCord Museum in Montreal. It has not yet been released as a standalone product, and is still very much under active development. It has not yet been documented (at all!), and APIs will change.

Next Steps

As part of the FLOE Project, Kettle will be used to develop RESTful server-side data feeds and markup transformers for storing and sharing content accessibility information, user preferences, and captions.

As part of this work, Kettle will be:

Ported to a new JavaScript engine, making it fast and more widely-supported

Modularized, so it's easy to drop a Web app into the Kettle container and run it

Extended to support better URL routing and rewriting

Documented

Roadmaps

Technologies

Currently, Kettle is built on top of the Java Virtual Machine using Mozilla's Rhino JavaScript engine. In order to use features of Infusion and jQuery unmodified, we also use John Resig's Env.js browser compatibility environment. Kettle conforms to the JSGI spec for server-side JavaScript containers. Needless to say, Infusion is used throughout.

Moving forward, Kettle will be ported to Node.js, an event-based Web server built using Google's V8 JavaScript engine. Node's APIs are also sufficient enough to replace the handful of jQuery APIs used on the server (e.g. $.ajax()) with implementations that are not browser-encumbered. Initially, Kettle will be integrated with Node.js using the JSGI 0.3 spec, but in the future will be expanded to natively support Node's evented model.