Developing with Couchbase:
Exploring Common Models and Integrations
Michael Nitschinger
Engineer, Developer Solutions
JVM Integrations
Spring Data Couchbase
• Integration with Spring Data
-

Templates
Repositories
Exception Mapping
also @Cacheable

• Maps P...
Repositories – Do this
Repositories – Get this

6
Repositories – Backed by Views

findByFirstname()

findAll(), count()

7
JavaConfig

8
Putting it together

9
There is more!
• Entity mapping (Alias keys, TTLs, @Version for optimistic
concurrency,...)
• JavaConfig and XML support
•...
ReactiveCouchbase
• ReactiveCouchbase
-

integrates Scala, Play and Akka
Very sophisticated
• i.e. Capped Collections
• N1...
ReactiveCouchbase Core

12
ReactiveCouchbase Play

13
.NET Integrations
couchbase-aspnet
General Infrastructure for ASP.NET Applications
• SessionState Provider
-

Allows for storing session sta...
couchbase-glimpse
Couchbase Insight, In the Browser
• CouchbaseGlimpse package available on NuGet or listed off
of getglim...
couchbase-model-views
• Decorate your entities to generate views for indexing the
JSON behind those classes
Ruby Integrations
ActiveModel
• Allows for idiomatic Model interaction
-

in Ruby and Ruby on Rails

• Simple modeling of entities

• Rich q...
ActiveModel
Full Text Search
Elasticsearch Integration
Elasticsearch + Couchbase Workflow
ES Query (Criteria)
ES Result (IDs)
Couchbase MultiGet
Couchbase Result (Docs)
The Learning Portal
•

Designed and built as a collaboration
between MHE Labs and Couchbase

•

Serves as proof-of-concept...
Dogfooding: CBUGG
• Philosophy:
-

Because all bug systems are bad and I like writing bad code.
Also could be CB UGG
CBFS
Node

CBFS
Node

CBFS
Node
Elastic Search Connector

CBFS

Couchbase
Node

Couchbase
Node

Elastic
Search
Node

Couch...
Job Queue Processing
Job Queue Process
John Connolly from The Ladders: Denormalize the Datas for Great Good
Hadoop
Ad and offer targeting
40 milliseconds to respond
with the decision.

3

profiles, real time campaign
statistics

2

1
eve...
Ad Targeting: Moving Parts

Ad Targeting
Platform

Couchbase Server Cluster

sqoop export

Logs
Logs
Logs
Logs
Logs

flume
...
Content and Recommendation Targeting
3
make
recommendations

Content
Oriented Site

1
events

2
user profiles

Legacy Rela...
Content Driven Site: Moving Parts

In order to keep up with changing needs on
richer, more targeted content that is delive...
Extract, Transform, Load
Talend Connector
Your Turn
Q&A
Thanks!
Couchbase TLV Dev track 05 - exploring common models and integration
Couchbase TLV Dev track 05 - exploring common models and integration
Couchbase TLV Dev track 05 - exploring common models and integration
Upcoming SlideShare
Loading in...5
×

Couchbase TLV Dev track 05 - exploring common models and integration

1,180

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,180
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
33
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Couchbase TLV Dev track 05 - exploring common models and integration

  1. 1. Developing with Couchbase: Exploring Common Models and Integrations Michael Nitschinger Engineer, Developer Solutions
  2. 2. JVM Integrations
  3. 3. Spring Data Couchbase • Integration with Spring Data - Templates Repositories Exception Mapping also @Cacheable • Maps POJO Entities to JSON (and back) • Under development, M2 released (RC1 soon).
  4. 4. Repositories – Do this
  5. 5. Repositories – Get this 6
  6. 6. Repositories – Backed by Views findByFirstname() findAll(), count() 7
  7. 7. JavaConfig 8
  8. 8. Putting it together 9
  9. 9. There is more! • Entity mapping (Alias keys, TTLs, @Version for optimistic concurrency,...) • JavaConfig and XML support • CouchbaseTemplate for lower level access • @View to customize Views and DesignDocuments • @Cacheable suport for transparent caching • Spring Boot and Spring XD integration in the works 10
  10. 10. ReactiveCouchbase • ReactiveCouchbase - integrates Scala, Play and Akka Very sophisticated • i.e. Capped Collections • N1QL Support • Maintained by the community • http://reactivecouchbase.org/
  11. 11. ReactiveCouchbase Core 12
  12. 12. ReactiveCouchbase Play 13
  13. 13. .NET Integrations
  14. 14. couchbase-aspnet General Infrastructure for ASP.NET Applications • SessionState Provider - Allows for storing session state in Couchbase, where it will be fast to access, replicated, persisted Session["Message"] = "Couchbase is awesome!”; • OutputCache Provider - Allows for retrieving some content directly from Couchbase as a cache, rather than executing code each time. [OutputCache(Duration = 60, VaryByParam="foo")] public ActionResult Time(string foo) { return Content(DateTime.Now.ToString()); }
  15. 15. couchbase-glimpse Couchbase Insight, In the Browser • CouchbaseGlimpse package available on NuGet or listed off of getglimpse.com - Allows for insight into what’s happening on the back-end as you interact with your web application
  16. 16. couchbase-model-views • Decorate your entities to generate views for indexing the JSON behind those classes
  17. 17. Ruby Integrations
  18. 18. ActiveModel • Allows for idiomatic Model interaction - in Ruby and Ruby on Rails • Simple modeling of entities • Rich querying • Automatic View Management • https://github.com/couchbase/couchbase-ruby-model
  19. 19. ActiveModel
  20. 20. Full Text Search
  21. 21. Elasticsearch Integration
  22. 22. Elasticsearch + Couchbase Workflow ES Query (Criteria) ES Result (IDs) Couchbase MultiGet Couchbase Result (Docs)
  23. 23. The Learning Portal • Designed and built as a collaboration between MHE Labs and Couchbase • Serves as proof-of-concept and testing harness for Couchbase + Elasticsearch integration • Available for download and further development as open source code https://github.com/couchbaselabs/learningportal
  24. 24. Dogfooding: CBUGG • Philosophy: - Because all bug systems are bad and I like writing bad code. Also could be CB UGG
  25. 25. CBFS Node CBFS Node CBFS Node Elastic Search Connector CBFS Couchbase Node Couchbase Node Elastic Search Node Couchbase Node go-couchbase Elastic Search Node REST requests cbugg cbugg cbugg cbugg ⁃ ⁃ ⁃ You Create bug on github, closed immediately, creates a bug on cbugg. Pull requests send to the project, create cbugg issues tagged as pull request. Bug references can show up as comments on the bugs. Elastic Search Node
  26. 26. Job Queue Processing
  27. 27. Job Queue Process John Connolly from The Ladders: Denormalize the Datas for Great Good
  28. 28. Hadoop
  29. 29. Ad and offer targeting 40 milliseconds to respond with the decision. 3 profiles, real time campaign statistics 2 1 events profiles, campaigns
  30. 30. Ad Targeting: Moving Parts Ad Targeting Platform Couchbase Server Cluster sqoop export Logs Logs Logs Logs Logs flume flow sqoop import Hadoop Cluster
  31. 31. Content and Recommendation Targeting 3 make recommendations Content Oriented Site 1 events 2 user profiles Legacy Relational Database
  32. 32. Content Driven Site: Moving Parts In order to keep up with changing needs on richer, more targeted content that is delivered to larger and larger audiences very quickly, data behind content driven sites is shifting to Couchbase. Content Driven Web Site Legacy RDBMS Couchbase Server Cluster Logs Logs Logs Logs Logs flume flow sqoop import Hadoop excels at complex analytics which may involve multiple steps of processing which incorporate a number of different data sources. sqoop export Hadoop Cluster sqoop import
  33. 33. Extract, Transform, Load
  34. 34. Talend Connector
  35. 35. Your Turn
  36. 36. Q&A
  37. 37. Thanks!
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×