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

Generalized hook interface? #29

Closed
jeremytregunna opened this issue Jul 25, 2016 · 7 comments
Closed

Generalized hook interface? #29

jeremytregunna opened this issue Jul 25, 2016 · 7 comments

Comments

@jeremytregunna
Copy link

Is there any thought going on or something I've maybe missed about writing custom outputs for hooks? As in, we can define webhooks right now, but in my application, I don't use HTTP at all, and would like to be able to call back to clients via some other protocol. To support this, there'd need to exist some generalized hook interface that could support multiple protocols. Is this something that is interesting enough to consider?

@tidwall
Copy link
Owner

tidwall commented Jul 25, 2016

As it stands right now, there are no plans for a generalized hook interface. Currently Tile38 supports HTTP, WebSockets, Disque. There is also the ability to connect directly to a raw socket which would allow for a middleware microservice to deliver messages in a custom manner.

That being said, I suppose it's not too far fetch to add support for more protocols. Out of curiosity, which protocols do you have in mind?

@jeremytregunna
Copy link
Author

@tidwall I'm working with MQTT at the moment.

@tidwall
Copy link
Owner

tidwall commented Sep 14, 2016

Commit 3b99a62 includes the first steps to a more generalize interface for Hooks. The root package is in the controller/endpoint directory. There's still more work to be done, but it's a start.

@tidwall
Copy link
Owner

tidwall commented Dec 6, 2016

The custom endpoint interface is stable has been in use in production for a few months. I would be more than happy to advise anyone who wants to add a custom implementation such as MQTT.

@tidwall
Copy link
Owner

tidwall commented Dec 6, 2016

It may also be worth noting that with next release of Go 1.8 could possible extend the custom endpoints to support Go Plugins

@tidwall
Copy link
Owner

tidwall commented Mar 7, 2017

The Go Plugins isn't as great as I hoped. It's not cross platform and requires cgo attributes. For now we'll need to stick with current process of adding new hooks. The recent Kafka PR is good example.

I do think we should add MQTT support though and added a feature request to #154.

@tidwall tidwall closed this as completed Mar 7, 2017
@tidwall
Copy link
Owner

tidwall commented Mar 11, 2017

@jeremytregunna Not sure if this is still something you're interested in but there's a MQTT PR in the pipeline #155. Any feedback would be greatly appreciated. Thanks!

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

No branches or pull requests

2 participants