SlideShare a Scribd company logo
1©2015 Tail-f Systems all rights reservedFebruary 13, 2015
CDB Technical Introduction
2©2015 Tail-f Systems all rights reservedFebruary 13, 2015
CDB – ConfD Database
NETCONF SNMP REST CLI Web
CDB
Database
Data Provider API
CDB API
Management Agent API
App AppApp
ConfD Core Engine
App
External
DatabaseOperational
Data
App
• Hierarchical database
• ACID test compliant
• Atomicity, consistency, isolation, durability
• Fast, lightweight, fault-tolerant
• Compact binary XML format
• Memory resident with journal in persistent storage
• Schema automatically derived from YANG
• Supports 1:N data replication
• Supports automatic schema version
up/downgrades
• CDB can hold some or all data
• Configuration data and/or Operational data
• External database can be used in addition to or instead of
• Automatic loading of initial data
• Applications read data, then subscribe to relevant
configuration changes
• Subscription notifications with priority level
ordering
• Multiple datastores per NETCONF standards
• Startup, running, candidate, operational
3©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Hierarchical
• CDB uses an Hierarchical (XML) data model
• Ideal for configuration data, which is tree structured
• No Object-Relational-Mapping (ORM) required
/ dhcp/
aaa/
voip/
defaultLe…
maxLeas…
SubNets/ subNet/
mask
range
lowAddr
highAddr
logFacility
net
4©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Object Relational Mapping (ORM)
Hierarchical Relational
/ dhcp/
aaa/
voip/
defaultLe…
maxLeas…
SubNets/ subNet/
mask
range
lowAddr
highAddr
logFacility
net
5©2015 Tail-f Systems all rights reservedFebruary 13, 2015
ACID
The four properties that define a transaction:
• Atomicity
• Transactions are indivisible, all-or-nothing
• Consistency
• Transactions are all-at-once
• {create A, create B} and {create B, create A} are identical
• Independence
• Transactions do not interfere with each other
• Durability
• Committed data remains in the system even in case of a restart, etc
6©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Database Storage
MO = Managed Object
(i.e. configuration consumer)
JOURNAL
START TRANSACTION
WRITE 14 TO
/some/leaf/somewhere
WRITE “hello” TO
/some/other/leaf
COMMIT
START TRANSACTION
WRITE -1 TO /foo/bar
ABORTED
START TR
ON DISK
Values stored
binary
Paths stored as
sequences of
32-bit hashes
ConfD
CDB
IN MEMORY
MO
MO
MO
7©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Data Model Becomes Database Schema
Network
Element
NETCONF SNMP REST CLI Web
CDB
Database
Data Provider API
CDB API
Management Agent API
OSS/BSS
App AppApp
ConfD Core Engine
App
External
DatabaseOperational
Data
App
Management Agent API
Auto-rendered management interfaces and data schema
YANG
Data Models
8©2015 Tail-f Systems all rights reservedFebruary 13, 2015
JOURNAL
ConfD
CDB
IN MEMORY
MO
MO
MO
Database Replication
ACTIVE NODE
Journal
records
JOURNAL
ConfD
CDB
IN MEMORY
MO
MO
MO
STANDBY NODE
9©2015 Tail-f Systems all rights reservedFebruary 13, 2015
CDB Start
• CDB in-memory contents blank at this point
• Read up schema from disk
• Start transaction
• Read up data from disk
• Data on disk consistent with schema?
• If not: Trigger automatic schema upgrade (see next page)
• CDB doesn’t differentiate between up- or downgrade,
it just notices that the schema is different
• CDB does not rely on version in the namespace declaration
• Validate
• Commit
10©2015 Tail-f Systems all rights reservedFebruary 13, 2015
CDB Automatic Schema Upgrade
• Elements with default value added to schema
• Default values added to new database
• Elements removed from schema
• Values removed from new database
• Elements with trivial type changes
• Value promoted to new type in new database
• Data is converted to string representation, then to new type
• Elements with complex type changes
• No value in new database
• All other elements
• Copied as is to new database
Check the devel.log for messages about what conversions were made
11©2015 Tail-f Systems all rights reservedFebruary 13, 2015
CDB Programmatic Schema Upgrade
Then add your own upgrade clients
• Complement to the automatic schema upgrade
• Connect in start phase 0
• Compute values for the new database
• Read any old or new database values
• Compute new values
• Write (overwrite) new values
• If the schema is changed cautiously,
CDB automatic schema upgrade might be able to handle everything
12©2015 Tail-f Systems all rights reservedFebruary 13, 2015
CDB Schema Upgrade Examples
• 32-bit flag field becomes 64-bits
• New flags should be initialized to all zeros
• Automatic upgrade sufficient
• New Maximum Transfer Unit (MTU) field added
• Should be 1500 for Eth interfaces, 48 for ATM interfaces
• Upgrade client reads InterfaceType value, classifies it and writes the appropriate MTU value
• InterfaceType changed from string to enumeration
• All strings that match enumeration value are auto upgraded
• Remaining values left unset: set by upgrade client
• Time field changed from seconds to nanoseconds
• Upgrade client reads the old value, multiplies by 109 and overwrites the automatically
promoted value
13©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Data Stores
• Each data store is a full copy of the configuration
• Each data store can be mapped to CDB or external data base
• Running can be split across CDB and several data bases
• 5 combinations (S+Rro, S+R, R, R+C, Rro+C)
• Operational data store
• Store status, performance or application data
CandidateStart-up Running
Operational
14©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Data Stores
• Start-up
• If enabled, start-up configuration is copied to (overwriting) the running configuration at system
start
• If not enabled, configuration in running remains unchanged from last time system was running
• The first time the system starts, configuration is read from factory default files ( *_init.xml )
• Running
• Holds the currently running configuration
• Candidate
• Data store for future configuration under construction
• Copied to running to make it take effect
15©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Sessions
• Session Start (login)
• Display values
• Update values
• Request Commit
• Lock data store (running, candidate, start-up)
• Run validation sequence
• Run Transaction (next slide)
• Wait for acknowledgement from standby node(s)
• Inform subscribers of changes
• Unlock data store
• Session Continues
16©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Transactions
17©2015 Tail-f Systems all rights reservedFebruary 13, 2015
The Life of a Managed Object
• Subscribe to relevant configuration changes
• Read out configuration at startup
• Enter event loop
• If subscription event, react to configuration change
RESTCLINETCONF SNMP
Management Agent API
Managed Object API
MO MO
CDB
ConfD Core Engine
CDB API
Data Provider API
Web
18©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Read out Configuration at Startup
• Initialization
• cdb_connect()
• cdb_start_session()
• cdb_set_namespace()
• Read elements
• cdb_get_u_int32()
• cdb_get_bool()
• cdb_get_str()
• cdb_get_ipv4()
• cdb_get_enum_hash()
• … (~30 more)
• Read many
• cdb_get_object()
• cdb_get_values()
• Count elements
• cdb_exists()
• cdb_num_instances()
• Move in data tree
• cdb_cd()
• cdb_pushd()
• Finalization
• cdb_end_session()
• cdb_close()
19©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Read out Configuration at Startup
Sessions
• CDB protected with Single Writer-
Multiple Reader lock
• No configuration changes can occur
between cdb_start_session() and
cdb_end_session()
• Don’t keep the session open
unnecessarily, delays configuration
changes
• Timeout after some minutes
Namespaces
• Each data model is defined in an
XML Namespace
• ConfD handles multiple data
models/namespaces
• Each subsystem should be separate
namespace
• Generate header file with
namespace hash constant
sock = socket(PF_INET, SOCK_STREAM, 0);
cdb_connect(sock, CDB_READ_SOCKET, &confd_ip_port, size);
cdb_start_session(sock, CDB_RUNNING);
cdb_set_namespace(sock, dhcpd__ns);
20©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Read out Configuration at Startup
Keypaths
• Each element in CDB is addressed by its path
cdb_get_duration(sock, &dur, “/dhcp/defaultLeaseTime”)
• Paths may include keys
cdb_get_ipv4(sock,&ip,”/dhcp/SubNets/subNet{10.0.0.0 255.0.0.0}/lowAddr”)
cdb_get_ipv4(sock, &ip, ”/dhcp/SubNets/subNet{%s %s}/lowAddr”, net, mask)
cdb_get_ipv4(sock, &ip, ”/dhcp/SubNets/subNet{%x %x}/lowAddr”, net, mask)
• Index may be used in place of keys
n = cdb_num_instances(sock, "/dhcp/SubNets/subNet");
for (i=0; i<n; i++) {
cdb_cd(sock, "/dhcp/SubNets/subNet[%d]", i);
do_subnet(…);
}
21©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Triggers when
anything in
scope changes
Subscribe to Configuration Changes
subsock = socket(PF_INET, SOCK_STREAM, 0);
cdb_connect(subsock, CDB_SUBSCRIPTION_SOCKET, &confd, size);
cdb_subscribe(subsock, 3, dhcpd__ns, &spoint, "/dhcp");
cdb_subscribe_done(subsock);
/ dhcp/
aaa/
voip/
defaultLe…
maxLeas…
SubNets/ subNet/
mask
range
lowAddr
highAddr
logFacility
net
Managed Objects typically have
several subscription points
22©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Enter Event Loop
• Event loop needs to monitor subscription socket
• Typically using poll()/select()
while(1) {
set[0].fd = subsock;
set[0].events = POLLIN;
set[0].revents = 0;
poll(set, 1, -1); // Monitor one socket, wait forever
if (set[0].revents & POLLIN) {
cdb_read_subscription_socket(subsock, sub_points, &reslen);
// React on changes here…
// sub_points[] contains triggering subscription points,
// reslen how many
}
cdb_sync_subscription_socket(subsock, CDB_DONE_PRIORITY);
}
• How to handle CDB subscription notifications will be covered in the training module
“CDB Subscribers”
23©2015 Tail-f Systems all rights reservedFebruary 13, 2015
Ad

More Related Content

What's hot (20)

Session 14 - Hive
Session 14 - HiveSession 14 - Hive
Session 14 - Hive
AnandMHadoop
 
How to Design a Modern Data Warehouse in BigQuery
How to Design a Modern Data Warehouse in BigQueryHow to Design a Modern Data Warehouse in BigQuery
How to Design a Modern Data Warehouse in BigQuery
Dan Sullivan, Ph.D.
 
GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017
Bobby Curtis
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
PHP ve NATS ile
 Mikroservis Mesajlaşma Sistemi
PHP ve NATS ile
 Mikroservis Mesajlaşma SistemiPHP ve NATS ile
 Mikroservis Mesajlaşma Sistemi
PHP ve NATS ile
 Mikroservis Mesajlaşma Sistemi
Erhan Yakut
 
Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and Netty
Constantine Slisenka
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance Optimisation
Mydbops
 
Comparison of ACFS and DBFS
Comparison of ACFS and DBFSComparison of ACFS and DBFS
Comparison of ACFS and DBFS
DanielHillinger
 
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse ArchitectureServerless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Kai Wähner
 
Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...
Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...
Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...
Cloudera, Inc.
 
Cosco: An Efficient Facebook-Scale Shuffle Service
Cosco: An Efficient Facebook-Scale Shuffle ServiceCosco: An Efficient Facebook-Scale Shuffle Service
Cosco: An Efficient Facebook-Scale Shuffle Service
Databricks
 
Scaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at LyftScaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at Lyft
Databricks
 
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with  Apache Pulsar and Apache PinotBuilding a Real-Time Analytics Application with  Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Altinity Ltd
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce Fundamentals
Lynn Langit
 
Demystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostDemystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the Host
Cumulus Networks
 
Graph Structure in the Web - Revisited. WWW2014 Web Science Track
Graph Structure in the Web - Revisited. WWW2014 Web Science TrackGraph Structure in the Web - Revisited. WWW2014 Web Science Track
Graph Structure in the Web - Revisited. WWW2014 Web Science Track
Chris Bizer
 
SQOOP PPT
SQOOP PPTSQOOP PPT
SQOOP PPT
Dushhyant Kumar
 
HDFS Namenode High Availability
HDFS Namenode High AvailabilityHDFS Namenode High Availability
HDFS Namenode High Availability
Hortonworks
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
datamantra
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
ScyllaDB
 
How to Design a Modern Data Warehouse in BigQuery
How to Design a Modern Data Warehouse in BigQueryHow to Design a Modern Data Warehouse in BigQuery
How to Design a Modern Data Warehouse in BigQuery
Dan Sullivan, Ph.D.
 
GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017GoldenGate CDR from UKOUG 2017
GoldenGate CDR from UKOUG 2017
Bobby Curtis
 
MariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & OptimizationMariaDB Server Performance Tuning & Optimization
MariaDB Server Performance Tuning & Optimization
MariaDB plc
 
PHP ve NATS ile
 Mikroservis Mesajlaşma Sistemi
PHP ve NATS ile
 Mikroservis Mesajlaşma SistemiPHP ve NATS ile
 Mikroservis Mesajlaşma Sistemi
PHP ve NATS ile
 Mikroservis Mesajlaşma Sistemi
Erhan Yakut
 
Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and Netty
Constantine Slisenka
 
InnoDB Performance Optimisation
InnoDB Performance OptimisationInnoDB Performance Optimisation
InnoDB Performance Optimisation
Mydbops
 
Comparison of ACFS and DBFS
Comparison of ACFS and DBFSComparison of ACFS and DBFS
Comparison of ACFS and DBFS
DanielHillinger
 
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse ArchitectureServerless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
Kai Wähner
 
Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...
Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...
Hadoop World 2011: Replacing RDB/DW with Hadoop and Hive for Telco Big Data -...
Cloudera, Inc.
 
Cosco: An Efficient Facebook-Scale Shuffle Service
Cosco: An Efficient Facebook-Scale Shuffle ServiceCosco: An Efficient Facebook-Scale Shuffle Service
Cosco: An Efficient Facebook-Scale Shuffle Service
Databricks
 
Scaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at LyftScaling Apache Spark on Kubernetes at Lyft
Scaling Apache Spark on Kubernetes at Lyft
Databricks
 
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with  Apache Pulsar and Apache PinotBuilding a Real-Time Analytics Application with  Apache Pulsar and Apache Pinot
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
Altinity Ltd
 
Hadoop MapReduce Fundamentals
Hadoop MapReduce FundamentalsHadoop MapReduce Fundamentals
Hadoop MapReduce Fundamentals
Lynn Langit
 
Demystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the HostDemystifying Networking Webinar Series- Routing on the Host
Demystifying Networking Webinar Series- Routing on the Host
Cumulus Networks
 
Graph Structure in the Web - Revisited. WWW2014 Web Science Track
Graph Structure in the Web - Revisited. WWW2014 Web Science TrackGraph Structure in the Web - Revisited. WWW2014 Web Science Track
Graph Structure in the Web - Revisited. WWW2014 Web Science Track
Chris Bizer
 
HDFS Namenode High Availability
HDFS Namenode High AvailabilityHDFS Namenode High Availability
HDFS Namenode High Availability
Hortonworks
 
Introduction to Apache Spark
Introduction to Apache SparkIntroduction to Apache Spark
Introduction to Apache Spark
datamantra
 
Apache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the CoversApache Iceberg: An Architectural Look Under the Covers
Apache Iceberg: An Architectural Look Under the Covers
ScyllaDB
 

Viewers also liked (14)

Module 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceModule 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound Interface
Tail-f Systems
 
Tail f - Why ConfD
Tail f - Why ConfDTail f - Why ConfD
Tail f - Why ConfD
Tail-f Systems
 
Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View
Tail-f Systems
 
Module 8: C Data Types
Module 8: C Data TypesModule 8: C Data Types
Module 8: C Data Types
Tail-f Systems
 
Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16
Kentaro Ebisawa
 
Module 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG ConceptsModule 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG Concepts
Tail-f Systems
 
Module 11: Operational Data Providers
Module 11: Operational Data ProvidersModule 11: Operational Data Providers
Module 11: Operational Data Providers
Tail-f Systems
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial
Tail-f Systems
 
Tail-f - Why NETCONF
Tail-f - Why NETCONFTail-f - Why NETCONF
Tail-f - Why NETCONF
Tail-f Systems
 
Module 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGModule 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANG
Tail-f Systems
 
Dynamic Service Chaining
Dynamic Service Chaining Dynamic Service Chaining
Dynamic Service Chaining
Tail-f Systems
 
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANGTail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Systems
 
NETCONF YANG tutorial
NETCONF YANG tutorialNETCONF YANG tutorial
NETCONF YANG tutorial
Tail-f Systems
 
Module 7: Installation and Getting Started
Module 7: Installation and Getting StartedModule 7: Installation and Getting Started
Module 7: Installation and Getting Started
Tail-f Systems
 
Module 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound InterfaceModule 12: NETCONF Northbound Interface
Module 12: NETCONF Northbound Interface
Tail-f Systems
 
Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View Webinar: Applying REST to Network Management – An Implementor’s View
Webinar: Applying REST to Network Management – An Implementor’s View
Tail-f Systems
 
Module 8: C Data Types
Module 8: C Data TypesModule 8: C Data Types
Module 8: C Data Types
Tail-f Systems
 
Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16Open Network OS Overview as of 2015/10/16
Open Network OS Overview as of 2015/10/16
Kentaro Ebisawa
 
Module 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG ConceptsModule 3: NETCONF and YANG Concepts
Module 3: NETCONF and YANG Concepts
Tail-f Systems
 
Module 11: Operational Data Providers
Module 11: Operational Data ProvidersModule 11: Operational Data Providers
Module 11: Operational Data Providers
Tail-f Systems
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial
Tail-f Systems
 
Module 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANGModule 2: Why NETCONF and YANG
Module 2: Why NETCONF and YANG
Tail-f Systems
 
Dynamic Service Chaining
Dynamic Service Chaining Dynamic Service Chaining
Dynamic Service Chaining
Tail-f Systems
 
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANGTail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Webinar OpenFlow Switch Management Using NETCONF and YANG
Tail-f Systems
 
Module 7: Installation and Getting Started
Module 7: Installation and Getting StartedModule 7: Installation and Getting Started
Module 7: Installation and Getting Started
Tail-f Systems
 
Ad

Similar to Module 9: CDB Technical Intro (20)

Application High Availability and Upgrades Using Oracle GoldenGate
Application High Availability and Upgrades Using Oracle GoldenGateApplication High Availability and Upgrades Using Oracle GoldenGate
Application High Availability and Upgrades Using Oracle GoldenGate
Shane Borden
 
Gloc gangler 2018._v4
Gloc gangler 2018._v4Gloc gangler 2018._v4
Gloc gangler 2018._v4
Secure-24
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
Insight Technology, Inc.
 
PGEncryption_Tutorial
PGEncryption_TutorialPGEncryption_Tutorial
PGEncryption_Tutorial
Vibhor Kumar
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
The Central View of your Data with Postgres
The Central View of your Data with PostgresThe Central View of your Data with Postgres
The Central View of your Data with Postgres
EDB
 
Connect Data Strategy Deep Dive - MAZ Workshop (1).pptx
Connect Data Strategy Deep Dive - MAZ Workshop (1).pptxConnect Data Strategy Deep Dive - MAZ Workshop (1).pptx
Connect Data Strategy Deep Dive - MAZ Workshop (1).pptx
joel804321
 
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
In-Memory Computing Summit
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
EDB
 
The Good, The Bad and the Ugly
The Good, The Bad and the UglyThe Good, The Bad and the Ugly
The Good, The Bad and the Ugly
Roy Salazar
 
Data Virtualization and ETL
Data Virtualization and ETLData Virtualization and ETL
Data Virtualization and ETL
Lily Luo
 
IBMHadoopofferingTechline-Systems2015
IBMHadoopofferingTechline-Systems2015IBMHadoopofferingTechline-Systems2015
IBMHadoopofferingTechline-Systems2015
Daniela Zuppini
 
Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL Cluster
Abel Flórez
 
Big data should be simple
Big data should be simpleBig data should be simple
Big data should be simple
Dori Waldman
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
EDB
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12c
Maris Elsins
 
IBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discoveryIBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discovery
Martin Thompson
 
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
DataWorks Summit
 
Greenplum Architecture
Greenplum ArchitectureGreenplum Architecture
Greenplum Architecture
Alexey Grishchenko
 
5 Postgres DBA Tips
5 Postgres DBA Tips5 Postgres DBA Tips
5 Postgres DBA Tips
EDB
 
Application High Availability and Upgrades Using Oracle GoldenGate
Application High Availability and Upgrades Using Oracle GoldenGateApplication High Availability and Upgrades Using Oracle GoldenGate
Application High Availability and Upgrades Using Oracle GoldenGate
Shane Borden
 
Gloc gangler 2018._v4
Gloc gangler 2018._v4Gloc gangler 2018._v4
Gloc gangler 2018._v4
Secure-24
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
Insight Technology, Inc.
 
PGEncryption_Tutorial
PGEncryption_TutorialPGEncryption_Tutorial
PGEncryption_Tutorial
Vibhor Kumar
 
9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf9.6_Course Material-Postgresql_002.pdf
9.6_Course Material-Postgresql_002.pdf
sreedb2
 
The Central View of your Data with Postgres
The Central View of your Data with PostgresThe Central View of your Data with Postgres
The Central View of your Data with Postgres
EDB
 
Connect Data Strategy Deep Dive - MAZ Workshop (1).pptx
Connect Data Strategy Deep Dive - MAZ Workshop (1).pptxConnect Data Strategy Deep Dive - MAZ Workshop (1).pptx
Connect Data Strategy Deep Dive - MAZ Workshop (1).pptx
joel804321
 
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
IMCSummit 2015 - Day 1 Developer Track - In-memory Computing for Iterative CP...
In-Memory Computing Summit
 
New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13New enhancements for security and usability in EDB 13
New enhancements for security and usability in EDB 13
EDB
 
The Good, The Bad and the Ugly
The Good, The Bad and the UglyThe Good, The Bad and the Ugly
The Good, The Bad and the Ugly
Roy Salazar
 
Data Virtualization and ETL
Data Virtualization and ETLData Virtualization and ETL
Data Virtualization and ETL
Lily Luo
 
IBMHadoopofferingTechline-Systems2015
IBMHadoopofferingTechline-Systems2015IBMHadoopofferingTechline-Systems2015
IBMHadoopofferingTechline-Systems2015
Daniela Zuppini
 
Introduction to MySQL Cluster
Introduction to MySQL ClusterIntroduction to MySQL Cluster
Introduction to MySQL Cluster
Abel Flórez
 
Big data should be simple
Big data should be simpleBig data should be simple
Big data should be simple
Dori Waldman
 
Postgres Point-in-Time Recovery
Postgres Point-in-Time RecoveryPostgres Point-in-Time Recovery
Postgres Point-in-Time Recovery
EDB
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12c
Maris Elsins
 
IBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discoveryIBM Licensing: Technical fundamentals for discovery
IBM Licensing: Technical fundamentals for discovery
Martin Thompson
 
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
KPN ETL Factory (KETL) - Automated Code generation using Metadata to build Da...
DataWorks Summit
 
5 Postgres DBA Tips
5 Postgres DBA Tips5 Postgres DBA Tips
5 Postgres DBA Tips
EDB
 
Ad

Recently uploaded (20)

Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Build Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For DevsBuild Your Own Copilot & Agents For Devs
Build Your Own Copilot & Agents For Devs
Brian McKeiver
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 

