jdswinbank / Comet

A complete VOEvent transport system
http://comet.transientskp.org/
BSD 2-Clause "Simplified" License
23 stars 10 forks source link

Options to use UNIX domain sockets for broker or publisher #59

Closed lpsinger closed 5 years ago

lpsinger commented 5 years ago

Add options to use UNIX domain sockets for all of the connection endpoints available to the broker or publisher.

We operate an instance of comet on a shared system in a computing cluster to which many users have access. When we were using TCP sockets, any local user could submit a VOEvent. Adding command line options to use UNIX domain sockets allows us to control submission access using filesystem permissions.

lpsinger commented 5 years ago

It's also possible to specify Twisted endpoints from strings.

jdswinbank commented 5 years ago

Thank you for this —  PR much appreciated! Unfortunately I'm not able to review it immediately, but I'll take a proper look within the next few days.

jdswinbank commented 5 years ago

I agree with (the implication of) your that reading strings describing endpoints from the command line would be preferably to special-casing each endpoint-type in the code.

When I was originally writing this code, I didn't do that because I wanted to use a ReconnectingClientFactory which isn't supported by the endpoints API. However, it looks like an alternative is now available (and has been for three years now).

I spent a little while this afternoon experimenting with that, and it seems to work quite straightforwardly — see #60, although be aware that that is just a proof-of-concept which doesn't actually do what you want for now.

I'm out of time for the moment, but I'll return to this shortly.

jdswinbank commented 5 years ago

Thanks for this, @lpsinger. Rather than merging it as-is, it prompted me to undertake a rather more extensive overhaul that has just landed on master. I think it addresses your needs, so I'm closing down this PR — if I'm wrong, or if you have any other feedback, please do give me a shout.