tmlibs icon indicating copy to clipboard operation
tmlibs copied to clipboard

WIP Changed Service interface

Open jaekwon opened this issue 7 years ago • 7 comments

Service could be much simplified. We shouldn't be masking race conditions by letting the caller call Start/Stop willy nilly. If one needs to rely on such patterns, it's probably because one has racy buggy software.

Now that we know better, lets refactor and test Tendermint to see how racy it is.

We don't use Restart as far as I know.

jaekwon avatar Dec 26 '17 08:12 jaekwon

@odeke-em I like the idea of protecting everything. What do you think about just removing SetLogger and SetServiceCore from the interface. Both need to be passed into the constructor and then it can only be started and stopped.

adrianbrink avatar Jan 06 '18 11:01 adrianbrink

Just noting that we'll want to expose the quit chan somehow. Maybe Quit() <- struct{}

jaekwon avatar Feb 07 '18 22:02 jaekwon

@greg-szabo let's add this to next release (not 0.16) and discuss on monday

ebuchman avatar Feb 09 '18 06:02 ebuchman

damn we forgot to talk about this. maybe we do need to use an organization level kanban @greg-szabo @jolesbi

ebuchman avatar Feb 12 '18 23:02 ebuchman

@greg-szabo can you put it on the tendermint meeting agenda for next week? alternatively, someone can set up a call to discuss. #zoomzoom 🚗

jbibla avatar Feb 13 '18 14:02 jbibla

We should move the Service to Tendermint. It's the only consumer AFAIK.

Same with the timers!

ebuchman avatar Mar 12 '18 15:03 ebuchman

this PR is now captured in https://github.com/tendermint/tendermint/issues/1882 but let's leave it open for now so the branch doesn't get deleted, or close and delete if obsolete

zramsay avatar Jul 03 '18 13:07 zramsay