SlideShare a Scribd company logo
1 of 12
librados
object model
● pools
– 1s to 100s
– independent namespaces or object collections
– replication level, placement policy
● objects
– bazillions
– blob of data (bytes to gigabytes)
– attributes (e.g., “version=12”; bytes to kilobytes)
– key/value bundle (bytes to gigabytes)
atomic transactions
● client operations send to the OSD cluster
– operate on a single object
– can contain a sequence of operations, e.g.
● truncate object
● write new object data
● set attribute
● atomicity
– all operations commit or do not commit atomically
● conditional
– 'guard' operations can control whether operation is performed
● verify xattr has specific value
● assert object is a specific version
– allows atomic compare-and-swap etc.
key/value storage
● store key/value pairs in an object
– independent from object attrs or byte data payload
● based on google's leveldb
– efficient random and range insert/query/removal
– based on BigTable SSTable design
● exposed via key/value API
– insert, update, remove
– individual keys or ranges of keys
● avoid read/modify/write cycle for updating complex
objects
– e.g., file system directory objects
watch/notify
● establish stateful 'watch' on an object
– client interest persistently registered with object
– client keeps session to OSD open
● send 'notify' messages to all watchers
– notify message (and payload) is distributed to all watchers
– variable timeout
– notification on completion
● all watchers got and acknowledged the notify
● use any object as a communication/synchronization
channel
– locking, distributed coordination (ala ZooKeeper), etc.
CLIENT
#1
CLIENT
#2
CLIENT
#3
OSD
watch
ack/commit
ack/commit
watch
ack/commit
watch
notify
notify
notify
notify
ack
ack
ack
complete
watch/notify example
● radosgw cache consistency
– radosgw instances watch a single object
(.rgw/notify)
– locally cache bucket metadata
– on bucket metadata changes (removal, ACL
changes)
● write change to relevant bucket object
● send notify with bucket name to other radosgw
instances
– on receipt of notify
● invalidate relevant portion of cache
rados classes
● dynamically loaded .so
– /var/lib/rados-classes/*
– implement new object “methods” using existing methods
– part of I/O pipeline
– simple internal API
● reads
– can call existing native or class methods
– do whatever processing is appropriate
– return data
● writes
– can call existing native or class methods
– do whatever processing is appropriate
– generates a resulting transaction to be applied atomically
class examples
● grep
– read an object, filter out individual records, and
return those
● sha1
– read object, generate fingerprint, return that
● images
– rotate, resize, crop image stored in object
– remove red-eye
● crypto
– encrypt/decrypt object data with provided key
ideas
● rados mailbox (RMB?)
– plug librados backend into dovecot, postfix, etc.
– key/value object for each mailbox
● key = message id
● value = headers
– object for each message or attachment
– watch/notify to delivery notification
ideas
● distributed key/value table
– aggregate many k/v objects into one big 'table'
– working prototype exists (thanks, Eleanor!)
ideas
● lua rados class
– embed lua interpreter in a rados class
– ship semi-arbitrary code for operations
● json class
– parse, manipulate json structures

More Related Content

What's hot

Using GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWindUsing GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWind
Ilya Rosenfeld
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Andrii Vozniuk
 

What's hot (20)

Stream processing - Apache flink
Stream processing - Apache flinkStream processing - Apache flink
Stream processing - Apache flink
 
RxJs
RxJsRxJs
RxJs
 
Using GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWindUsing GeoServer with NASA WorldWind
Using GeoServer with NASA WorldWind
 
ELK Elasticsearch Logstash and Kibana Stack for Log Management
ELK Elasticsearch Logstash and Kibana Stack for Log ManagementELK Elasticsearch Logstash and Kibana Stack for Log Management
ELK Elasticsearch Logstash and Kibana Stack for Log Management
 
GC in C#
GC in C#GC in C#
GC in C#
 
From rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journeyFrom rest api to graph ql a 10 year journey
From rest api to graph ql a 10 year journey
 
Creating an Abstract Data Type in C++
Creating an Abstract Data Type in C++Creating an Abstract Data Type in C++
Creating an Abstract Data Type in C++
 
iOS Dev Happy Hour Realm - Feb 2021
iOS Dev Happy Hour Realm - Feb 2021iOS Dev Happy Hour Realm - Feb 2021
iOS Dev Happy Hour Realm - Feb 2021
 
Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?Event Sourcing - what could possibly go wrong?
Event Sourcing - what could possibly go wrong?
 
Centralized Logging System Using ELK Stack
Centralized Logging System Using ELK StackCentralized Logging System Using ELK Stack
Centralized Logging System Using ELK Stack
 
Lokijs
LokijsLokijs
Lokijs
 
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
Andrzej Ludwikowski - Event Sourcing - what could possibly go wrong? - Codemo...
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
Interactive learning analytics dashboards with ELK (Elasticsearch Logstash Ki...
 
Elastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & KibanaElastic - ELK, Logstash & Kibana
Elastic - ELK, Logstash & Kibana
 
MySQL Workbench for DFW Unix Users Group
MySQL Workbench for DFW Unix Users GroupMySQL Workbench for DFW Unix Users Group
MySQL Workbench for DFW Unix Users Group
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 
Logstash
LogstashLogstash
Logstash
 
Elk
Elk Elk
Elk
 
Introduction to ELK
Introduction to ELKIntroduction to ELK
Introduction to ELK
 

Similar to Ceph Day NYC: Developing With Librados

Introduction to NHibernate
Introduction to NHibernateIntroduction to NHibernate
Introduction to NHibernate
Dublin Alt,Net
 

Similar to Ceph Day NYC: Developing With Librados (20)

Distributed Storage and Compute With Ceph's librados (Vault 2015)
Distributed Storage and Compute With Ceph's librados (Vault 2015)Distributed Storage and Compute With Ceph's librados (Vault 2015)
Distributed Storage and Compute With Ceph's librados (Vault 2015)
 
Ceph Day New York 2014: Future of CephFS
Ceph Day New York 2014:  Future of CephFS Ceph Day New York 2014:  Future of CephFS
Ceph Day New York 2014: Future of CephFS
 
BlueStore: a new, faster storage backend for Ceph
BlueStore: a new, faster storage backend for CephBlueStore: a new, faster storage backend for Ceph
BlueStore: a new, faster storage backend for Ceph
 
Ceph Tech Talk: Bluestore
Ceph Tech Talk: BluestoreCeph Tech Talk: Bluestore
Ceph Tech Talk: Bluestore
 
Ceph Day Santa Clara: The Future of CephFS + Developing with Librados
Ceph Day Santa Clara: The Future of CephFS + Developing with LibradosCeph Day Santa Clara: The Future of CephFS + Developing with Librados
Ceph Day Santa Clara: The Future of CephFS + Developing with Librados
 
BlueStore: a new, faster storage backend for Ceph
BlueStore: a new, faster storage backend for CephBlueStore: a new, faster storage backend for Ceph
BlueStore: a new, faster storage backend for Ceph
 
The Ceph RGW archive zone feature (Ceph Days 2019)
The Ceph RGW archive zone feature (Ceph Days 2019)The Ceph RGW archive zone feature (Ceph Days 2019)
The Ceph RGW archive zone feature (Ceph Days 2019)
 
BlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year InBlueStore, A New Storage Backend for Ceph, One Year In
BlueStore, A New Storage Backend for Ceph, One Year In
 
NetflixOSS Open House Lightning talks
NetflixOSS Open House Lightning talksNetflixOSS Open House Lightning talks
NetflixOSS Open House Lightning talks
 
Extending Kubernetes
Extending KubernetesExtending Kubernetes
Extending Kubernetes
 
Introduction to NHibernate
Introduction to NHibernateIntroduction to NHibernate
Introduction to NHibernate
 
Reversing JavaScript
Reversing JavaScriptReversing JavaScript
Reversing JavaScript
 
Real time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache SparkReal time Analytics with Apache Kafka and Apache Spark
Real time Analytics with Apache Kafka and Apache Spark
 
MongoDB World 2019: Mindlogger: A Digital Platform for Shareable Access-contr...
MongoDB World 2019: Mindlogger: A Digital Platform for Shareable Access-contr...MongoDB World 2019: Mindlogger: A Digital Platform for Shareable Access-contr...
MongoDB World 2019: Mindlogger: A Digital Platform for Shareable Access-contr...
 
面向引擎——编写高效率JS
面向引擎——编写高效率JS面向引擎——编写高效率JS
面向引擎——编写高效率JS
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQL
 
Gatling - Stress test tool
Gatling - Stress test toolGatling - Stress test tool
Gatling - Stress test tool
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - Copenhagen
 
apachecamelk-april2019-190409093034.pdf
apachecamelk-april2019-190409093034.pdfapachecamelk-april2019-190409093034.pdf
apachecamelk-april2019-190409093034.pdf
 

Recently uploaded

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Ceph Day NYC: Developing With Librados

  • 2. object model ● pools – 1s to 100s – independent namespaces or object collections – replication level, placement policy ● objects – bazillions – blob of data (bytes to gigabytes) – attributes (e.g., “version=12”; bytes to kilobytes) – key/value bundle (bytes to gigabytes)
  • 3. atomic transactions ● client operations send to the OSD cluster – operate on a single object – can contain a sequence of operations, e.g. ● truncate object ● write new object data ● set attribute ● atomicity – all operations commit or do not commit atomically ● conditional – 'guard' operations can control whether operation is performed ● verify xattr has specific value ● assert object is a specific version – allows atomic compare-and-swap etc.
  • 4. key/value storage ● store key/value pairs in an object – independent from object attrs or byte data payload ● based on google's leveldb – efficient random and range insert/query/removal – based on BigTable SSTable design ● exposed via key/value API – insert, update, remove – individual keys or ranges of keys ● avoid read/modify/write cycle for updating complex objects – e.g., file system directory objects
  • 5. watch/notify ● establish stateful 'watch' on an object – client interest persistently registered with object – client keeps session to OSD open ● send 'notify' messages to all watchers – notify message (and payload) is distributed to all watchers – variable timeout – notification on completion ● all watchers got and acknowledged the notify ● use any object as a communication/synchronization channel – locking, distributed coordination (ala ZooKeeper), etc.
  • 7. watch/notify example ● radosgw cache consistency – radosgw instances watch a single object (.rgw/notify) – locally cache bucket metadata – on bucket metadata changes (removal, ACL changes) ● write change to relevant bucket object ● send notify with bucket name to other radosgw instances – on receipt of notify ● invalidate relevant portion of cache
  • 8. rados classes ● dynamically loaded .so – /var/lib/rados-classes/* – implement new object “methods” using existing methods – part of I/O pipeline – simple internal API ● reads – can call existing native or class methods – do whatever processing is appropriate – return data ● writes – can call existing native or class methods – do whatever processing is appropriate – generates a resulting transaction to be applied atomically
  • 9. class examples ● grep – read an object, filter out individual records, and return those ● sha1 – read object, generate fingerprint, return that ● images – rotate, resize, crop image stored in object – remove red-eye ● crypto – encrypt/decrypt object data with provided key
  • 10. ideas ● rados mailbox (RMB?) – plug librados backend into dovecot, postfix, etc. – key/value object for each mailbox ● key = message id ● value = headers – object for each message or attachment – watch/notify to delivery notification
  • 11. ideas ● distributed key/value table – aggregate many k/v objects into one big 'table' – working prototype exists (thanks, Eleanor!)
  • 12. ideas ● lua rados class – embed lua interpreter in a rados class – ship semi-arbitrary code for operations ● json class – parse, manipulate json structures