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

Server's engine does not notify server when a configuration has changed #325

Open
hurtonm opened this issue Jul 10, 2016 · 5 comments
Open

Comments

@hurtonm
Copy link
Member

hurtonm commented Jul 10, 2016

It might be useful if server's engine generated with zproto_server_c.gsl could call a user defined function when one or more configuration parameter changes. Now it calls only functions internal to engine.

@sappo
Copy link
Member

sappo commented Jul 11, 2016

A nicer solution (IMO) would be to send a notification message through the callers pipe.

@hurtonm
Copy link
Member Author

hurtonm commented Jul 11, 2016

I am a bit unsure about the terminology here.
zproto_server_cerver_c.gsl generates a generic server's engine which is to be included in the server code. The server code is written by the user and is problem specific.
Engine can detect the configuration file has changed and apply the changes. What I need is somehow notify the server part (that problem specific, in case of malamute mlm_server.c) that the configuration has changed.

Or do you mean to exploit the server_method function?

@sappo
Copy link
Member

sappo commented Jul 11, 2016

The generated server is a czmq actor and thus owns a pipe to its caller. (see https://github.com/zeromq/zproto/blob/master/src/zproto_server_c.gsl#L275)

Through that pipe the user can enable verbose logging, set the binding endpoint, etc (see https://github.com/zeromq/zproto/blob/master/src/zproto_server_c.gsl#L875).

And through this pipe the server could notify the caller about configuration changes! I hope the clarifies it :)

@hurtonm
Copy link
Member Author

hurtonm commented Jul 11, 2016

Still confused, sorry.
Let me explain through example. There is server_method function which engine calls (still referring to zproto_server_c.gsl). This function is to be implemented by programmer, and is part of server customization. What do you call that part of the server, which is implemented by programmer (as opposed to engine, which is generated)?

@sappo
Copy link
Member

sappo commented Jul 11, 2016

Okay, now I understand your problem. Server custom part vs server generated part is fine as terminology. To inform the server custom part from the server generated part (aka. server engine) a callback method would be useful indeed.

I though that you were trying to inform the user of the server (custom + generated). So forget about the pipe idea ;)

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

2 participants