SlideShare uma empresa Scribd logo
1 de 52
Baixar para ler offline
Full Stack
Development with
Node.js and NoSQL
Matthew D. Groves (@mgroves)
Nic Raboy (@nraboy)
Full Stack?
Where am I?
• All Things Open
• Raleigh, North Carolina
• https://allthingsopen.org/
Who am I?
• Nic Raboy Matthew D. Groves
• Developer Advocate for Couchbase
• @mgroves on Twitter
• Podcast and blog: https://crosscuttingconcerns.com
• "I am not an expert, but I am an enthusiast."
–Alan Stevens
Full Stack
Development with
Node.js and NoSQL
Matthew D. Groves (@mgroves)
Nic Raboy (@nraboy)
The Role of a Full-Stack Developer
Client Frontend
Backend
The Breakdown of a Stack
Database
Web Application Authentication Middleware
Mobile IoTDesktop
Client Frontend
Backend
Our Stack
Couchbase
Node.js
Angular
What is
Couchbase?
Couchbase: The Complete Database Solution
Lightweight embedded NoSQL database
with full CRUD and query functionality.
Secure web gateway with synchronization,
REST, stream, batch and event APIs for
accessing and synchronizing data over the
web.
Highly scalable, highly available, high
performance NoSQL database server.
Built-in enterprise level security throughout the entire stack includes user authentication, user and role based data access control
(RBAC), secure transport (TLS), and 256-bit AES full database encryption.
Couchbase Lite Sync Gateway Couchbase Server
EMBEDDED DATABASE SYNCHRONIZATION DATABASE SERVER
SECURITY
Couchbase Lite Overview
 Cross-platform support for all major
operating systems and platforms
 Built native from the ground up
 500kb for most platforms
 256-bit AES full database encryption
11
Couchbase Lite
Embedded Database
Sync Gateway Overview
 Synchronize data between Couchbase
Lite and Couchbase Server
 REST, Stream, Batch, and Event APIs
 Pluggable authentication
 Fine grained user and role based
access control
 Elastically scalable in real-time
12
Sync Gateway
Synchronization
Couchbase Server Overview
 Scale easily to thousands of nodes
 Consistent high performance that
supports millions of concurrent users
 Flexible JSON data model
 24x365 always-on availability
