Conversation
844a555 to
153d3bb
Compare
|
Looks like cppTango does not set ZMQ topic filter: see my gist Filtering is performed manually through some non-trivial code, like: string local_callback_key(device_name);
string::size_type pos;
if ((pos = local_callback_key.find('#')) == string::npos)
{
if (inter_event == true)
local_callback_key = local_callback_key + "." + event_name;
else
local_callback_key = local_callback_key + "/" +obj_name_lower + "." + event_name;
}
else
{
local_callback_key.erase(pos);
if (inter_event == true)
local_callback_key = local_callback_key + MODIFIER_DBASE_NO + '.' + event_name;
else
local_callback_key = local_callback_key + "/" + obj_name_lower + MODIFIER_DBASE_NO + '.' + event_name;
}I guess this was designed to prevent socket being created for every subscription (I wonder if ZMQ reuses sockets underneath) |
|
a few hundred lines below: //
// Subscribe to the new event
//
event_sub_sock->setsockopt(ZMQ_SUBSCRIBE,event_name,::strlen(event_name));so ZMQ topics are actually used... |
4a83964 to
a482580
Compare
| { | ||
| namespace admin | ||
| { | ||
| namespace commands |
There was a problem hiding this comment.
Hello!
This part looks very Java-ish to me ;-)...
Do we really need so many nested namespaces? I would drop some of them to improve readability of the code.
There was a problem hiding this comment.
Maybe, you are right... perhaps org::tango::common would be enough.
P.S. once we switch to C++17 we can replace this with namespace org::tango::common::admin::commands {...}
There was a problem hiding this comment.
I would even remove the 'org' part. I don't think we need it.
There was a problem hiding this comment.
OK, I will remove org but leave the rest to be consistent with the folder structure. We will see how this evolve and maybe change in the future.
|
I do not like where it goes. So I close this one and start another #404 |
Currently each client and server guesses about the channel to use for the event subscription.
In this PR we want to implement handshaking mechanism in which client asks server for the channel.
As this will be back ported into tango-9-lts minimal code refactorings must be applied.