quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.73k stars 2.67k forks source link

Implement shared Redis Server with DevServices #18029

Closed machi1990 closed 3 years ago

machi1990 commented 3 years ago

Description

Ability to reuse a shared server launched by dev services across multiple Quarkus apps

Implementation ideas

This should be label based discovery just like what we have for Kafka and AMQP

quarkus-bot[bot] commented 3 years ago

/cc @cescoffier, @gsmet, @stuartwdouglas

patrox commented 3 years ago

@machi1990 I saw a related PR for label-based discovery for Kafka and I could work on this one. Is that fine with you?

machi1990 commented 3 years ago

@patrox thanks, yes that's fine with me. The label-based discovery is indeed the way to go here.

stuartwdouglas commented 3 years ago

@cescoffier and I have been talking about refactoring the label code to be more generic rather than something each extension has to implement, however I am not sure about when we will get to it. Just be aware that if you do a copy/paste of the Kafka label code depending on the timing it may end up needed to be changed to use our new generic discovery mechanism (if this goes in first then we would just update as part of implementing the generic discovery).

patrox commented 3 years ago

@stuartwdouglas Actually you are reading my mind - as I also noticed an opportunity to refactor this "label-based container discovery" code, so it can be easily re-used by other extensions which will be supporting shared containers based on dev services config.

Do you have any plans for when and how to do it? As I can also propose some potential solutions, as I will have a good chance to extract these common parts.

For now, I'm basing my work on Kafka change - as soon as it will work, I can refactor it as well.

stuartwdouglas commented 3 years ago

I haven't really thought about the specifics too much. I would probably create a new module in the extensions/devservices directory to hold common code, and then just move as much code as you can into there for now. That would be a good start and if we want to do any more we can build on it later.

machi1990 commented 3 years ago

Closed by https://github.com/quarkusio/quarkus/issues/18181

Thanks @patrox.