13
Couchbase Server
Database Server
The Power of the Flexible JSON Schema
• Ability to store data in
multiple ways
• De-normalized single
document, as opposed to
normalizing data across
multiple table
• Dynamic Schema to add
new values when needed
The Couchbase Node.js SDK
• Uses the high performance Couchbase C library
• Compatible with Node.js frameworks
• Express, Sails, Hapi, Etc.
• Minimal coding
• No database maintenance via code
• No parsing queries via application code
Building Applications with Node.js SDK
//including the Node.js dependency
var Couchbase = require("couchbase");
//connecting to a Couchbase cluster
var cluster = new Couchbase.Cluster("couchbase://localhost");
//opening a bucket in the cluster
var myBucket = cluster.openBucket("travel-sample");
//preparing N1ql
var myQuery = Couchbase.N1qlQuery();
//creating and saving a Document
var document = {
firstname: "Matt",
lastname: "Groves"
};
myBucket.insert("my-key", document, function (error, result) { });
Node.js
function query(sql, done) {
var queryToRun = myQuery.fromString(sql);
myBucket.query(queryToRun, function (error, result) {
if (error) {
console.log("ERROR: ", error);
done(error, null);
return;
}
done(null, result);
return;
});
}
Node.js
function query(sql, done) {
var queryToRun = myQuery.fromString(sql);
myBucket.query(queryToRun, function (error, result) {
if (error) {
console.log("ERROR: ", error);
done(error, null);
return;
}
done(null, result);
return;
});
}
Node.js
function query(sql, done) {
var queryToRun = myQuery.fromString(sql);
myBucket.query(queryToRun, function (error, result) {
if (error) {
console.log("ERROR: ", error);
done(error, null);
return;
}
done(null, result);
return;
});
}
Node.js
function query(sql, done) {
var queryToRun = myQuery.fromString(sql);
myBucket.query(queryToRun, function (error, result) {
if (error) {
console.log("ERROR: ", error);
done(error, null);
return;
}
done(null, result);
return;
});
}
Node.js
function query(sql, done) {
var queryToRun = myQuery.fromString(sql);
myBucket.query(queryToRun, function (error, result) {
if (error) {
console.log("ERROR: ", error);
done(error, null);
return;
}
done(null, result);
return;
});
}
Node.js
function query(sql, done) {
var queryToRun = myQuery.fromString(sql);
myBucket.query(queryToRun, function (error, result) {
if (error) {
console.log("ERROR: ", error);
done(error, null);
return;
}
done(null, result);
return;
});
}
Demo Time!
Node.js Application Design
Node.js
Server Backend
Angular
Client Frontend
Node.js Separation of Frontend and Backend
• No Jade markup
• API driven
• Less client and server coupling
• The backend can evolve without affecting the frontend
• Frontend can be extended to web as well as mobile
Multiple Frontends & One Backend
The Node.js
Backend
Node.js Configuration
1. // app.js
2. var Express = require("express");
3. var Couchbase = require("couchbase");
4. var BodyParser = require("body-parser");
5. var Cors = require("cors");
6. var UUID = require("uuid");
7. var app = Express();
8. var N1qlQuery = Couchbase.N1qlQuery;
9. app.use(BodyParser.json());
10.app.use(BodyParser.urlencoded({ extended: true }));
11.app.use(Cors());
12.var cluster = new Couchbase.Cluster("couchbase://localhost");
13.cluster.authenticate("demo", "123456");
14.var bucket = cluster.openBucket("default");
Node.js Configuration
1. // app.js
2. app.get("/", (request, response) => {
3. response.send("Hello World!");
4. });
5. app.listen(3000, () => {
6. console.log("Listening at :3000");
7. });
Node.js INSERT Document
1. // app.js
2. app.post("/person", (request, response) => {
3. if (!request.body.firstname) {
4. return response.status(401).send({ code: 401, message: "A `firstname` is required." });
5. } else if (!request.body.lastname) {
6. return response.status(401).send({ code: 401, message: "A `lastname` is required." });
7. }
8. request.body.type = "person";
9. var statement = "INSERT INTO `" + bucket._name + "` (KEY, VALUE) VALUES ($id, $data)
10. RETURNING META().id, `" + bucket._name + "`.*";
11. var query = N1qlQuery.fromString(statement);
12. bucket.query(query, { "id": UUID.v4(), "data": request.body }, (error, results) => {
13. if (error) {
14. return response.status(500).send({ code: error.code, message: error.message });
15. }
16. response.send(results[0]);
17. });
18.});
Node.js SELECT All Documents
1. // app.js
2. app.get("/people", (request, response) => {
3. var statement = "SELECT META().id, `" + bucket._name + "`.*
4. FROM `" + bucket._name + "` WHERE type = 'person'";
5. var query = N1qlQuery.fromString(statement).consistency(N1qlQuery.Consistency.REQUEST_PLUS);
6. bucket.query(query, (error, results) => {
7. if (error) {
8. return response.status(500).send({ code: error.code, message: error.message });
9. }
10. response.send(results);
11. });
12.});
Node.js SELECT Single Document
1. // app.js
2. app.get("/person/:id", (request, response) => {
3. if (!request.params.id) {
4. return response.status(401).send({ code: 401, message: "An `id` is required." });
5. }
6. var statement = "SELECT META().id, `" + bucket._name + "`.*
7. FROM `" + bucket._name + "` WHERE type = 'person' AND META().id = $id";
8. var query = N1qlQuery.fromString(statement);
9. bucket.query(query, { "id": request.params.id }, (error, results) => {
10. if (error) {
11. return response.status(500).send({ code: error.code, message: error.message });
12. }
13. response.send(results.length > 0 ? results[0] : {});
14. });
15.});
Node.js DELETE Document
1. // app.js
2. app.delete("/person/:id", (request, response) => {
3. var statement = "DELETE FROM `" + bucket._name + "`
4. WHERE META().id = $id RETURNING META().id, `" + bucket._name + "`.*";
5. var query = N1qlQuery.fromString(statement);
6. bucket.query(query, { "id": request.params.id }, (error, results) => {
7. if (error) {
8. return response.status(500).send({ code: error.code, message: error.message });
9. }
10. response.send(results);
11. });
12.});
The Angular
Frontend
Angular Component
1. import { Component, OnInit } from '@angular/core';
2. import { Http, Headers, RequestOptions } from "@angular/http";
3. import "rxjs/Rx";
4. @Component({
5. selector: 'app-people',
6. templateUrl: './people.component.html',
7. styleUrls: ['./people.component.css']
8. })
9. export class PeopleComponent implements OnInit {
10. public people: Array<any>;
11. public input: any;
12. public constructor(private http: Http) { }
13. public ngOnInit() { }
14. public save() { }
15.}
Get All Documents
1. public constructor(private http: Http) {
2. this.people = [];
3. this.input = {
4. firstname: "",
5. lastname: ""
6. }
7. }
8. public ngOnInit() {
9. this.http.get("http://localhost:3000/people")
10. .map(results => results.json())
11. .subscribe(results => {
12. this.people = results;
13. });
14.}
Create New Document
1. public save() {
2. if (this.input.firstname != "" && this.input.lastname != "") {
3. let headers = new Headers({ "Content-Type": "application/json" });
4. let options = new RequestOptions({ headers: headers });
5. this.http.post("http://localhost:3000/person", JSON.stringify(this.input), options)
6. .map(results => results.json())
7. .subscribe(results => {
8. this.people.push(results);
9. this.input.firstname = "";
10. this.input.lastname = "";
11. });
12. }
13.}
More Complex
Node.js Queries
Node.js Travel Sample
1. FlightPath.findAll = function (from, to, callback) {
2. var statement = "SELECT faa AS fromAirport, geo " +
3. "FROM `" + config.couchbase.bucket + "` r" +
4. "WHERE airportname = $1 " +
5. "UNION SELECT faa AS toAirport, geo " +
6. "FROM `" + config.couchbase.bucket + "` r" +
7. "WHERE airportname = $2";
8. var query = N1qlQuery.fromString(statement);
9. db.query(query, [from, to], function (error, result) {
10. if (error) {
11. return callback(error, null);
12. }
13. callback(null, result);
14. });
15.};
Node.js Travel Sample
1. FlightPath.findAll = function (queryFrom, queryTo, leave, callback) {
2. var statement = "SELECT r.id, a.name, s.flight, s.utc, r.sourceairport, r.destinationairport,
r.equipment " +
3. "FROM `" + config.couchbase.bucket + "` r" +
4. "UNNEST r.schedule s " +
5. "JOIN `" + config.couchbase.bucket + "` a ON KEYS r.airlineid " +
6. "WHERE r.sourceairport = $1 AND r.destinationairport = $2 AND s.day = $3 ”
7. "ORDER BY a.name";
8. var query = N1qlQuery.fromString(statement);
9. db.query(query, [queryFrom, queryTo, leave], function (error, result) {
10. if (error) {
11. return callback(error, null);
12. }
13. callback(null, result);
14. });
15.};
Node.js Sample Applications
• https://github.com/couchbaselabs/try-cb-nodejs
• https://github.com/couchbaselabs/restful-angularjs-nodejs
Couchbase N1QL Tutorial
• http://query.pub.couchbase.com/tutorial/
Ottoman ODM
4
3
Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
Ottoman Model
1. var RecordModel = ottoman.model("Record", {
2. firstname: { type: "string" },
3. lastname: { type: "string" },
4. email: { type: "string" },
5. created_at: { type: "Date", default: Date.now }
6. });
Ottoman Saving
1. var myRecord = new RecordModel({
2. firstname: "Matt",
3. lastname: "Groves",
4. email: "matthew.groves@couchbase.com"
5. });
6. myRecord.save(function (error) {
7. if (error) {
8. // Error here
9. }
10. // Success here
11.});
Ottoman Finding
1. RecordModel.find({}, function (error, result) {
2. if (error) {
3. // Error here
4. }
5. // Array of results here
6. });
Where do you find us?
• developer.couchbase.com
• blog.couchbase.com
• @couchbase / @couchbasedev / @mgroves
• forums.couchbase.com
• stackoverflow.com/questions/tagged/couchbase
Frequently Asked Questions
1. How is Couchbase different than Mongo?
2. Is Couchbase the same thing as CouchDb?
3. How did you get to be both incredibly handsome and
tremendously intelligent?
4. What is the Couchbase licensing situation?
5. Is Couchbase a Managed Cloud Service?
CouchDB and Couchbase
< Back
memcached
MongoDB vs Couchbase
• Architecture
• Memory first architecture
• Master-master architecture
• Auto-sharding
< Back
• Features
• SQL (N1QL)
• FullText Search
• Mobile & Sync
Licensing
Couchbase Server Community
• Open source (Apache 2)
• Binary release is one release behind Enterprise
• Free to use in dev/test/qa/prod
• Forum support only
Couchbase Server Enterprise
• Mostly open source (Apache 2)
• Some features not available on Community (XDCRTLS, MDS, Rack Zone, etc)
• Free to use in dev/test/qa
• Need commercial license for prod
• Paid support provided
< Back
Managed Cloud Service (DBaaS)?
Short answer: No.
< Back
Longer answer: Kinda. https://zdatainc.com/couchbase-managed-services/
Longest answer: See me after class.

