Hello,

I am in a similar situation with the following unanswered SO question:
http://stackoverflow.com/questions/43386765/how-do-i-provide-affinityfunction-backupfilter-when-mainly-using-c-bindings

How can I achieve this? Quoting the question:

I am using the C++ bindings to have redundancy in my application. Alongside
the main C++ node, I am running a vanilla Java node via ignite.sh as a
backup on another node. I would like appoint this vanilla Java node to
always stay a *backup* node and never a primary node as long as there is a
C++ node running. Also, I need the C++ nodes to always stay as primary
nodes. A little data loss is acceptable with the PRIMARY_SYNC
synchronization.

My research led me to AffinityFunction.BackupFilter property to filter C++
nodes as primary. It seems that there is also some functions to give
*attributes* to nodes. So I guess I can set a specific attribute on C++
nodes and filter them to always stay as primary nodes.

However, C++ bindings apparently neither provide a way to set backup filter
nor allow setting attributes on the launched node. I have noticed some
modules get plugged through ignite-dir/libs but there is no tutorial about
that approach to add AffinityFunction. How can I achieve what I need? I
need to plug a custom affinity function while using C++ as the main and a
way to distinguish the C++ nodes.

Reply via email to