Introduction to ArtificiaI Intelligence in Higher Education
Couchbase training advanced
1. Deep Dive intoDeep Dive into
Shivansh Srivastava
Software Consultant
Knoldus Software LLP
Shivansh Srivastava
Software Consultant
Knoldus Software LLP
2. AgendaAgenda
● Using Views And Indexes.
● Couchbase 4.0 Beta
● Main Features Of Couchbase 4.0
● Demo
● Using Views And Indexes.
● Couchbase 4.0 Beta
● Main Features Of Couchbase 4.0
● Demo
14. Main Features Of Couchbase 4.0 BetaMain Features Of Couchbase 4.0 Beta
● Multi Dimensional Scaling
● Global Secondary Indexing
● N1Ql (Nickel Query)
16. Multi Dimensional ScalingMulti Dimensional Scaling
Question: Few million people are looking for a setup to
efficiently live and interact. What is the most
efficient way to build this infra?
A) Build one giant high-rise?
B) Build some mid-rises?
C) Build many single-family homes
17. Scaling UpScaling Up
Build one big high-rise
Vertical Scaling
➔ Cluster processors – hyper-threading to cores
➔ Locally partition workload among processors
➔ Communicate over memory
Great for fast processing but limited in scalability and elasticity
18. Scaling OutScaling Out
Build a large community of single-family houses
Horizontal Scaling
➔ Cluster commodity HW
➔ Partition workload among nodes
➔ Communicate over network
Great for scaling and elasticity but slower communication
19.
20. Multi Dimensional ScalingMulti Dimensional Scaling
The Solution to this problem is Multi Dimensional Scaling(MDS).
What is Multi-Dimensional Scaling?
MDS is the architecture that enables independent scaling of
data, query and indexing workloads.
21. Multi Dimensional ScalingMulti Dimensional Scaling
➔ Independent “zones” for Query, Index and Data Services
➔ Independent Scalability for Best Computational Capacity per
Service
Heavier indexing (index more fields) : scale up index service nodes
More RAM for query processing: scale up query service nodes
23. Global Secondary IndexingGlobal Secondary Indexing
What are Global Secondary Indexes?
High performance indexes for low latency queries with
powerful caching, storage and independent placement.
Power of GSI:
➔ Fully integrated into N1QL Query Optimization and Execution
➔ Independent Index Distribution for Limiting scatter-gather
➔ Independent Scalability with Index Service
27. Steps For Running N1QLSteps For Running N1QL
Step 1: Start the Cbq engine for datastore and query.
For example: Ubuntu users can start it by executing
these two commands on the terminal
cd /opt/couchbase/bin
./cbq-engine -datastore http://Administrator:123456@127.0.0.3:8091
28. Steps For Running N1QLSteps For Running N1QL
Step 2: In other Terminal
Start the Cbq engine for starting interactive query shell.
For example: Ubuntu users can start it by executing
these two commands on the terminal
Cd /opt/couchbase/bin
./cbq -engine=http://localhost:8093
29. Enabling Query Parameter.Enabling Query Parameter.
To start querying the couchbase from your code you must
first the the Query by setting it to 'true'
For Example:
For Java or Scala Users:
System.setProperty("com.couchbase.queryEnabled", "true")
Add this line where you are creating your cluster.
30.
31. Querying Couchbase Using NickelQuerying Couchbase Using Nickel
Here is a sample of executing a Nickel query in couchase.
many web application want to increase application throughput, responsivenesswhere one task can make progress without waiting for all others to completewhere more than one task can make progress at same time.Concurrent program can be executed on single core machine via time slicYou may execute concurrent program in parallelOverall you play with threads