The startup procedure that initializes the eXtremeDB runtime environment in Python applications is implemented in the exdb.init_runtime() method which must be called before any database operations can be performed. The exdb.init_runtime() method accepts the following arguments to set runtime options to and to load specific eXtremeDB libraries:
is_disk A boolean ( True
orFalse
) value; ifTrue
load disk (persistent storage) versions of libraries; default value isFalse
which means initialize the in-memory runtimetmgr A string specifying which transaction manager to use: valid values are 'mursiw' or 'mvcc'; default is 'mursiw' (MURSIW transaction manager) is_shm A boolean ( True
orFalse
) value; ifTrue
the shared-memory runtime is to be used; default isFalse
; i.e. use conventional (“in-process” or “local”) memoryis_debug A boolean ( True
orFalse
) value; ifTrue
the debug version of the runtime is to be used.; default isFalse
; i.e. use the release (optimized “no-debug”) runtimecluster A boolean ( True
orFalse
) value; ifTrue
the cluster runtime is to be loaded; default isFalse
; i.e.do not load the cluster runtime. (Note that this flag is mutually exclusive with ha)ha A boolean ( True
orFalse
) value; ifTrue
the High Availability (HA) runtime is to be loaded; default isFalse
; i.e. do not load the HA runtime. (Note that this flag is mutually exclusive with cluster)options Specifies runtime options; the options can be specified either by an “options=(option,value)” tuple or as a list of “options=(option,value)” tuples (Please refer to the Reference Guide page mco_runtime_setoption()
for the list of actual runtime options)DiskCompression A boolean ( True
orFalse
) value; ifTrue
the low level file access library with disk compression enabled is to be used; default isFalse
; i.e. do not to use low level disk compression library (Note that this flag is mutually exclusive with UseAsyncIO)UsePosixLibraries A boolean ( True
orFalse
) value; ifTrue
the low level posix synchronization primitives library is to be used; default isFalse
; i.e. use the SystemV synchronization primitives libraryUseAsyncIO A boolean ( True
orFalse
) value; ifTrue
the asynchronous disk IO library; default isFalse
; i.e. use the standard synchronous IO library (eg.libmcofu98
on Linux,mcofw32.lib
on Windows. Note that Windows only supports synchronous IO soTrue
is not a valid choice for this option on Windows).iot A boolean ( True
orFalse
) value; ifTrue
the IoT communication is enabled (see the Active Data Replication page)The typical sequence of API calls would look like the following:
... is_disk = False tmgr = 'mvcc' is_shm = True is_debug = True #Load Runtime configuration specified by parameters exdb.init_runtime(is_disk, tmgr, is_shm, is_debug) ...Persistent Databases
For persistent databases, the exdb.init_runtime() method is called exactly as for an in-memory database except that the argument
is_disk=True
and possibly the two other arguments:DiskCompression
andUseAsyncIO
(see table above ). The typical sequence of API calls for a persistent database application would look like the following:... is_disk = True tmgr = 'mvcc' is_shm = False is_debug = True #Load Runtime configuration specified by parameters exdb.init_runtime(is_disk, tmgr, is_shm, is_debug) ...(Please refer to SDK sample python/open for an example.)