These are the slides from the presentation I gave to the Sencha meetup group in Austin, TX. It covers the NoSQL-NodeJS-ExtJS development stack at a high level.
2. Corey Butler
15yrs+ Web Experience
Founder @ Ecor Systems, LLC
Chief Consultant @ Ecor Group (we’re on senchadevs.com)
DW/BI & Web Practices
Ext JS Since v2.
Started in the Adobe, Microsoft, & IBM worlds.
Started in Fortune 500, Entrepreneur since 2000.
Available Via:
Blog: coreybutler.com
Twitter: @goldglovecb
LinkedIn.com/in/ecorsystems
4. The Stack
The concept isn’t much different from traditional web architecture.
5. What is NoSQL?
No defined relationships.
No schemas or fixed types.
NoACID?
6. What NoSQL Is NOT
Hard & Fast RDBMS Replacement
All Purpose Data Storage
7. NoSQL vs SQL
NOSQL SQL
Goal Specific Generic
Non-relational RDBMS
Map/Reduce ANSI SQL
Known Data Structure! Predefined Data Structure
No NULLS NULLS
function(doc) { SELECT a.pk as id, a.somefield as value
if ( doc.date < Date() && typeof doc.somefield !== undefined ) { FROM TblA a INNER JOIN TblB b
var resultObject = { ON a.pk = b.fk
id: doc.pk, WHERE a.somevalue IN
value: doc.somefield (SELECT someval FROM TblC)
}; AND b.date < CURRENT_TIMESTAMP
emit(resultObject); AND a.somefield <> null
}
}
8. Popular Choices
CouchDB Doc Store
MongoDB Doc Store w/ Key/Value
Redis Key/Value (In Memory)
Riak Dynamo-like (Commercial)
Hadoop Big Data
Cassandra BigTable
CONSTANTLY GROWING
kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis
9. Storage Types
Key/Value: Schemaless. Where is data stored?
Disk? Memory? Distributed?
Document: Like Key/Value, but semi-structured.
Graph: Based on graph theory. Focuses more
on relationships between objects than
the objects themselves.
Column/Wide: Key pointing to multiple columns
(like rows in an RDBMS)
10. SSJS: Server Side
JavaScript
SSJS was first introduced via Netscape
LiveWire in 1996, but really didn’t
become practical for many until 2009.
Gaining popularity because:
Faster JS Engines like Google’s V8 (Chrome), Spidermonkey
(Firefox), & Rhino (Firefox).
Maturity of JavaScript/ECMAScript.
Standards like CommonJS.
Useful for event-driven apps.
11. CommonJS
Aims to standardize JS outside the browser.
Best Practices/Metadata/Specs.
Cross-Compatibility.
Supports concepts like modules, file system
references, exports, and other common
requirements for serving applications.
12. SSJS Platforms
Narwhal Most complete CommonJS
implementation. Based on
Rhino with JSGI Middleware.
NodeJS Non-blocking & single threaded
(fast). Implements some
CommonJS. Based on V8. Large
and growing community.
Others: Jaxer, Jack, 10gen App Server
13. NodeJS
From nodejs.org
Node.js is a server-side JavaScript
environment that uses an asynchronous
event-driven model. This allows Node.js to
get excellent performance based on the
architectures of many Internet applications.
Nutshell: Create apps, like web servers.
14. Example Web Server
//Require the HTTP module
var http = require('http'),
colors = require('colors'),
port = 80;
//Create the server
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Worldn');
}).listen(port, "127.0.0.1");
//Indicate the server is running
console.log('Server running at http://127.0.0.1:'.green+port.toString().cyan+'/'.green);
15. NodeJS Modules
Modules are plugins for Node.
Lots of work already done for you.
No governed quality control.
Hundreds of Modules
NPM is your friend.