Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / nodejs-cluster-zero-downtime.md
Last active February 11, 2024 13:45
nodejs clustering, zero downtime deployment solutions

Clustering: The basics

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)

@interstateone
interstateone / form.coffee
Created July 10, 2012 16:58
Using backbone-forms with CoffeeScript class syntax
define (require) ->
# Vendor Libs
$ = require 'jquery'
_ = require 'underscore'
Backbone = require 'backbone'
require 'backbone-forms'
require 'backbone-forms-bootstrap'
@balupton
balupton / blog-moving-docpad-forward-a-gui.md
Created June 10, 2012 15:40
Blog: Moving DocPad Forward, the rise of backend-agnostic GUIs

Moving DocPad Forward, the rise of backend-agnostic GUIs

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.

Proof of Concept

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
@domenic
domenic / README.md
Last active June 24, 2021 16:37
Using promises in a UI context

The scenario:

  • 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.

The problem statement: