Iray Programmer's Manual

Database, transactions and scopes

All Iray scene data is stored in the Iray scene database. The scene database is a distributed key-value store which allows to store scene elements and retrieve them later when they are needed. The keys are arbitrary strings, the value are instances of C++ classes. The fact that the database is distributed means that data can be stored on any node in a cluster and retrieved subsequently on any other node in the cluster.

The database is represented with the mi::neuraylib::IDatabase interface in the API. It can be accessed through the mi::neuraylib::INeuray::get_api_component() function.

Iray has been designed for multi-user operation and multiple operations running in parallel. This is supported in the database with the concepts of Transactions and Database scopes.

You can create, retrieve and modify scene objects in the database, such as cameras, options, groups, instances, objects, meshes, and functions. Any thread which has access to an open transaction can at any time create and edit database objects. The database API is written to support multithreaded accesses. It is the applications responsibility to synchronize concurrent changes to single database objects, though. It is also the applications responsibility that concurrent changes from different threads result in an overall consistent database content.

See also the following topics:




Subsections