Hi Everyone,I have been thinking a bit about DevServices 2.0, and I think there are a few additional features we could add:- Persistent ContainersBasically give the containers we start an ID that ties them to the current project, and allow them to survive shutdown and be re-used. This would be really useful for things like running a test from the IDE, as we would not need to wait for the container to start each time.
- Kube supportIf a developer does not have docker installed, but does have access to a cluster, it would be great if we could use that cluster to run their services. Either start the services on the cluster and port forward, or seamlessly setup remote-dev and run everything on the cluster. This won't be zero-config like DevServices is locally, but could still be a hugely useful tool.- Shared / Configurable ContainersThis is based on something Clement brought up today, Kafka is not very useful if you only have a single application connected to it. I think it would be useful to specify other applications as dev services targets, and have them automatically wire themselves up via service bindings.Basically if I have a producer and a consumer Kafka app, and I am working on the consumer, I could configure Quarkus to automatically start the producer app, and have it wire up the same Kafka based on service binding information. Potentially this could be transitive for other Quarkus applications, so in an ideal world you could ask to start your dependencies, and they would also start their dependencies, and everything would just wire itself up automatically (using service bindings to resolve shared services).
I am not going into specifics here, because there is a lot of complexity in implementing this well, but I am interested in people's thoughts.
--Stuart
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD%2BL2cyRiKfqHezfQNHawzRu-H_%3DX2UnWRbOo83o9RiMVz7%2BQw%40mail.gmail.com.
- Persistent ContainersBasically give the containers we start an ID that ties them to the current project, and allow them to survive shutdown and be re-used. This would be really useful for things like running a test from the IDE, as we would not need to wait for the container to start each time.
- Kube supportIf a developer does not have docker installed, but does have access to a cluster, it would be great if we could use that cluster to run their services. Either start the services on the cluster and port forward, or seamlessly setup remote-dev and run everything on the cluster. This won't be zero-config like DevServices is locally, but could still be a hugely useful tool.
- Shared / Configurable ContainersThis is based on something Clement brought up today, Kafka is not very useful if you only have a single application connected to it. I think it would be useful to specify other applications as dev services targets, and have them automatically wire themselves up via service bindings.Basically if I have a producer and a consumer Kafka app, and I am working on the consumer, I could configure Quarkus to automatically start the producer app, and have it wire up the same Kafka based on service binding information. Potentially this could be transitive for other Quarkus applications, so in an ideal world you could ask to start your dependencies, and they would also start their dependencies, and everything would just wire itself up automatically (using service bindings to resolve shared services).
Hello,Le mar. 1 juin 2021 à 13:09, Stuart Douglas <sdou...@redhat.com> a écrit :Hi Everyone,I have been thinking a bit about DevServices 2.0, and I think there are a few additional features we could add:- Persistent ContainersBasically give the containers we start an ID that ties them to the current project, and allow them to survive shutdown and be re-used. This would be really useful for things like running a test from the IDE, as we would not need to wait for the container to start each time.When do you stop them? It is up to the user to kill the running containers once done, or do we need a session concept? Test Containers is using Ryuk as a watchdog, the same kind of mechanism could be used.
- Kube supportIf a developer does not have docker installed, but does have access to a cluster, it would be great if we could use that cluster to run their services. Either start the services on the cluster and port forward, or seamlessly setup remote-dev and run everything on the cluster. This won't be zero-config like DevServices is locally, but could still be a hugely useful tool.
--- Shared / Configurable ContainersThis is based on something Clement brought up today, Kafka is not very useful if you only have a single application connected to it. I think it would be useful to specify other applications as dev services targets, and have them automatically wire themselves up via service bindings.Basically if I have a producer and a consumer Kafka app, and I am working on the consumer, I could configure Quarkus to automatically start the producer app, and have it wire up the same Kafka based on service binding information. Potentially this could be transitive for other Quarkus applications, so in an ideal world you could ask to start your dependencies, and they would also start their dependencies, and everything would just wire itself up automatically (using service bindings to resolve shared services).Another solution might be to implement some very light discovery/inventory mechanism that would allow quarkus runs (dev and test) to check the dev services that are running. A rough idea would be to have a specific port and start a simple HTTP server if the port is available (otherwise it means the discovery service is already running). When you start a dev service, you register the service (the same key/value as we have today, maybe a bit more). So, when we need to start a dev service, we can connect to that discovery service. If it's there, and the service is available, we just use that, if not we start it and register it. The discovery service would kill itself if nothing is registered for some time.Such a mechanism could be used for the persistent containers if we can track the start/stop of the quarkus app. When the last one stops, we terminate all the persistent containers.Note that the inventory can be also a container and we can use the docker host API to discover it.
Finally, as we are using test containers, we could query the label of running containers (and add labels when we start them). It would not enable persistent containers, but avoid running an inventory service.ClementI am not going into specifics here, because there is a lot of complexity in implementing this well, but I am interested in people's thoughts.--Stuart
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAD%2BL2cyRiKfqHezfQNHawzRu-H_%3DX2UnWRbOo83o9RiMVz7%2BQw%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKW6fifMz6GWYq8e%2BrHCEpX5%2BjuP-1xAp2Maab9rn8Kq3_SyeQ%40mail.gmail.com.
On Tue, 1 Jun 2021 at 13:09, Stuart Douglas <sdou...@redhat.com> wrote:- Persistent ContainersBasically give the containers we start an ID that ties them to the current project, and allow them to survive shutdown and be re-used. This would be really useful for things like running a test from the IDE, as we would not need to wait for the container to start each time.Very interesting. I've mostly used a local PG instance for my dev work, and I've always appreciated that whatever test data I put in there while developing my app survived all restarts, until I changed my schema and hibernate recreated the DB and dropped records (in hindsight I would have prefered it tried to evolve my data, but hey).So, +1 for surviving the data, but I'm not even entirely sure how (in the case of Hibernate) we'd keep the data around on the next start.As for auto-shutting down the container after a period of unuse, I've no idea how to do that, but it'd be extra nice if we could dump the data to file on quarkus exit, just in case the container is missing at the next restart.BTW, I'm pretty sure we could reuse existing containers for all applications, just by having them use a separate database. And I'd also love it if we could use existing databases rather than use containers. On Linux it's really trivial to have a PG running without having to docker anything.
- Kube supportIf a developer does not have docker installed, but does have access to a cluster, it would be great if we could use that cluster to run their services. Either start the services on the cluster and port forward, or seamlessly setup remote-dev and run everything on the cluster. This won't be zero-config like DevServices is locally, but could still be a hugely useful tool.Yeah, this makes sense to me, but I'm not sure how common that is for people to have k8s but no docker. Sounds a bit fringe, no?
- Shared / Configurable ContainersThis is based on something Clement brought up today, Kafka is not very useful if you only have a single application connected to it. I think it would be useful to specify other applications as dev services targets, and have them automatically wire themselves up via service bindings.Basically if I have a producer and a consumer Kafka app, and I am working on the consumer, I could configure Quarkus to automatically start the producer app, and have it wire up the same Kafka based on service binding information. Potentially this could be transitive for other Quarkus applications, so in an ideal world you could ask to start your dependencies, and they would also start their dependencies, and everything would just wire itself up automatically (using service bindings to resolve shared services).This sounds _very_ interesting, but what use are auto-started dependency apps if they don't spew out relevant mock information? I'm thinking of micro-services and the other discussion we had around testing and mocking remote services. It's one thing to spin up the remote service rather than mock it, but it still needs to reply intelligible stuff to any calls we make to it, and I'm not sure at all how to do that.
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAKU9E9sfcARgaDHEuWvWaNyE4A0-ZgsSLejn%3DY24JMuhWfHY4Q%40mail.gmail.com.
(They don't need to operate on mock data, they just need to be there and operate normally)...
Hello,Le mar. 1 juin 2021 à 13:09, Stuart Douglas <sdou...@redhat.com> a écrit :Hi Everyone,I have been thinking a bit about DevServices 2.0, and I think there are a few additional features we could add:- Persistent ContainersBasically give the containers we start an ID that ties them to the current project, and allow them to survive shutdown and be re-used. This would be really useful for things like running a test from the IDE, as we would not need to wait for the container to start each time.When do you stop them? It is up to the user to kill the running containers once done, or do we need a session concept? Test Containers is using Ryuk as a watchdog, the same kind of mechanism could be used.
- Kube supportIf a developer does not have docker installed, but does have access to a cluster, it would be great if we could use that cluster to run their services. Either start the services on the cluster and port forward, or seamlessly setup remote-dev and run everything on the cluster. This won't be zero-config like DevServices is locally, but could still be a hugely useful tool.- Shared / Configurable ContainersThis is based on something Clement brought up today, Kafka is not very useful if you only have a single application connected to it. I think it would be useful to specify other applications as dev services targets, and have them automatically wire themselves up via service bindings.Basically if I have a producer and a consumer Kafka app, and I am working on the consumer, I could configure Quarkus to automatically start the producer app, and have it wire up the same Kafka based on service binding information. Potentially this could be transitive for other Quarkus applications, so in an ideal world you could ask to start your dependencies, and they would also start their dependencies, and everything would just wire itself up automatically (using service bindings to resolve shared services).Another solution might be to implement some very light discovery/inventory mechanism that would allow quarkus runs (dev and test) to check the dev services that are running. A rough idea would be to have a specific port and start a simple HTTP server if the port is available (otherwise it means the discovery service is already running). When you start a dev service, you register the service (the same key/value as we have today, maybe a bit more). So, when we need to start a dev service, we can connect to that discovery service. If it's there, and the service is available, we just use that, if not we start it and register it. The discovery service would kill itself if nothing is registered for some time.
Such a mechanism could be used for the persistent containers if we can track the start/stop of the quarkus app. When the last one stops, we terminate all the persistent containers.
Note that the inventory can be also a container and we can use the docker host API to discover it.
Finally, as we are using test containers, we could query the label of running containers (and add labels when we start them). It would not enable persistent containers, but avoid running an inventory service.
On Tue, 1 Jun 2021 at 13:09, Stuart Douglas <sdou...@redhat.com> wrote:- Persistent ContainersBasically give the containers we start an ID that ties them to the current project, and allow them to survive shutdown and be re-used. This would be really useful for things like running a test from the IDE, as we would not need to wait for the container to start each time.Very interesting. I've mostly used a local PG instance for my dev work, and I've always appreciated that whatever test data I put in there while developing my app survived all restarts, until I changed my schema and hibernate recreated the DB and dropped records (in hindsight I would have prefered it tried to evolve my data, but hey).So, +1 for surviving the data, but I'm not even entirely sure how (in the case of Hibernate) we'd keep the data around on the next start.As for auto-shutting down the container after a period of unuse, I've no idea how to do that, but it'd be extra nice if we could dump the data to file on quarkus exit, just in case the container is missing at the next restart.BTW, I'm pretty sure we could reuse existing containers for all applications, just by having them use a separate database. And I'd also love it if we could use existing databases rather than use containers. On Linux it's really trivial to have a PG running without having to docker anything.
- Kube supportIf a developer does not have docker installed, but does have access to a cluster, it would be great if we could use that cluster to run their services. Either start the services on the cluster and port forward, or seamlessly setup remote-dev and run everything on the cluster. This won't be zero-config like DevServices is locally, but could still be a hugely useful tool.Yeah, this makes sense to me, but I'm not sure how common that is for people to have k8s but no docker. Sounds a bit fringe, no?
- Shared / Configurable ContainersThis is based on something Clement brought up today, Kafka is not very useful if you only have a single application connected to it. I think it would be useful to specify other applications as dev services targets, and have them automatically wire themselves up via service bindings.Basically if I have a producer and a consumer Kafka app, and I am working on the consumer, I could configure Quarkus to automatically start the producer app, and have it wire up the same Kafka based on service binding information. Potentially this could be transitive for other Quarkus applications, so in an ideal world you could ask to start your dependencies, and they would also start their dependencies, and everything would just wire itself up automatically (using service bindings to resolve shared services).This sounds _very_ interesting, but what use are auto-started dependency apps if they don't spew out relevant mock information? I'm thinking of micro-services and the other discussion we had around testing and mocking remote services. It's one thing to spin up the remote service rather than mock it, but it still needs to reply intelligible stuff to any calls we make to it, and I'm not sure at all how to do that.