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

Initial User Defined Functions (UDFs) proto example. [WIP] #99

Merged
merged 1 commit into from
Jan 15, 2016

Conversation

nathanielc
Copy link
Contributor

Initial Protocol definition for communicating with child processes.

Includes a working example in udf_example where the go code spawns the python server and communicates with it via STDIN and STDOUT.

The proto file here udf/udf.proto is the meat of this PR.

This example uses varint + protobuf encoded streams of data over the sockets to the process.

I decided not to use the RPC framework in proto3 since using it would require writing our own version of gRPC. More thoughts on the design are in the issue #72.

@nathanielc nathanielc mentioned this pull request Dec 16, 2015
//
// A KeepAliveRequest/KeepAliveResponse system is used to ensure that
// the process is responsive. Every time that a KeepAliveRequest is sent
// a KeepAliveResponse must be returned within a timeout. If too many heartbeats
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would modify this so that any message received by Kapacitor from STDOUT should reset the timer, because the process is obviously still alive?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

@nathanielc nathanielc force-pushed the nc-issue#72 branch 3 times, most recently from 882c01d to eff62a3 Compare December 23, 2015 18:23
@nathanielc nathanielc force-pushed the nc-issue#72 branch 4 times, most recently from 2f2ecf9 to 41aacf4 Compare January 7, 2016 20:49
@nathanielc nathanielc force-pushed the nc-issue#72 branch 6 times, most recently from d23cd5e to bb816f6 Compare January 14, 2016 23:43
@nathanielc
Copy link
Contributor Author

This is nearly done. Just need to:

  • Add docs for how to use UDFs, much of this already exists in udf.proto.
  • Add tests for the agent code. I want a utility that can test your custom written UDFS external to the Kapacitor process so you can iterate on them easily.

@nathanielc nathanielc force-pushed the nc-issue#72 branch 3 times, most recently from cdbf1bf to 600562b Compare January 15, 2016 22:45
nathanielc pushed a commit that referenced this pull request Jan 15, 2016
User Defined Functions (UDFs)
@nathanielc nathanielc merged commit 8137a76 into master Jan 15, 2016
@nathanielc nathanielc deleted the nc-issue#72 branch January 15, 2016 23:52
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

Successfully merging this pull request may close these issues.

2 participants