Slide 1

Slide 1 text

Baris Ceviz | Software Developer @Trendyol Twitter – Github – LinkedIn : @PeaceCwz Mail: [email protected] Introduction to NoSQL Solutions with Couchbase and .NET Core

Slide 2

Slide 2 text

AGENDA 01/ 02/ 03/ 04/ What’s Couchbase Clusters and nodes Key-Value Database Couchbase .NET SDK

Slide 3

Slide 3 text

A Cluster Application SDK App Server Application SDK App Server 3 CLUSTER of COUCHBASE NODES

Slide 4

Slide 4 text

A Cluster and Sync Gateway Application SDK App Server Application SDK App Server Application SDK App Server Application SDK App Server Sync Gateway Application SDK App Server Application SDK App Server Sync Gateway 4 CLUSTER of COUCHBASE NODES

Slide 5

Slide 5 text

App Server SDK Application Application SDK App Server Application SDK App Server Sync Gateway Sync Gateway Application SDK App Server Application SDK App Server Application SDK App Server 5 A Cluster and Sync Gateway CLUSTER of COUCHBASE NODES

Slide 6

Slide 6 text

Application SDK App Server Application SDK App Server Application SDK App Server Sync Gateway Sync Gateway Application SDK App Server Application SDK App Server Application SDK App Server 6 A Cluster and Sync Gateway Kubernetes CLUSTER of COUCHBASE NODES

Slide 7

Slide 7 text

Application SDK App Server Application SDK App Server Application SDK App Server Sync Gateway Sync Gateway Application SDK App Server Application SDK App Server Application SDK App Server A Cluster and Sync Gateway CLUSTER of COUCHBASE NODES 7

Slide 8

Slide 8 text

Kubernetes Autonomous Operator A Cluster and Sync Gateway and Kubernetes Autonomous Application SDK App Server Application SDK App Server Application SDK App Server Application SDK App Server Sync Gateway Application SDK App Server Application SDK App Server Sync Gateway 8 CLUSTER of COUCHBASE NODES

Slide 9

Slide 9 text

Nodes COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager

Slide 10

Slide 10 text

Nodes COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE Analytics Query Indexing Full Text Eventing Key Value Cluster Manager

Slide 11

Slide 11 text

Mix & match subsets of services (Multidimensional Scaling) Analytics Query Indexing Full Text Eventing Key Value Cluster Manager Analytics Query Indexing Full Text Eventing Key Value Cluster Manager Analytics Query Indexing Full Text Eventing Key Value Cluster Manager Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE COUCHBASE SERVER NODE COUCHBASE SERVER NODE COUCHBASE SERVER NODE

Slide 12

Slide 12 text

Mix & match subsets of services (Multidimensional Scaling) Analytics Query Indexing Full Text Eventing Key Value Cluster Manager Analytics Query Indexing Full Text Eventing Key Value Cluster Manager Analytics Query Indexing Full Text Eventing Key Value Cluster Manager Analytics Query Indexing Full Text Eventing Key Value Cluster Manager COUCHBASE SERVER NODE COUCHBASE SERVER NODE COUCHBASE SERVER NODE COUCHBASE SERVER NODE

Slide 13

Slide 13 text

Cluster Manager Cluster Manager Cluster Manager Cluster Manager Cluster Manager Cluster Manager Cluster Manager Cluster Manager Analytics Search Key Value Query Indexing Key Value Key Value Mix & match subsets of services (Multidimensional Scaling) Analytics

Slide 14

Slide 14 text

The Cluster Manager The control plane of the cluster: • Admin APIs & User Interface • Authentication / RBAC • Master Services • Rebalance and Auto-Failover • Automatic shard placement • Bucket Services • Per-node Services • Generic facilities per-node-&-bucket services Generic distributed facilities Generic local facilities Logging and other services Distributed node discovery Master Services • Cluster-wide operations • Rebalance • Auto-failover • Automatic shard placement Global config (gossip replication) Local config Store Per-node Services • Heartbeats • Babysitter Cluster Manager Bucket services • Replica stream management • Stats collection & monitoring 14 Admin Console & REST API Authentication

Slide 15

Slide 15 text

Automatic Sharding 26

