Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UUID #526

Closed
DRTEK opened this issue Mar 11, 2017 · 11 comments
Closed

UUID #526

DRTEK opened this issue Mar 11, 2017 · 11 comments

Comments

@DRTEK
Copy link

DRTEK commented Mar 11, 2017

hello
is it possible to set uuid at runtime ?
thanks

@bluca
Copy link
Member

bluca commented Mar 11, 2017

No as it's used to identify a peer by all other nodes, so it would become a bit messy. What's your use case?

@DRTEK
Copy link
Author

DRTEK commented Mar 11, 2017

i have central database holds peers ,i could use the name as identifier however i wanted to see if it was doable .

@sappo
Copy link
Member

sappo commented Mar 11, 2017 via email

@DRTEK
Copy link
Author

DRTEK commented Mar 11, 2017

yes i think it is right way to go
thanks

@bluca
Copy link
Member

bluca commented Mar 11, 2017

Cool. Closing now since it's solved.

@bluca bluca closed this as completed Mar 11, 2017
@wesyoung
Copy link
Contributor

wesyoung commented Mar 12, 2017

fwiw, i've tried something like this in the past- the lesson learned? don't try to track/set uuid's. it just gets messy. we ended up using the HEADER for something like that. seemed to work ok. we augmented it a little with a local routing table in the peer that held node names (which i think may have been overkill, but we were learning the framework and messing around a bit).

@sappo
Copy link
Member

sappo commented Mar 12, 2017

@DRTEK not sure if this helps in your case, but zyre allows you to set the public name of its node. Which is the first 6 characters of the uuid by default. The problem was that the API call to set this name (set_name()) was not exposed in the header file until now.

PR #527 fixes this!

@DRTEK
Copy link
Author

DRTEK commented Mar 15, 2017

sure it does 👍 thank you very much ..
if i may i have one more question (sorry i do not know where to ask questions about the library )

  • is it okay to pass the zactor_t as an argument to different threads so main and another thread can send messages to the thread ? (please see below)

    zactor_t *cluster_actor = zactor_new(createnode, clusternode);

    zactor_t *wireless_actor = zactor_new(startwilo, cluster_actor);
    thanks alot

@bluca
Copy link
Member

bluca commented Mar 15, 2017

no, actors (and zmq sockets) must not be passed among threads

@DRTEK
Copy link
Author

DRTEK commented Mar 15, 2017

can you point me to two way communication sample between threads ? please

@bluca
Copy link
Member

bluca commented Mar 15, 2017

a zmq socket of type ZMQ_PAIR and endpoint inproc://

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants