Designing toward a more ideal server
Lightnode is designed around the ideas of attaining a more ideal web server platform, which should be easier to manipulate and understand than our traditional servers, while still providing all the functionality that we desire for rapid development.
Node.js provides a solid base to use along our path towards a more ideal web server platform, however, as noted, it achieves this by purposely avoiding the provision of high level functionality in order to avoid the need to address the design challenge of countering the complexity and reduced flexibility inherent in introducing higher level functionality.
This means that it is up to library authors to tackle the challenge of providing a framework that provides the desired functionality while maintaining simplicity, and flexibility and ease of manipulation.
Control through a DOM inspired Hierarchy
Lightnode addresses this challenge by conceptualizing server control in a manner inspired by our browser DOM, and with the most appealing conceptually coherency.
The user creates a hierarchy of server objects prior to when the server starts listening for requests. By creating a hierarchy of server objects, each object can be customized differently, and remains conceptually separate.
A simple delegation step is added to the server objects, where users can indicate how a request event is routed down the hierarchy. It is easy to route a request to some custom code outside of the server hierarchy.
A site can be served simply with just one server, or a separate server object can be created for each sub section of the site. Servers can also be created dynamically when a request comes in, including lazily created for the case where a non-existing server is requested from the hierarchy.
The servers in the hierarchy can be instances of the user's custom subclass of the lightnode.Server control class, or of it's file server subclass lightnode.FileServer.
Lightnode currently provides this simple hierarchical delegation framework for control, as well as add-on utility of fast static file serving with http client side caching, and a design that is easy to setup virtual hosting or any other desirable or customized setup. Much more functionality is planned to be added in future, in order to provide a platform for flexible and simple rapid development.
Although Lightnode is a fully free and open source product, we are collecting a small fee for it here on binpress in order to fund the development so that we can provide a platform that supports developers in creating better software more easily. You can choose to pay for the product (when you mouse over "download") or just download it free, if you'd rather not support the development at this point, or if you'd just like to test it out first.
- a complete web server platform
- good integration with and enhancement of node philosophy and usage
- minimal / non-intrusive / non-assuming design
- support for taming the unprecedented control node provides
- robust static file serving with caching + virtual host + customizability
- simple to understand handling logic
- instructable functionality (bypass handling logic)
- built-in desirable functionality to utilize with node such as statistics (not yet implemented), file serving, control framework etc
- good documentation, understandable source