Is there a reliable way to find out a server's responsible ID from a
client (that is, not the client's replica's ID, but the server's ID)?
I have a server space (s1) and a thread (t1) is posting events to it,
with the source set to the responsible ID of the server. Basically, I
want to also have a thread (t2) that copies events of the same type
from other servers (s*) to the server (s1).
To do this the copying thread t2 connects to the remote server (s*) and
listens for the events. It should only copy events posted locally to
that server (that is, by s*'s t1 to s*, since s*'s t2 may also be
copying events to s*, including from s1). One way to do this is to only
copy events to s1 that have a source the same as the responsible ID of
s*. So, I want to get s*'s responsible ID in s1's t2. The responsible
ID for s* is not the same as the responsible ID for t2's replica of s*.
One way to do this is for t2 to listen to DataspaceStatusItems in s*,
and use the ID from the DataspaceStatusItem with serverFlag true. This
+ source in posted event (from s*'s t1) is s*'s responsible ID (typical)
+ spaces only have one DataspaceStatusItem with serverFlag true
Is there a better way?