Module 9: CDB Technical Intro

  • 1. 1©2015 Tail-f Systems all rights reservedFebruary 13, 2015 CDB Technical Introduction
  • 2. 2©2015 Tail-f Systems all rights reservedFebruary 13, 2015 CDB – ConfD Database NETCONF SNMP REST CLI Web CDB Database Data Provider API CDB API Management Agent API App AppApp ConfD Core Engine App External DatabaseOperational Data App • Hierarchical database • ACID test compliant • Atomicity, consistency, isolation, durability • Fast, lightweight, fault-tolerant • Compact binary XML format • Memory resident with journal in persistent storage • Schema automatically derived from YANG • Supports 1:N data replication • Supports automatic schema version up/downgrades • CDB can hold some or all data • Configuration data and/or Operational data • External database can be used in addition to or instead of • Automatic loading of initial data • Applications read data, then subscribe to relevant configuration changes • Subscription notifications with priority level ordering • Multiple datastores per NETCONF standards • Startup, running, candidate, operational
  • 3. 3©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Hierarchical • CDB uses an Hierarchical (XML) data model • Ideal for configuration data, which is tree structured • No Object-Relational-Mapping (ORM) required / dhcp/ aaa/ voip/ defaultLe… maxLeas… SubNets/ subNet/ mask range lowAddr highAddr logFacility net
  • 4. 4©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Object Relational Mapping (ORM) Hierarchical Relational / dhcp/ aaa/ voip/ defaultLe… maxLeas… SubNets/ subNet/ mask range lowAddr highAddr logFacility net
  • 5. 5©2015 Tail-f Systems all rights reservedFebruary 13, 2015 ACID The four properties that define a transaction: • Atomicity • Transactions are indivisible, all-or-nothing • Consistency • Transactions are all-at-once • {create A, create B} and {create B, create A} are identical • Independence • Transactions do not interfere with each other • Durability • Committed data remains in the system even in case of a restart, etc
  • 6. 6©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Database Storage MO = Managed Object (i.e. configuration consumer) JOURNAL START TRANSACTION WRITE 14 TO /some/leaf/somewhere WRITE “hello” TO /some/other/leaf COMMIT START TRANSACTION WRITE -1 TO /foo/bar ABORTED START TR ON DISK Values stored binary Paths stored as sequences of 32-bit hashes ConfD CDB IN MEMORY MO MO MO
  • 7. 7©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Data Model Becomes Database Schema Network Element NETCONF SNMP REST CLI Web CDB Database Data Provider API CDB API Management Agent API OSS/BSS App AppApp ConfD Core Engine App External DatabaseOperational Data App Management Agent API Auto-rendered management interfaces and data schema YANG Data Models
  • 8. 8©2015 Tail-f Systems all rights reservedFebruary 13, 2015 JOURNAL ConfD CDB IN MEMORY MO MO MO Database Replication ACTIVE NODE Journal records JOURNAL ConfD CDB IN MEMORY MO MO MO STANDBY NODE
  • 9. 9©2015 Tail-f Systems all rights reservedFebruary 13, 2015 CDB Start • CDB in-memory contents blank at this point • Read up schema from disk • Start transaction • Read up data from disk • Data on disk consistent with schema? • If not: Trigger automatic schema upgrade (see next page) • CDB doesn’t differentiate between up- or downgrade, it just notices that the schema is different • CDB does not rely on version in the namespace declaration • Validate • Commit
  • 10. 10©2015 Tail-f Systems all rights reservedFebruary 13, 2015 CDB Automatic Schema Upgrade • Elements with default value added to schema • Default values added to new database • Elements removed from schema • Values removed from new database • Elements with trivial type changes • Value promoted to new type in new database • Data is converted to string representation, then to new type • Elements with complex type changes • No value in new database • All other elements • Copied as is to new database Check the devel.log for messages about what conversions were made
  • 11. 11©2015 Tail-f Systems all rights reservedFebruary 13, 2015 CDB Programmatic Schema Upgrade Then add your own upgrade clients • Complement to the automatic schema upgrade • Connect in start phase 0 • Compute values for the new database • Read any old or new database values • Compute new values • Write (overwrite) new values • If the schema is changed cautiously, CDB automatic schema upgrade might be able to handle everything
  • 12. 12©2015 Tail-f Systems all rights reservedFebruary 13, 2015 CDB Schema Upgrade Examples • 32-bit flag field becomes 64-bits • New flags should be initialized to all zeros • Automatic upgrade sufficient • New Maximum Transfer Unit (MTU) field added • Should be 1500 for Eth interfaces, 48 for ATM interfaces • Upgrade client reads InterfaceType value, classifies it and writes the appropriate MTU value • InterfaceType changed from string to enumeration • All strings that match enumeration value are auto upgraded • Remaining values left unset: set by upgrade client • Time field changed from seconds to nanoseconds • Upgrade client reads the old value, multiplies by 109 and overwrites the automatically promoted value
  • 13. 13©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Data Stores • Each data store is a full copy of the configuration • Each data store can be mapped to CDB or external data base • Running can be split across CDB and several data bases • 5 combinations (S+Rro, S+R, R, R+C, Rro+C) • Operational data store • Store status, performance or application data CandidateStart-up Running Operational
  • 14. 14©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Data Stores • Start-up • If enabled, start-up configuration is copied to (overwriting) the running configuration at system start • If not enabled, configuration in running remains unchanged from last time system was running • The first time the system starts, configuration is read from factory default files ( *_init.xml ) • Running • Holds the currently running configuration • Candidate • Data store for future configuration under construction • Copied to running to make it take effect
  • 15. 15©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Sessions • Session Start (login) • Display values • Update values • Request Commit • Lock data store (running, candidate, start-up) • Run validation sequence • Run Transaction (next slide) • Wait for acknowledgement from standby node(s) • Inform subscribers of changes • Unlock data store • Session Continues
  • 16. 16©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Transactions
  • 17. 17©2015 Tail-f Systems all rights reservedFebruary 13, 2015 The Life of a Managed Object • Subscribe to relevant configuration changes • Read out configuration at startup • Enter event loop • If subscription event, react to configuration change RESTCLINETCONF SNMP Management Agent API Managed Object API MO MO CDB ConfD Core Engine CDB API Data Provider API Web
  • 18. 18©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Read out Configuration at Startup • Initialization • cdb_connect() • cdb_start_session() • cdb_set_namespace() • Read elements • cdb_get_u_int32() • cdb_get_bool() • cdb_get_str() • cdb_get_ipv4() • cdb_get_enum_hash() • … (~30 more) • Read many • cdb_get_object() • cdb_get_values() • Count elements • cdb_exists() • cdb_num_instances() • Move in data tree • cdb_cd() • cdb_pushd() • Finalization • cdb_end_session() • cdb_close()
  • 19. 19©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Read out Configuration at Startup Sessions • CDB protected with Single Writer- Multiple Reader lock • No configuration changes can occur between cdb_start_session() and cdb_end_session() • Don’t keep the session open unnecessarily, delays configuration changes • Timeout after some minutes Namespaces • Each data model is defined in an XML Namespace • ConfD handles multiple data models/namespaces • Each subsystem should be separate namespace • Generate header file with namespace hash constant sock = socket(PF_INET, SOCK_STREAM, 0); cdb_connect(sock, CDB_READ_SOCKET, &confd_ip_port, size); cdb_start_session(sock, CDB_RUNNING); cdb_set_namespace(sock, dhcpd__ns);
  • 20. 20©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Read out Configuration at Startup Keypaths • Each element in CDB is addressed by its path cdb_get_duration(sock, &dur, “/dhcp/defaultLeaseTime”) • Paths may include keys cdb_get_ipv4(sock,&ip,”/dhcp/SubNets/subNet{10.0.0.0 255.0.0.0}/lowAddr”) cdb_get_ipv4(sock, &ip, ”/dhcp/SubNets/subNet{%s %s}/lowAddr”, net, mask) cdb_get_ipv4(sock, &ip, ”/dhcp/SubNets/subNet{%x %x}/lowAddr”, net, mask) • Index may be used in place of keys n = cdb_num_instances(sock, "/dhcp/SubNets/subNet"); for (i=0; i<n; i++) { cdb_cd(sock, "/dhcp/SubNets/subNet[%d]", i); do_subnet(…); }
  • 21. 21©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Triggers when anything in scope changes Subscribe to Configuration Changes subsock = socket(PF_INET, SOCK_STREAM, 0); cdb_connect(subsock, CDB_SUBSCRIPTION_SOCKET, &confd, size); cdb_subscribe(subsock, 3, dhcpd__ns, &spoint, "/dhcp"); cdb_subscribe_done(subsock); / dhcp/ aaa/ voip/ defaultLe… maxLeas… SubNets/ subNet/ mask range lowAddr highAddr logFacility net Managed Objects typically have several subscription points
  • 22. 22©2015 Tail-f Systems all rights reservedFebruary 13, 2015 Enter Event Loop • Event loop needs to monitor subscription socket • Typically using poll()/select() while(1) { set[0].fd = subsock; set[0].events = POLLIN; set[0].revents = 0; poll(set, 1, -1); // Monitor one socket, wait forever if (set[0].revents & POLLIN) { cdb_read_subscription_socket(subsock, sub_points, &reslen); // React on changes here… // sub_points[] contains triggering subscription points, // reslen how many } cdb_sync_subscription_socket(subsock, CDB_DONE_PRIORITY); } • How to handle CDB subscription notifications will be covered in the training module “CDB Subscribers”
  • 23. 23©2015 Tail-f Systems all rights reservedFebruary 13, 2015