Skip to Main Content
Ceph: Designing and Implementing Scalable Storage Systems
book

Ceph: Designing and Implementing Scalable Storage Systems

by Michael Hackett, Vikhyat Umrao, Karan Singh, Nick Fisk
January 2019
Intermediate to advanced content levelIntermediate to advanced
606 pages
15h 1m
English
Packt Publishing
Content preview from Ceph: Designing and Implementing Scalable Storage Systems

Example of the librados application with atomic operations

In the previous librados application example, an object was created on the Ceph cluster and then the object's attributes were added. In most cases, this two-stage operation may be fine, however, some applications might require that the creation of the object and its attributes are atomic. That is to say, that if there was an interruption of service, the object should only exist if it has all its attributes set, otherwise the Ceph cluster should roll back the transaction. The following example, written in C++, shows how to use librados atomic operations to ensure transaction consistency across multiple operations. The example will write an object and then prompt the user if they wish ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

OpenStack for Architects - Second Edition

OpenStack for Architects - Second Edition

Ben Silverman, Michael Solberg
Kubernetes Patterns

Kubernetes Patterns

Bilgin Ibryam, Roland Huß
Kubernetes Best Practices

Kubernetes Best Practices

Brendan Burns, Eddie Villalba, Dave Strebel, Lachlan Evenson
Kubernetes Cookbook

Kubernetes Cookbook

Sébastien Goasguen, Michael Hausenblas

Publisher Resources

ISBN: 9781788295413