- Asynchronous code is how you write low-resource, high-concurrency servers. See http://www.kegel.com/c10k.html.
- Node embracing async from the get-go means that servers are low-resource, high-concurrency by default.
- Async + JavaScript = Perfect fit for an event loop.
- When it comes to threads vs event-loop, there are times when either are advantageous.
- But there are things very hard or impossible to do with threads.
- WebSockets are difficult to do properly with threads. That's one example where non-blocking IO (async) has a major advantage.
- RAM usage is another factor, especially when we're talking about the physical hardware required to run your application, which translates to real dollars.
- It depends on your application in the end:
var issues = (function() { | |
var o = { | |
"Array.prototype": "forEach map reduce reduceRight filter every some indexOf lastIndexOf", | |
"Array": "isArray", | |
"Object": "keys preventExtensions isExtensible getOwnPropertyDescriptor defineProperty getOwnPropertyNames create seal isSealed freeze isFrozen" | |
}; | |
for(var l in o) { | |
o[l] = o[l].split(" "); | |
for(var f=0; f<o[l].length; f++) { |
Array.diff = function(left, right) | |
{ | |
var o = left; | |
var n = right; | |
var ns = {}; | |
var os = {}; | |
for (var i = 0; i < n.length; i++) { | |
if (ns[n[i]] == null) |
;(function() { | |
return window.sesh = { | |
init: function() { | |
var self = this; | |
window.addEventListener('unload', function() { | |
self.serialize(); | |
}, false); | |
self.parse(); | |
}, |
// | |
// an experimental flow control library. | |
// please dont ever use this for anything. | |
// | |
var z = function z(f) { | |
if (!(this instanceof z)) { | |
return new z(f); | |
} |
!function(Object, getPropertyDescriptor, getPropertyNames){ | |
// (C) WebReflection - Mit Style License | |
if (!(getPropertyDescriptor in Object)) { | |
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; | |
Object[getPropertyDescriptor] = function getPropertyDescriptor(o, name) { | |
var proto = o, descriptor; | |
while (proto && !( | |
descriptor = getOwnPropertyDescriptor(proto, name)) | |
) proto = proto.__proto__; | |
return descriptor; |
note: I converted this script into the much easier to install joinopenwifi
module on NPM
see https://github.com/maxogden/joinopenwifi#joinopenwifi for installation instructions
What does the ultimate database look like? Maybe the ultimate database of the future going to be a many-headed hydra that will attempt to solve all problems? Maybe marketing teams are going to be at the heart of its success? Perhaps it will grow tentacles and become violent toward its creator?
Unless you're a contributor to the software, your probably limited to understanding the value propositions and a subset of features. Maybe your an expert. Probably not. This corner is usually dark. A database has historically been a black box. You pick one that seems like the best fit and trust it.
Maybe the database of the future should just be a library, more like BerkeleyDB, I really don't want an entire server. Someone could just add a server on top of it if they really wanted one. It would also be nice if understanding it (in its entirety) wouldn't represent a big investment.