While the hype surrounding “NoSQL” (non-relational) database technology has become deafening, there is real substance beneath the often exaggerated claims. But like most things in life, the benefits come at a cost. Developers accustomed to data modeling and application development against relational database technology will need to approach things differently. This webinar will highlight the differences between a distributed document-oriented and relational database, the implications for application development and tips and tricks that will ease the transition from relational to NoSQL database technology.
2. WHY NOSQL?
“ Zynga’s games serve over 235 million active users per
month. We depend on technology from Couchbase to make
that possible. We have improved the performance and
availability of our games while reducing hardware and
administration costs. We will continue to transition our data
from relational databases to Couchbase technology.
”
Cadir Lee
Chief Technology Officer, Zynga
2
4. Scaling economics in the Web application stack
Application Scales Out
Just add more commodity web servers
Database Scales Up
Get a bigger, more complex server
4
5. Lacking market solutions, users forced to invent
Bigtable Dynamo Cassandra Voldemort
November 2006 October 2007 August 2008 February 2009
Common characteristics of these “NoSQL” technologies
• No schema required before inserting data
• No schema change required to change data format
• Auto-sharding without application participation
• Distributed query support
• Automatic data replication across servers and regions
Very few organizations want to (fewer can) build and maintain database technology. Couchbase
was founded to create packaged, commercially-supported NoSQL database products.
5
7. Couchbase is a “document-oriented” NoSQL database
Simple. Flexible. Adjust to changing data management requirements with ease.
Simple.
{
Application Server “UUID”: “21f7f8de-8051-5b89-86
“Time”: “2011-04-01T13:01:02.42
“Server”: “A2223E”,
“Calling Server”: “A2213W”,
“Type”: “E100”,
“Initiating User”: “dsallings@spy.net”,
“Details”:
{
“IP”: “10.1.1.22”,
“API”: “InsertDVDQueueItem”,
“Trace”: “cleansed”,
“Tags”:
[
“SERVER”,
“US-West”,
“API”
]
}
}
Example JSON document
No schema required to insert data (or change data format later). Lightweight, cross-platform
document format (JSON). Efficient, native support for binary attachments.
7
8. Document data model
{
“UUID”: “21f7f8de-8051-5b89-86
datum datum datum datum { “Time”: “2011-04-01T13:01:02.42
“UUID”: “21f7f8de-8051-5b89-86
“Server”: “A2223E”,
{ “Time”: “2011-04-01T13:01:02.42
“Calling Server”: “A2213W”,
“Server”: “A2223E”,
“UUID”: “21f7f8de-8051-5b89-86
“Type”: “E100”,
{ “Time”:“Calling Server”: User”: “dsallings@spy.net”,
“2011-04-01T13:01:02.42
“Initiating “A2213W”,
“Server”: “A2223E”,
“Type”: “E100”,
“Details”:
“UUID”: “21f7f8de-8051-5b89-86
“Initiating User”: “dsallings@spy.net”,
“Time”:“Calling Server”: “A2213W”,
“2011-04-01T13:01:02.42 {
datum datum datum datum “Type”:“Details”:
“Server”: “A2223E”, “E100”,
“Calling“Initiating “A2213W”,{
“IP”: “10.1.1.22”,
Server”: User”: “dsallings@spy.net”,
“API”: “InsertDVDQueueItem”,
“Type”:“Details”:
“E100”, “IP”: “10.1.1.22”,
“Trace”: “cleansed”,
{ “API”: “Tags”:
“InsertDVDQueueItem”,
“Initiating User”: “dsallings@spy.net”,
“Details”: “Trace”: “cleansed”,
“IP”: “10.1.1.22”, [
{ “Tags”:
“API”: “InsertDVDQueueItem”,
“SERVER”,
“IP”: “10.1.1.22”, [
“Trace”: “cleansed”, “US-West”,
datum datum datum datum “Tags”: “SERVER”,
“API”: “InsertDVDQueueItem”,
[
“Trace”: “cleansed”,
“API”
“US-West”,
]
“Tags”: “SERVER”, “API”
}
[ “US-West”,
} ]
“SERVER”, }
“API”
}
“US-West”, ]
}
“API”
datum datum datum datum } ]
}
}
Relational data model Document data model
Highly-structured table organization with Collection of complex documents with
rigidly-defined data formats and record arbitrary, nested data formats and
structure. varying “record” format.
8
9. Couchbase is consistently fast
Decouple application performance (user experience) from sketchy database I/O.
Application Server
Fast.
Memcached
Memcached, the most widely deployed in-memory caching technology on the planet, is built in to
Couchbase, enabling consistently low-latency data reads and writes. We wrote most of memcached.
9
10. Couchbase is elastic (scales out for increased capacity)
Grow with linear cost, constant performance and without downtime
Application Server
Elastic.
Expanding (or contracting) a Couchbase cluster is effortless; and requires no application downtime.
Other NoSQL solutions require complex configuration and application downtime.
10
11. Elasticity courtesy of Membase technology
Proven in the world’s largest NoSQL production deployments
Application Server
Memcached
Membase
Pushbutton rebalancing of a Enterprise-class cluster monitoring and
live, 100+ node cluster administration
Membase has proven itself in multi-hundred node deployments at Zynga, AOL and others. There is
a BIG difference between a 20 node and a 750 node cluster. Couchbase is the only NoSQL solution
that can scale, and remain manageable, from a single node to a multi-hundred node cluster.
Watch a live, 100 node cluster rebalance at: http://blog.couchbase.com/take-a-tour-membase-server-one-dot-seven 11
12. Couchbase Mobile
CouchSync
Unique to Couchbase, CouchSync permits automated synchronization of databases between
intermittently-connected mobile devices and a datacenter- or cloud-resident Couchbase cluster 12
13. AD AND OFFER TARGETING
“ AOL servesand any of impressions per day from our ad serving
platforms,
billions
incremental improvement in processing time
translates to huge benefits in our ability to more effectively serve the
ads needed to meet our contractual commitments. Traditional
databases lack the scalability required to support our goal of five
milliseconds per read/write. Creating user profiles with Hadoop, then
serving them from Couchbase, reduces profile read and write access to
under a millisecond, leaving the bulk of the processing time budget for
improved targeting and customization.
”
Pero Subasic
Chief Architect, AOL
13
14. Ad and offer targeting
40 milliseconds to respond
with the decision.
profiles, real time campaign
3 statistics
2
1 profiles, campaigns
events
14
15. SOCIAL AND ONLINE GAMING
“ Zynga’susers per month.World, Mafiatechnology otherMembase to over 235 million
active
FarmVille, Café
We rely on
Wars and
from
games have
make that possible.
As long-time users and members of the Memcached community, we have
tremendous respect for the team at Membase. Zynga's internal development work to
extend memcached clearly matched with their vision and we’ve worked closely with
the team through the development of Membase Server. We expect to improve the
performance and availability of our games while reducing hardware and
administration costs as we continue to transition data from relational databases to
Membase technology.
”
Cadir Lee
Chief Technology Officer, Zynga
15
17. CLOUD DATA SERVICES
“ As the operator of Korea’s number one search portal, Naver.com;gaming
number one children’s portal, Jr.naver.com; and the number one
the
portal, Hangame.com; NHN collectively serves nearly 70 million unique
users. It is imperative that we provide each of them with the user
experience they expect. With its multi-tenancy capabilities, Couchbase has
enabled us to build a shared, centrally managed data cloud service for our
development studios with service quality guarantees, secure separation of
data and instant provisioning for new properties.
”
Chang Song
Chief Performance Architect, NHN Corporation
17
19. SQL QUERY CACHING
“ The Knot planning solution. Weisselected Couchbase, in part, because it was
wedding
(www.theknot.com) the Internet’s most-trafficked one-stop
drop-in compatible with memcached. With no change to our running
applications, Couchbase provided a highly-available, easy-to-manage
distributed solution for caching SQL queries and accelerating our application
performance. While we are using it primarily for caching today, we have big
plans to implement indexed search and storage solutions.
”
Jason Sirota
Director of Application Architecture, The Knot
19
23. REAL-TIME LOGGING AND ALERTING
“ Loggly has becomeinthe leading Logging as aWe use Couchbaseand Couchbase
is a key ingredient our technology stack.
Service platform
NoSQL
technology to drive real-time collection of logging traffic to facilitate
aggregation and statistical analysis; it stores and tracks the amount of
logging activity by user, by time, and by server. Membase is a great fit for
our team because it is Memcached-compatible, making it easy to setup and
use – it just works!
”
Jon Gifford
Chief Technology Officer, Loggly
23
24. Real-time logging and alerting
Loggly customer
software system
Loggly customer
software system
1
Loggly customer
software system
2
3
24