Iray SDK API nvidia_logo_transpbg.gif Up
inode_manager.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2025 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
6
7#ifndef MI_NEURAYLIB_INODE_MANAGER_H
8#define MI_NEURAYLIB_INODE_MANAGER_H
9
11#include <mi/neuraylib/version.h> // for MI_NEURAYLIB_DEPRECATED_ENUM_VALUE
12
13namespace mi {
14
15class IString;
16class IMap;
17
18namespace neuraylib {
19
80
87 mi::base::Interface_declare<0x29a6d6a5,0xfaa9,0x48dc,0x87,0xc5,0xee,0xa5,0x83,0x2c,0xe9,0xb3>
88{
89public:
91 virtual const IString* get_address() const = 0;
92
94 virtual bool is_in_cluster() const = 0;
95
113 virtual const IMap* get_properties() const = 0;
114};
115
118 mi::base::Interface_declare<0xf83a075b,0xf3d1,0x46a9,0xb6,0x75,0x91,0x10,0x1c,0xa3,0x5a,0x9f>
119{
120public:
128 virtual const IString* get_multicast_address() const = 0;
129
136 virtual Float64 get_timeout() const = 0;
137
143 virtual const IMap* get_properties() const = 0;
144
146 virtual Size get_number_of_worker_nodes() const = 0;
147
157 virtual const IWorker_node_descriptor* get_worker_node( Size index) const = 0;
158
170 virtual const IWorker_node_descriptor* get_head_node() const = 0;
171
173 virtual Size get_number_of_client_nodes() const = 0;
174};
175
186 mi::base::Interface_declare<0x36a1317b,0xfbc1,0x4ef5,0xbf,0x38,0x57,0x1a,0xca,0x6d,0x22,0x9f>
187{
188public:
197 virtual void property_callback(
198 const ICluster_descriptor* cluster_descriptor, const char* changed_property_name) = 0;
199};
200
211 mi::base::Interface_declare<0x3c14c356,0xde2c,0x4991,0x9a,0x7f,0x50,0x53,0x5d,0x2a,0x9f,0x5a>
212{
213public:
222 virtual void property_callback(
223 const IWorker_node_descriptor* worker_descriptor, const char* changed_property_name) = 0;
224};
225
236 mi::base::Interface_declare<0x441ca19c,0xa7d7,0x46fa,0x92,0xc3,0x14,0xe0,0x4b,0x66,0x13,0x55>
237{
238public:
246 virtual void membership_callback( const char* address, bool flag) = 0;
247};
248
259 mi::base::Interface_declare<0xd5472198,0xf755,0x4db8,0x82,0x49,0x74,0xf7,0x95,0xb5,0x58,0xee>
260{
261public:
269 virtual void membership_callback( IWorker_node_descriptor* worker_descriptor, bool flag) = 0;
270};
271
282 mi::base::Interface_declare<0xf07bba0e,0x249f,0x4c6d,0x97,0x57,0x48,0xa7,0xf8,0xe7,0xe6,0x5a>
283{
284public:
291 virtual void head_node_callback( IWorker_node_descriptor* worker_descriptor) = 0;
292};
293
295
304 mi::base::Interface_declare<0x9e876854,0x04a9,0x467f,0x85,0xe9,0xa4,0xb4,0xd1,0x2d,0x28,0x8d>
305{
306public:
311};
312
321 mi::base::Interface_declare<0xadf38762,0x86db,0x4ba9,0x9d,0xde,0x1d,0x13,0xee,0x85,0xa0,0x45>
322{
323public:
327 virtual void shutdown_cluster_callback(const ICluster_descriptor* cluster) = 0;
328};
329
338 mi::base::Interface_declare<0x42b4ec43,0x9562,0x42fc,0x8b,0x8d,0xc8,0x55,0x6b,0x5e,0x50,0x3c>
339{
340public:
345 virtual void worker_process_started_callback(IWorker_node_descriptor* worker_descriptor) = 0;
346};
347
357 mi::base::Interface_declare<0x0a58b727,0x0ed4,0x4ecf,0x90,0x9a,0x30,0x7c,0x65,0xd4,0x47,0xe8>
358{
359public:
361 virtual const ICluster_descriptor* get_cluster_descriptor() const = 0;
362
367 {
370 CLUSTER_FAILURE = 2
371 MI_NEURAYLIB_DEPRECATED_ENUM_VALUE(CLUSTER_FORCE_32_BIT, 0xffffffffU)
372 };
373
376
385 virtual void set_timeout( Float64 timeout) = 0;
386
400 virtual Sint32 set_cluster_property( const char* name, const char* value) = 0;
401
415 virtual Sint32 remove_cluster_property( const char* name) = 0;
416
467 const char* program_name,
468 const char* argument_string,
469 Uint32 child_process_timeout = 0) = 0;
470
481
491
496 virtual void shutdown() = 0;
497
510
520
527
537
544
554
561
571
578
586 virtual void add_head_node_callback( IHead_node_callback* callback) = 0;
587
593 virtual void remove_head_node_callback( IHead_node_callback* callback) = 0;
594
604 virtual const IWorker_node_descriptor* grow() = 0;
605
614 virtual Sint32 shrink(const IWorker_node_descriptor* remove_node) = 0;
615};
616
618class ICluster_filter : public
619 mi::base::Interface_declare<0x63a3ced9,0x9ae6,0x4c3a,0x80,0xc2,0x80,0x6b,0x27,0xff,0x40,0xd1>
620{
621public:
626 virtual bool is_eligible( const ICluster_descriptor* cluster_descriptor) = 0;
627};
628
631 mi::base::Interface_declare<0x9af36fa0,0xbe40,0x4fe4,0x89,0x03,0x37,0x7e,0x12,0xaf,0xcb,0xc8>
632{
633public:
639 virtual bool is_eligible( const IWorker_node_descriptor* worker_node_descriptor) = 0;
640};
641
647 mi::base::Interface_declare<0xe8feacc5,0x1f7c,0x4abc,0x8a,0x23,0x50,0x3c,0x56,0xf4,0xa6,0x63>
648{
649public:
662 virtual Sint32 start( const char* listen_address,
663 bool tcp = false,
664 const char* discovery_address = nullptr,
665 const char* cluster_interface = nullptr) = 0;
666
670 virtual Sint32 shutdown() = 0;
671
675 virtual const IString* get_listen_address() const = 0;
676
689 virtual Sint32 set_multicast_base_address( const char* base_address) = 0;
690
701 virtual const IString* get_multicast_base_address() const = 0;
702
704 virtual Size get_number_of_worker_nodes() const = 0;
705
715 virtual const IWorker_node_descriptor* get_worker_node( Size index) const = 0;
716
725
734
741 IShutdown_cluster_callback* callback) = 0;
742
750 IShutdown_cluster_callback* callback) = 0;
751
759
767
774 const ICluster_descriptor* cluster_descriptor) = 0;
775
781 static const Uint32 SIGNAL_STARTUP_ONLY = 0xffffffff;
782
877 Size min_number_of_requested_worker_nodes,
878 Size max_number_of_requested_worker_nodes,
879 ICluster_filter* cluster_filter,
880 IWorker_node_filter* worker_node_filter,
881 const char* program_name,
882 const char* argument_string,
883 bool reusable = false,
884 Uint32 child_process_timeout = 0) = 0;
885
887 virtual Size get_number_of_clusters() const = 0;
888
898 virtual const ICluster_descriptor* get_cluster(Size index) const = 0;
899
903 virtual void shutdown_node_managers() = 0;
904
916 virtual void set_head_node_interface( const char* address) = 0;
917
923 virtual const IString* get_head_node_interface() = 0;
924};
925
929 mi::base::Interface_declare<0xbd1ab5cb,0x2794,0x4cd8,0x99,0xa9,0x30,0x36,0x32,0x8a,0xca,0xff>
930{
931public:
945 virtual const IString* resolve_process(
946 const char* program_name, const char* program_arguments) = 0;
947};
948
954 mi::base::Interface_declare<0xeb232bd5,0x0abf,0x4872,0xab,0x18,0x92,0x49,0x31,0x36,0xf9,0x91>
955{
956public:
975 virtual Sint32 start( const char* listen_address = nullptr,
976 bool tcp = false,
977 const char* discovery_address = nullptr,
978 const char* cluster_interface = nullptr) = 0;
979
983 virtual Sint32 shutdown() = 0;
984
988 virtual const IString* get_listen_address() const = 0;
989
1002 virtual Sint32 set_multicast_base_address( const char* base_address) = 0;
1003
1014 virtual const IString* get_multicast_base_address() const = 0;
1015
1027 virtual Sint32 set_property( const char* name, const char* value) = 0;
1028
1036 virtual const IString* get_property( const char* name) const = 0;
1037
1049 virtual Sint32 remove_property( const char* name) = 0;
1050
1059 virtual void set_child_process_resolver( IChild_process_resolver* child_process_resolver) = 0;
1060
1067
1074 IShutdown_node_managers_callback* callback) = 0;
1075
1083 IShutdown_node_managers_callback* callback) = 0;
1084};
1085
1088 mi::base::Interface_declare<0xd54aaa9c,0x4798,0x4405,0xa4,0x58,0xd8,0x63,0x44,0xb4,0xb1,0xdd>
1089{
1090public:
1093
1096};
1097 // end group mi_neuray_node_manager
1099
1100} // namespace neuraylib
1101
1102} // namespace mi
1103
1104#endif // MI_NEURAYLIB_INODE_MANAGER_H
This interface represents maps, i.e., a key-value based data structure.
Definition: imap.h:41
A simple string class.
Definition: istring.h:22
Mixin class template for deriving new interface declarations.
Definition: interface_declare.h:43
A filter used to decide if a command string to start a child process is eligible for execution.
Definition: inode_manager.h:930
virtual const IString * resolve_process(const char *program_name, const char *program_arguments)=0
Indicates whether a command string to start a child process should be executed by the worker node.
Abstract interface for signaling changed cluster members.
Definition: inode_manager.h:237
virtual void membership_callback(const char *address, bool flag)=0
This function is called when a remote client joined or left the cluster.
This interface describes a cluster and its properties.
Definition: inode_manager.h:119
virtual Size get_number_of_worker_nodes() const =0
Returns the number of worker nodes in the cluster.
virtual Size get_number_of_client_nodes() const =0
Returns the number of client nodes connected to the cluster.
virtual Float64 get_timeout() const =0
Returns the keep-alive timeout for the cluster.
virtual const IWorker_node_descriptor * get_worker_node(Size index) const =0
Returns a descriptor for a worker node in the cluster.
virtual const IString * get_multicast_address() const =0
Returns the multicast address reserved for the cluster.
virtual const IMap * get_properties() const =0
Returns the properties of the cluster.
virtual const IWorker_node_descriptor * get_head_node() const =0
Returns the head node.
A filter used to decide whether a cluster is eligible to be joined.
Definition: inode_manager.h:620
virtual bool is_eligible(const ICluster_descriptor *cluster_descriptor)=0
Indicates whether a cluster is eligible to be joined.
Abstract interface for signaling changed cluster properties.
Definition: inode_manager.h:187
virtual void property_callback(const ICluster_descriptor *cluster_descriptor, const char *changed_property_name)=0
This function is called when a cluster property change was communicated.
Abstract interface for signaling a change of the cluster application head node.
Definition: inode_manager.h:283
virtual void head_node_callback(IWorker_node_descriptor *worker_descriptor)=0
This function is called when a cluster node becomes cluster head node.
The node manager client allows to start or join Iray clusters built from worker nodes.
Definition: inode_manager.h:648
virtual void remove_shutdown_cluster_callback(IShutdown_cluster_callback *callback)=0
Removes a previously added callback to be called when a request to shutdown a cluster is received.
virtual const ICluster_descriptor * get_cluster(Size index) const =0
Returns a descriptor for a cluster.
virtual void set_head_node_interface(const char *address)=0
Set the head node address and subnet qualifier.
virtual void remove_shutdown_node_managers_callback(IShutdown_node_managers_callback *callback)=0
Removes a previously added callback to be called when a request to shutdown all clients and workers i...
virtual const IWorker_node_descriptor * get_worker_node(Size index) const =0
Returns a descriptor for a worker node currently known to the node manager.
virtual const IString * get_multicast_base_address() const =0
Returns the multicast base address.
static const Uint32 SIGNAL_STARTUP_ONLY
Symbolic constant to pass as child_process_timeout to join_or_create_cluster.
Definition: inode_manager.h:781
virtual void add_shutdown_cluster_callback(IShutdown_cluster_callback *callback)=0
Adds a callback to be called when a request to shutdown a cluster is received.
virtual const IString * get_head_node_interface()=0
Get the head node address and subnet qualifier.
virtual Sint32 shutdown()=0
Shuts down the operation of the node manager.
virtual Sint32 start(const char *listen_address, bool tcp=false, const char *discovery_address=nullptr, const char *cluster_interface=nullptr)=0
Starts the operation of the node manager.
virtual Size get_number_of_worker_nodes() const =0
Returns the number of worker nodes currently known to the node manager.
virtual Size get_number_of_clusters() const =0
Returns the number of existing clusters.
virtual const IString * get_listen_address() const =0
Returns the listen address used by the node manager.
virtual INode_manager_cluster * join_or_create_cluster(Size min_number_of_requested_worker_nodes, Size max_number_of_requested_worker_nodes, ICluster_filter *cluster_filter, IWorker_node_filter *worker_node_filter, const char *program_name, const char *argument_string, bool reusable=false, Uint32 child_process_timeout=0)=0
Joins an existing cluster or creates a new one.
virtual Sint32 shutdown_cluster(const ICluster_descriptor *cluster_descriptor)=0
Unconditionally shut down the cluster that cluster_descriptor refers to and release reserved worker n...
virtual void remove_worker_process_started_callback(IWorker_process_started_callback *callback)=0
Removed a callback to be called when a worker process has been fully started.
virtual Sint32 set_multicast_base_address(const char *base_address)=0
Sets the multicast base address.
virtual void shutdown_node_managers()=0
Shuts down all node manager clients and workers which are currently joined.
virtual void add_worker_process_started_callback(IWorker_process_started_callback *callback)=0
Adds a callback to be called when a worker process has been fully started.
virtual void add_shutdown_node_managers_callback(IShutdown_node_managers_callback *callback)=0
Adds a callback to be called when a request to shutdown all clients and workers is received.
The interface to a cluster created and managed by the node manager.
Definition: inode_manager.h:358
virtual void remove_cluster_property_callback(ICluster_property_callback *callback)=0
Removes a previously added callback for cluster property changes.
virtual void set_timeout(Float64 timeout)=0
Sets the keep-alive timeout for the cluster.
virtual Cluster_status get_cluster_status() const =0
Returns the status of the cluster.
virtual void add_client_node_callback(IClient_node_callback *callback)=0
Adds a callback to be called when a client joins or leaves the cluster.
virtual Sint32 shrink(const IWorker_node_descriptor *remove_node)=0
Shrinks the cluster by one node.
virtual void add_head_node_callback(IHead_node_callback *callback)=0
Adds a callback to be called when a new node becomes head node.
virtual IWorker_node_descriptor * get_head_node()=0
Returns the head node.
virtual void shutdown()=0
Initiates the shutdown of the cluster.
virtual Sint32 start_worker_program(const char *program_name, const char *argument_string, Uint32 child_process_timeout=0)=0
Starts a worker program if none has been started when the cluster has been created.
virtual Sint32 shutdown_worker_program()=0
Shuts down the program that was started on all worker nodes when the cluster was created.
virtual Sint32 restart_worker_program()=0
Restarts the program that is supposed to run on all workers.
virtual const IWorker_node_descriptor * grow()=0
Grows the cluster by one node, if a worker node is available.
virtual Sint32 set_cluster_property(const char *name, const char *value)=0
Sets a cluster property.
virtual void remove_worker_node_callback(IWorker_node_callback *callback)=0
Removes a previously added callback for joined or left worker nodes.
virtual void remove_head_node_callback(IHead_node_callback *callback)=0
Removes a previously added callback for notification about a new head node.
virtual void remove_worker_property_callback(IWorker_node_property_callback *callback)=0
Removes a previously added callback for property changes of worker nodes.
virtual void add_worker_node_callback(IWorker_node_callback *callback)=0
Adds a callback to be called when a worker node joins or leaves the cluster.
virtual const ICluster_descriptor * get_cluster_descriptor() const =0
Returns the cluster descriptor for the cluster.
virtual Sint32 remove_cluster_property(const char *name)=0
Removes a cluster property.
virtual void add_cluster_property_callback(ICluster_property_callback *callback)=0
Adds a callback to be called when a cluster property changes.
virtual void remove_client_node_callback(IClient_node_callback *callback)=0
Removes a previously added callback for joined or left client nodes.
Cluster_status
Possible cluster states.
Definition: inode_manager.h:367
@ CLUSTER_ESTABLISHED
The cluster has been successfully established.
Definition: inode_manager.h:368
@ CLUSTER_SHUTDOWN
The cluster has been shutdown.
Definition: inode_manager.h:369
@ CLUSTER_FAILURE
The cluster has failed for unspecified reasons.
Definition: inode_manager.h:370
virtual void add_worker_property_callback(IWorker_node_property_callback *callback)=0
Adds a callback to be called when a property of a worker node changes.
Factory to create node manager client and worker instances.
Definition: inode_manager.h:1089
virtual INode_manager_client * create_client()=0
Creates a node manager client instance.
virtual INode_manager_worker * create_worker()=0
Creates a node manager worker instance.
The node manager worker class allows to set properties and announce them to other nodes.
Definition: inode_manager.h:955
virtual void remove_shutdown_node_managers_callback(IShutdown_node_managers_callback *callback)=0
Removes a previously added callback to be called when a request to shutdown all clients and workers i...
virtual const IString * get_property(const char *name) const =0
Returns a property of a worker node.
virtual const IString * get_listen_address() const =0
Returns the listen address used by the node manager.
virtual Sint32 start(const char *listen_address=nullptr, bool tcp=false, const char *discovery_address=nullptr, const char *cluster_interface=nullptr)=0
Starts the operation of the node manager.
virtual IChild_process_resolver * get_child_process_resolver() const =0
Returns the child process resolver.
virtual const IString * get_multicast_base_address() const =0
Returns the multicast base address.
virtual Sint32 remove_property(const char *name)=0
Removes a property of a worker node.
virtual Sint32 shutdown()=0
Shuts down the operation of the node manager.
virtual Sint32 set_multicast_base_address(const char *base_address)=0
Sets the multicast base address.
virtual void set_child_process_resolver(IChild_process_resolver *child_process_resolver)=0
Sets the child process resolver.
virtual void add_shutdown_node_managers_callback(IShutdown_node_managers_callback *callback)=0
Adds a callback to be called when a request to shutdown all clients and workers is received.
virtual Sint32 set_property(const char *name, const char *value)=0
Sets a property of a worker node.
Abstract interface for signaling a request to shutdown a cluster.
Definition: inode_manager.h:322
virtual void shutdown_cluster_callback(const ICluster_descriptor *cluster)=0
This function is called when a request to shutdown a cluster is being received.
Abstract interface for signaling a request to shutdown all clients and workers.
Definition: inode_manager.h:305
virtual void shutdown_node_managers_callback()=0
This function is called when a request to shutdown all clients and workers is received.
Abstract interface for signaling changed cluster members.
Definition: inode_manager.h:260
virtual void membership_callback(IWorker_node_descriptor *worker_descriptor, bool flag)=0
This function is called when a worker node joined or left the cluster.
This interface describes a worker node and its properties.
Definition: inode_manager.h:88
virtual bool is_in_cluster() const =0
Indicates whether the worker node is currently a member of a cluster.
virtual const IString * get_address() const =0
Returns the IP address of the worker node.
virtual const IMap * get_properties() const =0
Returns the properties of the worker node.
A filter used to decide whether a worker node is eligible to be included in a cluster.
Definition: inode_manager.h:632
virtual bool is_eligible(const IWorker_node_descriptor *worker_node_descriptor)=0
Indicates whether a worker node is eligible to be included in a cluster.
Abstract interface for signaling changed worker node properties.
Definition: inode_manager.h:212
virtual void property_callback(const IWorker_node_descriptor *worker_descriptor, const char *changed_property_name)=0
This function is called when a worker node property change was communicated.
Abstract interface for indicating that a worker process has been fully started.
Definition: inode_manager.h:339
virtual void worker_process_started_callback(IWorker_node_descriptor *worker_descriptor)=0
This function is called when the worker process on the node represented by the worker_descriptor has ...
int Sint32
32-bit signed integer.
Definition: types.h:46
double Float64
64-bit float.
Definition: types.h:52
Uint64 Size
Unsigned integral type that is large enough to hold the size of all types.
Definition: types.h:112
unsigned int Uint32
32-bit unsigned integer.
Definition: types.h:49
Mixin class template for deriving new interface declarations.
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: neuraylib.h:179
Major and minor version number and an optional qualifier.