- We are writing a digital textbook-reading app.
- Most of the time you have a "basic" license for your textbook, but one (and only one) of your computers can request an "enhanced" license.
- You can only print from the computer with the enhanced license.
A GUI, or rather a CMS interface for DocPad is the big next step. It was also one of the first proof of concepts I used to ensure DocPad would be able to scale into the web development platform of the future.
Back in the first early months of DocPad, I created three plugins:
- Authenticate: To authenticate you against the project's maintainers to ensure that you have read and write access
- REST: Provided authenticated users the ability to update documents via HTTP POST requests using JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define (require) -> | |
# Vendor Libs | |
$ = require 'jquery' | |
_ = require 'underscore' | |
Backbone = require 'backbone' | |
require 'backbone-forms' | |
require 'backbone-forms-bootstrap' |
The trick? pass the file descriptor from a parent process and have the server.listen reuse that descriptor. So multiprocess in their own memory space (but with ENV shared usually)
It does not balance, it leaves it to the kernel.
In the last nodejs > 0.8 there is a cluster module (functional although marked experimental)
- http://nodejs.org/api/cluster.html
- Simple cluster example: