Welcome to the Mochi project
The Mochi project is a collaboration between Argonne National Laboratory, Los Alamos National Laboratory, Carnegie Mellon University, and the HDF Group. The objective of this project is to explore a software defined storage approach for composing storage services that provides new levels of functionality, performance, and reliability for science applications at extreme scale.
This website gathers documentation and tutorials for the main libraries used or developed in the context of the Mochi project.
Getting started
There are multiple ways of getting started with Mochi depending on your goal. In all cases though, we recommend reading about Margo first. Margo is what binds Mercury (RPC/RDMA) and Argobots (threading/tasking) under a runtime that all the other components will use. If you are into C++, you may then want to read about Thallium, which is a C++ library written on top of Margo.
If you want to use some of our components, you can then jump to their corresponding tutorial sections. If you want to develop your own component, your can jump to the Mochi templates and to the Bedrock bootstrapping system.
The core Mochi libraries
Margo is a C library enabling the development of distributed HPC services. It relies on Mercury for RPC/RDMA, and Argobots for threading/tasking, hidding the complexity of these two libraries under a simple programming model.
Thallium is a C++ library wrapping Margo and enabling the development of the same sort of services using all the power of modern C++. It is the recommended library for C++ developers. Note that Thallium also provides C++ wrappers to Argobots.
Mercury is Mochi’s underlying RPC/RDMA library. While it is not necessary to understand how to use Mercury itself when developing with Margo or Thallium (which we recommend), we provide a set of tutorials for those who would need to use it directly rather than through higher level libraries.
Argobots is used for threading/tasking in Mochi. Understanding its underlying programming model may not be necessary at first, for simple Margo or Thallium services, but may become useful to optimize performance or customize the scheduling and placement of threads and tasks in a Mochi service.
PyMargo is a Python binding for the Margo library, allowing the development of Mochi services in Python.
Note
The tutorials for each of these libraries are mostly independent of one another. Feel free to start with the most relevant for you and jump from a library to another as you need.
Important
In all the tutorials, we use the term “server” to denote a process to which one can send RPC requests, and “client” to denote a process that sends such RPC requests. It is important to note however that a server can also send RPC requests to other servers, and even to itself.
Other Mochi libraries/components
Yokan is Mochi’s main key/value storage service. It provides many backends and a rich API, including C, C++, and Python bindings.
Warabi is Mochi’s blob storage service. It provides capabilities for storing binary large objects with support for multiple backends (memory, persistent memory, ABT-IO) and efficient bulk transfers.
Flock is Mochi’s group management service. It provides functionalities to form and manage groups of distributed processes with multiple bootstrap methods (self, view, MPI, join, file) and backends (static, centralized).
ABT-IO is a small library that can be used to offload POSIX I/O operations to dedicated execution stream to better integrate with the core Mochi libraries. ABT-IO depends on Argobots only.
Developing and deploying a service
Bedrock is a bootstrapping system for composed Mochi services. It provides a simple a unified way of deploying Mochi components in a process and configure them using a JSON file. It also enable querying and changing this configuration at run time.
Templates are provided to help users develop their own components using Margo or Thallium. These templates can save a tremendous amount of time and will let you focus on the important part of your service: its RPCs and its API.
Contents
- Installing
- Hello Mochi
- Margo (Core C runtime)
- Initializing Margo
- Simple Hello World RPC with Margo
- Sending arguments, returning values
- Transferring data over RDMA
- Non-blocking RPC
- Working in terms of providers
- Using Argobots pools with Margo RPCs
- Serializing complex data structures
- Using Margo’s JSON configuration
- Customizing Margo logging
- Working with Margo timers
- Profiling and monitoring
- Margo instance lifetime
- Child instances with parent_mid
- C API Documentation
- Thallium (Core C++ runtime)
- Initializing Thallium
- Simple Hello World RPC
- Sending arguments, returning values
- Using lambdas and objects to define RPC handlers
- Properly stopping a Thallium server
- Sending and returning STL containers
- Sending and returning custom classes
- Transferring data over RDMA
- Timed RDMA transfers
- Pre-allocated RDMA buffers and pools
- Non-blocking RPCs
- Working in terms of providers
- Finalization callbacks
- Introduction to Argobots wrappers
- List of Argobots wrapper classes
- Using Argobots pools with Thallium RPCs
- Custom schedulers and pools
- Serialization with context
- Logging with Thallium
- Using timed callbacks
- Margo JSON configuration in Thallium
- C++ API Documentation
- Mercury (Low-level RPC and RDMA)
- Argobots (User-level Threading)
- PyMargo (Margo for Python)
- Yokan (Key/Value storage component)
- Getting started with Yokan
- Basics of accessing a database
- Accessing multiple key/value pairs
- Changing API semantics with modes
- Document storage
- Backends and their configurations
- Writing your own backend
- Key/value and document filters
- Database migration
- Event Notifications with Wait/Notify
- Python Bindings
- C++ Bindings
- C API Documentation
- C++ API Documentation
- Warabi (Blob storage component)
- Flock (Group management service)
- Getting started with Flock
- Bootstrap method: self
- Bootstrap method: view
- Bootstrap method: mpi
- Bootstrap method: join
- Bootstrap method: file
- Backend: static
- Backend: centralized
- Backend: SWIM
- Client API
- Working with group views
- Using Flock with Bedrock
- C++ API
- Python API
- C API Documentation
- C++ API Documentation
- ABT-IO (Argobots-aware POSIX I/O)
- Bedrock (Bootstrapping and configuration)
- Templates (Write your own Mochi component)
- Interoperability
- Miscellaneous
- Tutorials