Mais conteúdo relacionado

Mais procurados

Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013Kristoffer Deinoff
 
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK - Nicola Iarocci - Co...
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK -  Nicola Iarocci - Co...RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK -  Nicola Iarocci - Co...
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK - Nicola Iarocci - Co...Codemotion
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play appsYevgeniy Brikman
 
HTML5 JavaScript APIs
HTML5 JavaScript APIsHTML5 JavaScript APIs
HTML5 JavaScript APIsRemy Sharp
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?Srijan Technologies
 
Couchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemCouchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemdelagoya
 
Async servers and clients in Rest.li
Async servers and clients in Rest.liAsync servers and clients in Rest.li
Async servers and clients in Rest.liKaran Parikh
 
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateEffiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateThorben Janssen
 
Developing iOS REST Applications
Developing iOS REST ApplicationsDeveloping iOS REST Applications
Developing iOS REST Applicationslmrei
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...mfrancis
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative versionWO Community
 
Stratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration PresentationStratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration PresentationJeremy Przygode
 
Inside Azure Diagnostics
Inside Azure DiagnosticsInside Azure Diagnostics
Inside Azure DiagnosticsMichael Collier
 
Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Varun Torka
 
Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)Michael Collier
 
Barcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationBarcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationSociable
 

Mais procurados (20)

Jsp
JspJsp
Jsp
 
Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013
 
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK - Nicola Iarocci - Co...
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK -  Nicola Iarocci - Co...RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK -  Nicola Iarocci - Co...
RESTFUL SERVICES MADE EASY: THE EVE REST API FRAMEWORK - Nicola Iarocci - Co...
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 
HTML5 JavaScript APIs
HTML5 JavaScript APIsHTML5 JavaScript APIs
HTML5 JavaScript APIs
 
Play!ng with scala
Play!ng with scalaPlay!ng with scala
Play!ng with scala
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
 
Couchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problemCouchdb: No SQL? No driver? No problem
Couchdb: No SQL? No driver? No problem
 
Async servers and clients in Rest.li
Async servers and clients in Rest.liAsync servers and clients in Rest.li
Async servers and clients in Rest.li
 
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und HibernateEffiziente Datenpersistierung mit JPA 2.1 und Hibernate
Effiziente Datenpersistierung mit JPA 2.1 und Hibernate
 
Developing iOS REST Applications
Developing iOS REST ApplicationsDeveloping iOS REST Applications
Developing iOS REST Applications
 
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
OSGi and Spring Data for simple (Web) Application Development - Christian Bar...
 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
 
Full Stack Scala
Full Stack ScalaFull Stack Scala
Full Stack Scala
 
Play vs Rails
Play vs RailsPlay vs Rails
Play vs Rails
 
Stratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration PresentationStratalux Cloud Formation and Chef Integration Presentation
Stratalux Cloud Formation and Chef Integration Presentation
 
Inside Azure Diagnostics
Inside Azure DiagnosticsInside Azure Diagnostics
Inside Azure Diagnostics
 
Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)
 
Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)Programming Azure Active Directory (DevLink 2014)
Programming Azure Active Directory (DevLink 2014)
 
Barcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentationBarcamp Auckland Rails3 presentation
Barcamp Auckland Rails3 presentation
 

Semelhante a Full stack development with node and NoSQL - All Things Open - October 2017

RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express Jeetendra singh
 
API Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API DocumentationAPI Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API DocumentationRouven Weßling
 
Nodejs first class
Nodejs first classNodejs first class
Nodejs first classFin Chen
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applicationsTom Croucher
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerNic Raboy
 
API Days Australia - Automatic Testing of (RESTful) API Documentation
API Days Australia  - Automatic Testing of (RESTful) API DocumentationAPI Days Australia  - Automatic Testing of (RESTful) API Documentation
API Days Australia - Automatic Testing of (RESTful) API DocumentationRouven Weßling
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationNordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationRouven Weßling
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsasync_io
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVCAlive Kuo
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps OfflinePedro Morais
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)Ran Mizrahi
 
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Ran Mizrahi
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSam Brannen
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munichSonja Madsen
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with ExpressAaron Stannard
 
nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.pptWalaSidhom1
 

Semelhante a Full stack development with node and NoSQL - All Things Open - October 2017 (20)

RESTful API In Node Js using Express
RESTful API In Node Js using Express RESTful API In Node Js using Express
RESTful API In Node Js using Express
 
API Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API DocumentationAPI Days Paris - Automatic Testing of (RESTful) API Documentation
API Days Paris - Automatic Testing of (RESTful) API Documentation
 
NodeJS
NodeJSNodeJS
NodeJS
 
Nodejs first class
Nodejs first classNodejs first class
Nodejs first class
 
Writing robust Node.js applications
Writing robust Node.js applicationsWriting robust Node.js applications
Writing robust Node.js applications
 
Quick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase ServerQuick and Easy Development with Node.js and Couchbase Server
Quick and Easy Development with Node.js and Couchbase Server
 
API Days Australia - Automatic Testing of (RESTful) API Documentation
API Days Australia  - Automatic Testing of (RESTful) API DocumentationAPI Days Australia  - Automatic Testing of (RESTful) API Documentation
API Days Australia - Automatic Testing of (RESTful) API Documentation
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationNordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API Documentation
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)Intro to node.js - Ran Mizrahi (27/8/2014)
Intro to node.js - Ran Mizrahi (27/8/2014)
 
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munich
 
Building Web Apps with Express
Building Web Apps with ExpressBuilding Web Apps with Express
Building Web Apps with Express
 
nodejs_at_a_glance.ppt
nodejs_at_a_glance.pptnodejs_at_a_glance.ppt
nodejs_at_a_glance.ppt
 

Mais de Matthew Groves

CREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptxCREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptxMatthew Groves
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023Matthew Groves
 
Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022Matthew Groves
 
Putting the SQL Back in NoSQL - October 2022 - All Things Open
Putting the SQL Back in NoSQL - October 2022 - All Things OpenPutting the SQL Back in NoSQL - October 2022 - All Things Open
Putting the SQL Back in NoSQL - October 2022 - All Things OpenMatthew Groves
 
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptxCache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptxMatthew Groves
 
Don't Drop ACID (July 2021)
Don't Drop ACID (July 2021)Don't Drop ACID (July 2021)
Don't Drop ACID (July 2021)Matthew Groves
 
Don't Drop ACID - Data Love - April 2021
Don't Drop ACID - Data Love - April 2021Don't Drop ACID - Data Love - April 2021
Don't Drop ACID - Data Love - April 2021Matthew Groves
 
Demystifying NoSQL - All Things Open - October 2020
Demystifying NoSQL - All Things Open - October 2020Demystifying NoSQL - All Things Open - October 2020
Demystifying NoSQL - All Things Open - October 2020Matthew Groves
 
Autonomous Microservices - Manning - July 2020
Autonomous Microservices - Manning - July 2020Autonomous Microservices - Manning - July 2020
Autonomous Microservices - Manning - July 2020Matthew Groves
 
CONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLMatthew Groves
 
JSON Data Modeling - GDG Indy - April 2020
JSON Data Modeling - GDG Indy - April 2020JSON Data Modeling - GDG Indy - April 2020
JSON Data Modeling - GDG Indy - April 2020Matthew Groves
 
Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...
Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...
Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...Matthew Groves
 
Intro to SQL++ - Detroit Tech Watch - June 2019
Intro to SQL++ - Detroit Tech Watch - June 2019Intro to SQL++ - Detroit Tech Watch - June 2019
Intro to SQL++ - Detroit Tech Watch - June 2019Matthew Groves
 