Slide 16

Slide 16 text

KEY VALUE DATA SERVICE App Server SDK Application HASH("user_profile-1234") ==> 27 VB Node 0 A 1 B 2 C … 27 C 1023 D { … } Automatic Sharding and Rebalancing NODE A NODE B NODE C NODE D CLUSTER MANAGER 16 user_profile-1234

Slide 17

Slide 17 text

App Server SDK Application VB Node 0 A 1 B 2 C … 27 C 1023 D Automatic Sharding and Rebalancing CLUSTER MANAGER KEY VALUE DATA SERVICE NODE A NODE B NODE C NODE D CLUSTER MANAGER 17 user_profile-1234 { … }

Slide 18

Slide 18 text

App Server SDK Application VB Node 0 A 1 B 2 C … 27 C 1023 D Automatic Sharding and Rebalancing KEY VALUE DATA SERVICE NODE A NODE B NODE C NODE D NODE E CLUSTER MANAGER 18 user_profile-1234 { … }

Slide 19

Slide 19 text

C L DATA SERVICE App Server SDK Application VB Nod e 0 A 1 B 2 C … 27 C 1023 D { … } NODE A NODE B NODE C NODE D VB Nod e 0 A 1 B 2 C … 27 E 1023 D NODE E Automatic Sharding and Rebalancing CLUSTER MANAGER KEY VALUE DATA SERVICE HASH(“user_profile-1234”) ==> 27 user_profile-1234 19

Slide 20

Slide 20 text

Efficient Data Propagation

Slide 21

Slide 21 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable 21 The Database Change Protocol

Slide 22

Slide 22 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable Ke 22 y Value D ata Service The Database Change Protocol

Slide 23

Slide 23 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable Ke y Value Data Service The Database Change Protocol DCP 23

Slide 24

Slide 24 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable Ke y Value Data Service The Database Change Protocol DCP 24

Slide 25

Slide 25 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable Ke y Value D ata Service The Database Change Protocol DCP DCP 25

Slide 26

Slide 26 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable The Database Change Protocol DCP Key Value Data Service DCP 26

Slide 27

Slide 27 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable Ke y Value D ata Service The Database Change Protocol OTHER FEATURES & SERVICES • XDCR & Backup • Sync Gateway DCP DCP 27

Slide 28

Slide 28 text

• High Performance / In-Memory • De-Duplication • Ordered, predictable and consistent • Restartable Key Value Data Service DCP The Database Change Protocol INTEGRATIONS • hadoop, kafka & more OTHER FEATURES & SERVICES • XDCR & Backup • Sync Gateway DCP 28

Slide 29

Slide 29 text

Key Value … Networking I/O & handler threads VBucket Manager Item Pager Expiry Pager Checkpoint Manager Cache . . Partition Hash Tables Fetcher Scheduler Reader IO Writer IO Generic Tasks Flusher The Key Value Data Service Authentication 29 Analytics Query Indexing Full Text Eventing Key Value Cluster Manager

Slide 30

Slide 30 text

Key Value … Networking I/O & handler threads VBucket Manager Item Pager Expiry Pager Checkpoint Manager Cache . . H Partition ash Tables Fetcher Scheduler Reader IO Writer IO Generic Tasks Flusher The Key Value Data Service The KV "Data Plane" of a Couchbase cluster: ● High performance memcached DNA ● With data partitioning ("vbuckets") ● Sub-Document operations ● Authentication / RBAC And also... ● Asynch task workers and scheduler ● For I/O: persistence, backfill ● For expiry & cleanup ● For replication ● The source of Database Change Protocol ● A consumer of Database Change Protocol 30 Authentication

Slide 31

Slide 31 text

Multiple Clusters in Different Regions

Slide 32

Slide 32 text

zooming out 32 ASIA CLUSTER US WEST CLUSTER US EAST CLUSTER

Slide 33

Slide 33 text

zooming out 33 ASIA CLUSTER US WEST CLUSTER US EAST CLUSTER XDCR XDCR XDCR

Slide 34

Slide 34 text

Couchbase SDK with .NET Core

Slide 35

Slide 35 text

e 2017. All rights reserved. May the sorce be with you