cbdw2014 - nosql development with couchbase and coldfusion (cfml)

31
CFML and Couchbase < > Brad Wood Ortus Solutions

Upload: ortus-solutions-corp

Post on 30-Jun-2015

139 views

Category:

Technology


2 download

DESCRIPTION

NoSQL document stores are reinventing the way we design our databases and cache layers. Couchbase server is a unique offering with unparalleled performance, automatic replication and failover. In this session, we'll talk about how to get started with Couchbase using the open source CFML SDK as well as native caching via the Railo Couchbase Extension.

TRANSCRIPT

Page 1: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

CFML and Couchbase

< >Brad Wood

Ortus Solutions

Page 2: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

About Brad

● ColdFusion Architect (12 years)

● Geek

● Android Lover

● Blogger (codersrevolution.com)

● ColdBox Platform Evangelist

● Musician

● Shade-Tree Mechanic

● Husband (11 years)

● Dad (3 beautiful girls)

Page 3: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

About Ortus

● CFML Gurus

● ColdBox MVC Platform and ContentBox CMS

● Consulting/Server Tuning

● Custom Development

● Training & Mentoring

ortussolutions.com

Page 4: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

What is Couchbase

● Distributed and scalable NoSQL database

● Supports key-value and document-oriented uses

● Open source under Apache 2.0 public license

● Available in enterprise and community editions

Page 5: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase Features

● Fast (async operations)● Scales Horizontally● Auto-document sharding● Auto replicas and node failover● Online topology changes● Nice web admin, CLI, & REST API● Flexible JSON document model

Page 6: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

What is Couchbase

Page 7: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase Core Principles

Easy Scalability

Consistent High Performance

Always On 24x365

Flexible Data Model

Grow cluster without application changes, without downtime with a single click

Consistent sub-millisecond read and write response times with consistent high throughput

No downtime for software upgrades, hardware maintenance, etc.

JSON document model with no fixed schema.

Page 8: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Traditional Data Model

idinteger

FirstNamevarchar(100)

lastNamevarchar(100)

ageInteger

DOBdate

1 Mickey Mouse 86 10/18/1928

2 Minnie Mouse 86 10/18/1928

User

Address

idinteger

userIDinteger

addressvarchar(255)

1 1 2100 W Riverside Dr. Burbank, CA

2 2 1180 Seven Seas Dr. Lake Buena Vista, FL

Page 9: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

NoSQL Document Store (JSON)

{

"firstName": "Mickey",

"lastName": "Mouse",

"age": 86,

"DOB": "10/18/1928",

"catchphrase": "Hot Diggity Dog!",

"addresses": [

"2100 W Riverside Dr. Burbank, CA"

]

}

Page 10: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Flexible Data Model

● Database stays online, no downtime for schema changes

● Records can have different structures, there is no fixed schema

● Model Data easier and faster -- agile rapid application development

Page 11: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Async Operation

33 2Memory Cache

Dis

k Q

ueue

Replication Queue

App Server

Couchbase Server Node

Doc 1

To other nodeRAM

Disk

Page 12: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Cluster Interaction

Couchbase Server Cluster

READ/WRITE/UPDATE

Active

Doc 5

Doc 3 Doc

Doc

Server 1

Active

Doc 4

Doc 7 Doc

Doc

Server 2

Doc 8

Active

Doc 1

Doc 2 Doc

Doc

REPLICA

Doc 4

Doc 1

Doc 8

Doc

Doc

Doc

REPLICA

Doc 6

Doc 3

Doc 2

Doc

Doc

Doc

REPLICA

Doc 7

Doc 9

Doc 5

Doc

Doc

Doc

Server 3

Doc 6

App Server 1

COUCHBASE Client Library

Cluster Map

COUCHBASE Client Library

Cluster Map

App Server 2

Doc 9

DocDocDoc

•Docs distributed evenly across servers

•Each server stores both active and replica docs

•Client library provides app with simple interface to database

•Cluster map provides map to which server doc is on

•Multiple app servers can access same document at same time

Page 13: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

Page 14: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

ORM 2nd Level Cache

Page 15: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

ORM 2nd Level Cache

Page 16: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CacheBox Cache Aggregator and API

Page 17: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CacheBox Cache Aggregator and API

Page 18: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CacheBox Cache Aggregator and API

Page 19: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CacheBox Cache Aggregator and API

Page 20: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CacheBox Cache Aggregator and API

Page 21: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CacheBox Cache Aggregator and API

Page 22: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 23: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 24: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 25: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 26: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 27: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 28: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in Railo

Ortus Couchbase Railo Extension

Page 29: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

CFML CFCouchbase SDK

Page 30: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Couchbase in CFML

Demos!

● Railo Extension● CFCouchbase SDK

Page 31: CBDW2014 - NoSQL Development With Couchbase and ColdFusion (CFML)

Contact Info

Brad Wood

[email protected]

www.codersrevolution.com

www.couchbase.com

www.ortussolutions.com/products/cfcouchbase

www.github.com/bdw429s/CFCouchbase-demo

www.github.com/Ortus-Solutions/cfcouchbase-sdk