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

Need instrumented client-side calls. #8

Open
magnusfeuer opened this issue Feb 1, 2019 · 0 comments
Open

Need instrumented client-side calls. #8

magnusfeuer opened this issue Feb 1, 2019 · 0 comments

Comments

@magnusfeuer
Copy link
Member

We need a second generated client call for each DSTC_CLIENT-registered function that allows us to track its queuing and remote execution.

If the standard call is

int dstc_print_name_and_age(char name[32], int age);
then the tracking call would be

int dstc_track_print_name_and_age(dstc_context_t* context, delivery_callback_t delivery_cb, int* recipient_count, user_data_t user_data, char name[32], int age);
The return value is picked from errno.h and tells the caller if the call was successfully queued at the client side for transmission to the servers.

The arguments are as follow:
dstc_context_t* context
Caller-provided context to be used instead of the default one setup in the background by DSTC. Allows for detailed event and traffic management.

delivery_callback_t delivery_cb
Callback to invoke for every successful or failed delivery of the call to one of the registered servers. Please note that execution can still fail due to server-side errors.

int* recipient_count
Will be set to the number of servers that the call will be delivered to. The delivery_cb callback will be invoked once for each server.

user_data_t user_data
Caller-supplied user data enum that can be a pointer, uint32, uint64, etc. Will be provided with each call to the callback defined in delivery_callback, allowing the delivery callback to be tied to the original dstc_track_print_name_and_age() call.

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

1 participant