couchbase tlv dev track 05 - exploring common models and integration
TRANSCRIPT
![Page 1: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/1.jpg)
![Page 2: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/2.jpg)
Developing with Couchbase: Exploring Common Models and Integrations
Michael Nitschinger
Engineer, Developer Solutions
![Page 3: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/3.jpg)
JVM Integrations
![Page 4: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/4.jpg)
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).
![Page 5: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/5.jpg)
Repositories – Do this
![Page 6: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/6.jpg)
Repositories – Get this
6
![Page 7: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/7.jpg)
Repositories – Backed by Views
findByFirstname()
findAll(), count()
7
![Page 8: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/8.jpg)
JavaConfig
8
![Page 9: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/9.jpg)
Putting it together
9
![Page 10: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/10.jpg)
There is more!
• Entity mapping (Alias keys, TTLs, @Version for optimisticconcurrency,...)
• 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
![Page 11: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/11.jpg)
ReactiveCouchbase
• ReactiveCouchbase
integrates Scala, Play and Akka
Very sophisticated
• i.e. Capped Collections
• N1QL Support
• Maintained by the community
• http://reactivecouchbase.org/
![Page 12: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/12.jpg)
ReactiveCouchbase Core
12
![Page 13: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/13.jpg)
ReactiveCouchbase Play
13
![Page 14: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/14.jpg)
.NET Integrations
![Page 15: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/15.jpg)
couchbase-aspnet
• 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());
}
General Infrastructure for ASP.NET Applications
![Page 16: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/16.jpg)
couchbase-glimpse
• 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
Couchbase Insight, In the Browser
![Page 17: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/17.jpg)
![Page 18: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/18.jpg)
couchbase-model-views
• Decorate your entities to generate views for indexing the JSON behind those classes
![Page 19: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/19.jpg)
Ruby Integrations
![Page 20: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/20.jpg)
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
![Page 21: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/21.jpg)
ActiveModel
![Page 22: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/22.jpg)
Full Text Search
![Page 23: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/23.jpg)
Elasticsearch Integration
![Page 24: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/24.jpg)
Elasticsearch + Couchbase Workflow
ES Query (Criteria)
ES Result (IDs)
Couchbase MultiGet
Couchbase Result (Docs)
![Page 25: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/25.jpg)
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
![Page 26: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/26.jpg)
Dogfooding: CBUGG
• Philosophy:
Because all bug systems are bad and I like writing bad code.
Also could be CB UGG
![Page 27: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/27.jpg)
Couchbase Node
cbuggcbugg
cbuggcbugg
Couchbase Node
Couchbase Node
You
Elastic Search Node
Elastic Search Node
Elastic Search Node
go-couchbase REST requests
⁃ 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 Connector
CBFS
CBFSNode
CBFSNode
CBFSNode
![Page 28: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/28.jpg)
Job Queue Processing
![Page 29: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/29.jpg)
John Connolly from The Ladders: Denormalize the Datas for Great Good
Job Queue Process
![Page 30: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/30.jpg)
Hadoop
![Page 31: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/31.jpg)
Ad and offer targeting
events
profiles, campaigns
profiles, real time campaign statistics
40 milliseconds to respond with the decision.
2
3
1
![Page 32: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/32.jpg)
Ad Targeting: Moving Parts
Logs
Couchbase Server Cluster
Hadoop Cluster
sqoop import
LogsLogs
LogsLogs
Ad Targeting
Platform
sqoop export
flumeflow
![Page 33: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/33.jpg)
Content and Recommendation Targeting
events
user profiles
make recommendations
2
3
1
ContentOriented Site
Legacy RelationalDatabase
![Page 34: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/34.jpg)
Content Driven Site: Moving Parts
Logs
Couchbase Server Cluster
Hadoop Cluster
sqoop import
LogsLogs
LogsLogs
Content Driven
Web Site
sqoop export
Legacy RDBMS
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.
Hadoop excels at complex analytics which
may involve multiple steps of processing
which incorporate a number of different data
sources.
sqoop import
flumeflow
![Page 35: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/35.jpg)
Extract, Transform, Load
![Page 36: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/36.jpg)
Talend Connector
![Page 37: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/37.jpg)
Your Turn
![Page 38: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/38.jpg)
Q&A
![Page 39: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/39.jpg)
Thanks!
![Page 40: Couchbase TLV Dev track 05 - exploring common models and integration](https://reader034.vdocuments.net/reader034/viewer/2022052623/559b3a471a28abf23e8b47a2/html5/thumbnails/40.jpg)