Autonomous Microservices - CodeMash - January 2019
Autonomous Microservices - CodeMash - January 2019Autonomous Microservices - CodeMash - January 2019
Autonomous Microservices - CodeMash - January 2019Matthew Groves
 
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 20185 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018Matthew Groves
 
JSON Data Modeling - July 2018 - Tulsa Techfest
JSON Data Modeling - July 2018 - Tulsa TechfestJSON Data Modeling - July 2018 - Tulsa Techfest
JSON Data Modeling - July 2018 - Tulsa TechfestMatthew Groves
 
5 NoSQL Options - Toronto - May 2018
5 NoSQL Options - Toronto - May 20185 NoSQL Options - Toronto - May 2018
5 NoSQL Options - Toronto - May 2018Matthew Groves
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...Matthew Groves
 
I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017Matthew Groves
 
Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017Matthew Groves
 

Mais de Matthew Groves (20)

CREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptxCREAM - That Conference Austin - January 2024.pptx
CREAM - That Conference Austin - January 2024.pptx
 
FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023FluentMigrator - Dayton .NET - July 2023
FluentMigrator - Dayton .NET - July 2023
 
Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022Cache Rules Everything Around Me - DevIntersection - December 2022
Cache Rules Everything Around Me - DevIntersection - December 2022
 
Putting the SQL Back in NoSQL - October 2022 - All Things Open
Putting the SQL Back in NoSQL - October 2022 - All Things OpenPutting the SQL Back in NoSQL - October 2022 - All Things Open
Putting the SQL Back in NoSQL - October 2022 - All Things Open
 
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptxCache Rules Everything Around Me - Momentum - October 2022.pptx
Cache Rules Everything Around Me - Momentum - October 2022.pptx
 
Don't Drop ACID (July 2021)
Don't Drop ACID (July 2021)Don't Drop ACID (July 2021)
Don't Drop ACID (July 2021)
 
Don't Drop ACID - Data Love - April 2021
Don't Drop ACID - Data Love - April 2021Don't Drop ACID - Data Love - April 2021
Don't Drop ACID - Data Love - April 2021
 
Demystifying NoSQL - All Things Open - October 2020
Demystifying NoSQL - All Things Open - October 2020Demystifying NoSQL - All Things Open - October 2020
Demystifying NoSQL - All Things Open - October 2020
 
Autonomous Microservices - Manning - July 2020
Autonomous Microservices - Manning - July 2020Autonomous Microservices - Manning - July 2020
Autonomous Microservices - Manning - July 2020
 
CONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQLCONDG April 23 2020 - Baskar Rao - GraphQL
CONDG April 23 2020 - Baskar Rao - GraphQL
 
JSON Data Modeling - GDG Indy - April 2020
JSON Data Modeling - GDG Indy - April 2020JSON Data Modeling - GDG Indy - April 2020
JSON Data Modeling - GDG Indy - April 2020
 
Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...
Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...
Background Tasks Without a Separate Service: Hangfire for ASP.NET - KCDC - Ju...
 
Intro to SQL++ - Detroit Tech Watch - June 2019
Intro to SQL++ - Detroit Tech Watch - June 2019Intro to SQL++ - Detroit Tech Watch - June 2019
Intro to SQL++ - Detroit Tech Watch - June 2019
 
Autonomous Microservices - CodeMash - January 2019
Autonomous Microservices - CodeMash - January 2019Autonomous Microservices - CodeMash - January 2019
Autonomous Microservices - CodeMash - January 2019
 
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 20185 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
5 Popular Choices for NoSQL on a Microsoft Platform - Tulsa - July 2018
 
JSON Data Modeling - July 2018 - Tulsa Techfest
JSON Data Modeling - July 2018 - Tulsa TechfestJSON Data Modeling - July 2018 - Tulsa Techfest
JSON Data Modeling - July 2018 - Tulsa Techfest
 
5 NoSQL Options - Toronto - May 2018
5 NoSQL Options - Toronto - May 20185 NoSQL Options - Toronto - May 2018
5 NoSQL Options - Toronto - May 2018
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
 
I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017I Have a NoSQL toaster - DC - August 2017
I Have a NoSQL toaster - DC - August 2017
 
Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017Querying NoSQL with SQL - KCDC - August 2017
Querying NoSQL with SQL - KCDC - August 2017
 

Último

Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilVICTOR MAESTRE RAMIREZ
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLAlluxio, Inc.
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfTobias Schneck
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadIvo Andreev
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorShane Coughlan
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
Kubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptxKubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptxPrakarsh -
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기Chiwon Song
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIIvo Andreev
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Neo4j
 

Último (20)

Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
Generative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-CouncilGenerative AI for Cybersecurity - EC-Council
Generative AI for Cybersecurity - EC-Council
 
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/MLBig Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
Big Data Bellevue Meetup | Enhancing Python Data Loading in the Cloud for AI/ML
 
Program with GUTs
Program with GUTsProgram with GUTs
Program with GUTs
 
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdfARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
ARM Talk @ Rejekts - Will ARM be the new Mainstream in our Data Centers_.pdf
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Cybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and BadCybersecurity Challenges with Generative AI - for Good and Bad
Cybersecurity Challenges with Generative AI - for Good and Bad
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
Sustainable Web Design - Claire Thornewill
Sustainable Web Design - Claire ThornewillSustainable Web Design - Claire Thornewill
Sustainable Web Design - Claire Thornewill
 
Kubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptxKubernetes go-live checklist for your microservices.pptx
Kubernetes go-live checklist for your microservices.pptx
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 

Full stack development with node and NoSQL - All Things Open - October 2017

  • 1. Full Stack Development with Node.js and NoSQL Matthew D. Groves (@mgroves) Nic Raboy (@nraboy)
  • 3. Where am I? • All Things Open • Raleigh, North Carolina • https://allthingsopen.org/
  • 4. Who am I? • Nic Raboy Matthew D. Groves • Developer Advocate for Couchbase • @mgroves on Twitter • Podcast and blog: https://crosscuttingconcerns.com • "I am not an expert, but I am an enthusiast." –Alan Stevens
  • 5. Full Stack Development with Node.js and NoSQL Matthew D. Groves (@mgroves) Nic Raboy (@nraboy)
  • 6. The Role of a Full-Stack Developer
  • 7. Client Frontend Backend The Breakdown of a Stack Database Web Application Authentication Middleware Mobile IoTDesktop
  • 10. Couchbase: The Complete Database Solution Lightweight embedded NoSQL database with full CRUD and query functionality. Secure web gateway with synchronization, REST, stream, batch and event APIs for accessing and synchronizing data over the web. Highly scalable, highly available, high performance NoSQL database server. Built-in enterprise level security throughout the entire stack includes user authentication, user and role based data access control (RBAC), secure transport (TLS), and 256-bit AES full database encryption. Couchbase Lite Sync Gateway Couchbase Server EMBEDDED DATABASE SYNCHRONIZATION DATABASE SERVER SECURITY
  • 11. Couchbase Lite Overview  Cross-platform support for all major operating systems and platforms  Built native from the ground up  500kb for most platforms  256-bit AES full database encryption 11 Couchbase Lite Embedded Database
  • 12. Sync Gateway Overview  Synchronize data between Couchbase Lite and Couchbase Server  REST, Stream, Batch, and Event APIs  Pluggable authentication  Fine grained user and role based access control  Elastically scalable in real-time 12 Sync Gateway Synchronization
  • 13. Couchbase Server Overview  Scale easily to thousands of nodes  Consistent high performance that supports millions of concurrent users  Flexible JSON data model  24x365 always-on availability 13 Couchbase Server Database Server
  • 14. The Power of the Flexible JSON Schema • Ability to store data in multiple ways • De-normalized single document, as opposed to normalizing data across multiple table • Dynamic Schema to add new values when needed
  • 15. The Couchbase Node.js SDK • Uses the high performance Couchbase C library • Compatible with Node.js frameworks • Express, Sails, Hapi, Etc. • Minimal coding • No database maintenance via code • No parsing queries via application code
  • 16. Building Applications with Node.js SDK //including the Node.js dependency var Couchbase = require("couchbase"); //connecting to a Couchbase cluster var cluster = new Couchbase.Cluster("couchbase://localhost"); //opening a bucket in the cluster var myBucket = cluster.openBucket("travel-sample"); //preparing N1ql var myQuery = Couchbase.N1qlQuery(); //creating and saving a Document var document = { firstname: "Matt", lastname: "Groves" }; myBucket.insert("my-key", document, function (error, result) { });
  • 17. Node.js function query(sql, done) { var queryToRun = myQuery.fromString(sql); myBucket.query(queryToRun, function (error, result) { if (error) { console.log("ERROR: ", error); done(error, null); return; } done(null, result); return; }); }
  • 18. Node.js function query(sql, done) { var queryToRun = myQuery.fromString(sql); myBucket.query(queryToRun, function (error, result) { if (error) { console.log("ERROR: ", error); done(error, null); return; } done(null, result); return; }); }
  • 19. Node.js function query(sql, done) { var queryToRun = myQuery.fromString(sql); myBucket.query(queryToRun, function (error, result) { if (error) { console.log("ERROR: ", error); done(error, null); return; } done(null, result); return; }); }
  • 20. Node.js function query(sql, done) { var queryToRun = myQuery.fromString(sql); myBucket.query(queryToRun, function (error, result) { if (error) { console.log("ERROR: ", error); done(error, null); return; } done(null, result); return; }); }
  • 21. Node.js function query(sql, done) { var queryToRun = myQuery.fromString(sql); myBucket.query(queryToRun, function (error, result) { if (error) { console.log("ERROR: ", error); done(error, null); return; } done(null, result); return; }); }
  • 22. Node.js function query(sql, done) { var queryToRun = myQuery.fromString(sql); myBucket.query(queryToRun, function (error, result) { if (error) { console.log("ERROR: ", error); done(error, null); return; } done(null, result); return; }); }
  • 24. Node.js Application Design Node.js Server Backend Angular Client Frontend
  • 25. Node.js Separation of Frontend and Backend • No Jade markup • API driven • Less client and server coupling • The backend can evolve without affecting the frontend • Frontend can be extended to web as well as mobile
  • 26. Multiple Frontends & One Backend
  • 28. Node.js Configuration 1. // app.js 2. var Express = require("express"); 3. var Couchbase = require("couchbase"); 4. var BodyParser = require("body-parser"); 5. var Cors = require("cors"); 6. var UUID = require("uuid"); 7. var app = Express(); 8. var N1qlQuery = Couchbase.N1qlQuery; 9. app.use(BodyParser.json()); 10.app.use(BodyParser.urlencoded({ extended: true })); 11.app.use(Cors()); 12.var cluster = new Couchbase.Cluster("couchbase://localhost"); 13.cluster.authenticate("demo", "123456"); 14.var bucket = cluster.openBucket("default");
  • 29. Node.js Configuration 1. // app.js 2. app.get("/", (request, response) => { 3. response.send("Hello World!"); 4. }); 5. app.listen(3000, () => { 6. console.log("Listening at :3000"); 7. });
  • 30. Node.js INSERT Document 1. // app.js 2. app.post("/person", (request, response) => { 3. if (!request.body.firstname) { 4. return response.status(401).send({ code: 401, message: "A `firstname` is required." }); 5. } else if (!request.body.lastname) { 6. return response.status(401).send({ code: 401, message: "A `lastname` is required." }); 7. } 8. request.body.type = "person"; 9. var statement = "INSERT INTO `" + bucket._name + "` (KEY, VALUE) VALUES ($id, $data) 10. RETURNING META().id, `" + bucket._name + "`.*"; 11. var query = N1qlQuery.fromString(statement); 12. bucket.query(query, { "id": UUID.v4(), "data": request.body }, (error, results) => { 13. if (error) { 14. return response.status(500).send({ code: error.code, message: error.message }); 15. } 16. response.send(results[0]); 17. }); 18.});
  • 31. Node.js SELECT All Documents 1. // app.js 2. app.get("/people", (request, response) => { 3. var statement = "SELECT META().id, `" + bucket._name + "`.* 4. FROM `" + bucket._name + "` WHERE type = 'person'"; 5. var query = N1qlQuery.fromString(statement).consistency(N1qlQuery.Consistency.REQUEST_PLUS); 6. bucket.query(query, (error, results) => { 7. if (error) { 8. return response.status(500).send({ code: error.code, message: error.message }); 9. } 10. response.send(results); 11. }); 12.});
  • 32. Node.js SELECT Single Document 1. // app.js 2. app.get("/person/:id", (request, response) => { 3. if (!request.params.id) { 4. return response.status(401).send({ code: 401, message: "An `id` is required." }); 5. } 6. var statement = "SELECT META().id, `" + bucket._name + "`.* 7. FROM `" + bucket._name + "` WHERE type = 'person' AND META().id = $id"; 8. var query = N1qlQuery.fromString(statement); 9. bucket.query(query, { "id": request.params.id }, (error, results) => { 10. if (error) { 11. return response.status(500).send({ code: error.code, message: error.message }); 12. } 13. response.send(results.length > 0 ? results[0] : {}); 14. }); 15.});
  • 33. Node.js DELETE Document 1. // app.js 2. app.delete("/person/:id", (request, response) => { 3. var statement = "DELETE FROM `" + bucket._name + "` 4. WHERE META().id = $id RETURNING META().id, `" + bucket._name + "`.*"; 5. var query = N1qlQuery.fromString(statement); 6. bucket.query(query, { "id": request.params.id }, (error, results) => { 7. if (error) { 8. return response.status(500).send({ code: error.code, message: error.message }); 9. } 10. response.send(results); 11. }); 12.});
  • 35. Angular Component 1. import { Component, OnInit } from '@angular/core'; 2. import { Http, Headers, RequestOptions } from "@angular/http"; 3. import "rxjs/Rx"; 4. @Component({ 5. selector: 'app-people', 6. templateUrl: './people.component.html', 7. styleUrls: ['./people.component.css'] 8. }) 9. export class PeopleComponent implements OnInit { 10. public people: Array<any>; 11. public input: any; 12. public constructor(private http: Http) { } 13. public ngOnInit() { } 14. public save() { } 15.}
  • 36. Get All Documents 1. public constructor(private http: Http) { 2. this.people = []; 3. this.input = { 4. firstname: "", 5. lastname: "" 6. } 7. } 8. public ngOnInit() { 9. this.http.get("http://localhost:3000/people") 10. .map(results => results.json()) 11. .subscribe(results => { 12. this.people = results; 13. }); 14.}
  • 37. Create New Document 1. public save() { 2. if (this.input.firstname != "" && this.input.lastname != "") { 3. let headers = new Headers({ "Content-Type": "application/json" }); 4. let options = new RequestOptions({ headers: headers }); 5. this.http.post("http://localhost:3000/person", JSON.stringify(this.input), options) 6. .map(results => results.json()) 7. .subscribe(results => { 8. this.people.push(results); 9. this.input.firstname = ""; 10. this.input.lastname = ""; 11. }); 12. } 13.}
  • 39. Node.js Travel Sample 1. FlightPath.findAll = function (from, to, callback) { 2. var statement = "SELECT faa AS fromAirport, geo " + 3. "FROM `" + config.couchbase.bucket + "` r" + 4. "WHERE airportname = $1 " + 5. "UNION SELECT faa AS toAirport, geo " + 6. "FROM `" + config.couchbase.bucket + "` r" + 7. "WHERE airportname = $2"; 8. var query = N1qlQuery.fromString(statement); 9. db.query(query, [from, to], function (error, result) { 10. if (error) { 11. return callback(error, null); 12. } 13. callback(null, result); 14. }); 15.};
  • 40. Node.js Travel Sample 1. FlightPath.findAll = function (queryFrom, queryTo, leave, callback) { 2. var statement = "SELECT r.id, a.name, s.flight, s.utc, r.sourceairport, r.destinationairport, r.equipment " + 3. "FROM `" + config.couchbase.bucket + "` r" + 4. "UNNEST r.schedule s " + 5. "JOIN `" + config.couchbase.bucket + "` a ON KEYS r.airlineid " + 6. "WHERE r.sourceairport = $1 AND r.destinationairport = $2 AND s.day = $3 ” 7. "ORDER BY a.name"; 8. var query = N1qlQuery.fromString(statement); 9. db.query(query, [queryFrom, queryTo, leave], function (error, result) { 10. if (error) { 11. return callback(error, null); 12. } 13. callback(null, result); 14. }); 15.};
  • 41. Node.js Sample Applications • https://github.com/couchbaselabs/try-cb-nodejs • https://github.com/couchbaselabs/restful-angularjs-nodejs
  • 42. Couchbase N1QL Tutorial • http://query.pub.couchbase.com/tutorial/
  • 43. Ottoman ODM 4 3 Confidential and Proprietary. Do not distribute without Couchbase consent. © Couchbase 2017. All rights reserved.
  • 44. Ottoman Model 1. var RecordModel = ottoman.model("Record", { 2. firstname: { type: "string" }, 3. lastname: { type: "string" }, 4. email: { type: "string" }, 5. created_at: { type: "Date", default: Date.now } 6. });
  • 45. Ottoman Saving 1. var myRecord = new RecordModel({ 2. firstname: "Matt", 3. lastname: "Groves", 4. email: "matthew.groves@couchbase.com" 5. }); 6. myRecord.save(function (error) { 7. if (error) { 8. // Error here 9. } 10. // Success here 11.});
  • 46. Ottoman Finding 1. RecordModel.find({}, function (error, result) { 2. if (error) { 3. // Error here 4. } 5. // Array of results here 6. });
  • 47. Where do you find us? • developer.couchbase.com • blog.couchbase.com • @couchbase / @couchbasedev / @mgroves • forums.couchbase.com • stackoverflow.com/questions/tagged/couchbase
  • 48. Frequently Asked Questions 1. How is Couchbase different than Mongo? 2. Is Couchbase the same thing as CouchDb? 3. How did you get to be both incredibly handsome and tremendously intelligent? 4. What is the Couchbase licensing situation? 5. Is Couchbase a Managed Cloud Service?
  • 49. CouchDB and Couchbase < Back memcached
  • 50. MongoDB vs Couchbase • Architecture • Memory first architecture • Master-master architecture • Auto-sharding < Back • Features • SQL (N1QL) • FullText Search • Mobile & Sync
  • 51. Licensing Couchbase Server Community • Open source (Apache 2) • Binary release is one release behind Enterprise • Free to use in dev/test/qa/prod • Forum support only Couchbase Server Enterprise • Mostly open source (Apache 2) • Some features not available on Community (XDCRTLS, MDS, Rack Zone, etc) • Free to use in dev/test/qa • Need commercial license for prod • Paid support provided < Back
  • 52. Managed Cloud Service (DBaaS)? Short answer: No. < Back Longer answer: Kinda. https://zdatainc.com/couchbase-managed-services/ Longest answer: See me after class.

Notas do Editor

  1. What is a full stack? This is my idea of a full stack. Some people take issue with the term "full stack" because you aren't programming the literal entire stack. But what is usually meant is UI to the database. And that's what we're going to cover today.
  2. The need for engineers working in a silo is shrinking Full stack engineers do a little bit of everything
  3. A stack includes a client facing layer, backend, and database. Each layer in a stack can extend to multiple components, for example more than one client facing component or more than one database.
  4. No db migrations in code No proprietary query language, we'll be using SQL
  5. Open source apache license for community edition, enterprise edition on a faster release schedule, some advanced features, and support license. Couchbase is software you can run in the cloud on a VM or on your own data center. CosmosDb is a manage cloud service, but there is a emulator you can run locally.
  6. Couchbase is the company, Couchbase Server is the software So imagine if Mongo and Redis companies formed a new company named RedMongo, and a new database combining Redis and Mongo together called RedMongo Server
  7. Memory first: integrated cache, you don't need to put redis on top of couchbase Master-master: easier scaling, better scaling Auto-sharding: we call vBuckets, you don't have to come up with a sharding scheme, it's done by crc32 N1QL: SQL, mongo has a more limited query language and it's not SQL-like Full Text Search: Using the bleve search engine, language aware FTS capabilities built in Mobile & sync: Mongo has nothing like the offline-first and sync capabilities couchbase offers Mongo DOES have a DbaaS cloud provider
  8. Everything I've shown you today is available in Community edition The only N1QL feature I can think of not in Community is INFER The Enterprise features you probably don't need unless you are Enterprise developer.
  9. Not yet. We've been talking about it at least as long as I've been with Couchbase. It's partly a technical problem, may need additional features for multi-tenant. It's partly (mostly) a business problem. Would this be worth it? Couchbase IS in the Azure and AWS marketplaces, and there are some wizards to make config easy, but it runs on your VMs.