--
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/CALt0%2Bo-i%3DoFrK8Q6jRfqPEGrR05Osng1CmwshWGikV3%2Br5Kxvw%40mail.gmail.com.
This wasn't a mistake but a known limitation of the PR that introduced reactive SQL clients.The solution is to support named datasources in reactive SQL clients.
On Mon, Dec 16, 2019 at 2:42 PM Thomas SEGISMONT <tsegi...@gmail.com> wrote:This wasn't a mistake but a known limitation of the PR that introduced reactive SQL clients.The solution is to support named datasources in reactive SQL clients.How does it solve the issue?
You can't have two config root classes sharing the same root.
If we wanted to fully support that, we would need a shared config root and a way to differentiate which extension manages which datasource. That's one of the possibility to solve this particular issue.
The other I can see being different roots.
--Guillaume
In your first use case, the user can configure the ORM with the default datasource and the Reactive SQL client with a named datasource.In your second use case, the user can configure the Reactive Pg Client with a named datasource, and the Reactive MySql Client with another named datasource.
You can't have two config root classes sharing the same root.I've heard this before and asked where this limitation is coming from but got no reply.
I don't fully understand your concern but wouldn't having a technical extension named datasource that publish a build item consumable by agroal and the reactive db be enough?
--
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/CALt0%2Bo-B42KdSuVyBdwmrrCdAJy7fNN24QzNWgm_KS9K17SG5A%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/CALt0%2Bo-B42KdSuVyBdwmrrCdAJy7fNN24QzNWgm_KS9K17SG5A%40mail.gmail.com.
I don't fully understand your concern but wouldn't having a technical extension named datasource that publish a build item consumable by agroal and the reactive db be enough?
--
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/CALt0%2Bo_xZuuun8O-Qw3-z-1zFXj-To2%2BNs82VxxT_uw_SfFF1Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANghgrRov-9oCaYbKZ-nA%3DYzoEUmsayrCwdGSGKv2MFcun4bpA%40mail.gmail.com.
They don't need a distinct namespace IMO; only the actual conflicting
properties need to be factored out. If necessary we could add a
`...reactive.enable=false` and/or `...agroal.enable=false` kind of
switch I think.
If you're using both reactive and non-reactive in the same project,
pointing to the same database, you're probably going to want to use
the same credentials and other common config too, right?
As for why named data sources don't fix the problem: it's the
extension loader itself that will fail if two configuration properties
on the class path have the same property name. It is disallowed, and
therefore it is generally not a good idea to do it even if two
extensions with the same property are unlikely to be used together
--Stéphane Épardaud
--
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/CAKU9E9t6mKi%3DD54LmhD-iBYe_WJ47xrJXJ8n6kJFK2qqHtW2cA%40mail.gmail.com.
Well, let's make a clear plan, create an issue and I'm pretty sure I will be able to find someone.What should we do for the configuration knobs that have a sense only for Agroal? I see the specific reactive configuration is in its own namespace.
On Mon, Dec 16, 2019 at 4:03 PM Stephane Epardaud <stephane...@gmail.com> wrote:
Well yeah, we've wanted to fix it for months and still lack the person to do it :(
On Mon, 16 Dec 2019 at 15:54, Guillaume Smet <guilla...@gmail.com> wrote:
--On Mon, Dec 16, 2019 at 3:38 PM Emmanuel Bernard <eber...@redhat.com> wrote:I don't fully understand your concern but wouldn't having a technical extension named datasource that publish a build item consumable by agroal and the reactive db be enough?
My concern is that what we currently have doesn't work, that we had 2 reports lately and that we need to fix it. Nothing more.Keeping the `datasource` namespace for all can work as long as we have a shared config root (i.e. not the way it is right now with one root per extension) and it will have constraints - see below. The other option is to use different roots, which looks like something you wanted to avoid.ÂYour proposal could work as long as:- configuration is mostly similar. Dealing with specific configuration might get ugly. Agroal currently has far more configuration knobs than the Reactive datasources. Either we are able to consume the config for the reactive datasources or some configuration knobs will work and some not.- we add something to differentiate which extension should deal with which datasource: using URL is not a possibility as it's runtime defined. One possibility would be to use the driver and introduce the driver in the reactive extensions.Again, I'm not saying it can't be fixed, I'm saying we need to fix it and the current situation is not acceptable.--Guillaume
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 quark...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CALt0%2Bo_xZuuun8O-Qw3-z-1zFXj-To2%2BNs82VxxT_uw_SfFF1Q%40mail.gmail.com.
--Stéphane Épardaud
OK, so perhaps the problem is that you consider ...
--
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/C6E0423A-C6F1-4564-BAE5-18D4B2E616F8%40redhat.com.
I am indeed :D
Good question, I don't think sharing the high level values work. I was after sharing the high level structure.
So for flyway it would be
deps:
- reactive-postgresql-extension
- jdbc-postgresql-extension
#reactive bit
quarkus.datasource.forapp.url=reactive:postgresql://postgres/table
quarkus.datasource.forapp.user=foo
quarkus.datasource.forapp.password=bar
#blocking bit
quarkus.datasource.forflyway.url=jdbc://postgres/table
quarkus.datasource.forflyway.driver=org.postgresql.Driver #should be quarkus.agroal.forflyway.driver?
quarkus.datasource.forflyway.user=foo
quarkus.datasource.forflyway.password=bar
quarkus.agroal.app.on-error=shut-up
I'm not sure if people were after one datasource for both reactive and imperative in the same app from a single declaration or not. But again that's a bit of a special case Flyway not being reative friendly but wanting to share the same config as it's seen as a single unit of work (schema + SQL statements).
Emmanuel
--
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/88597cbe-a3b1-4b0e-98c9-14a0c20d172e%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/quarkus-dev/3r0lquVsUsc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/5C6DD610-CF61-423B-819B-779B7BE62004%40redhat.com.
So in that configuration example, what is the value of `quarkus.agroal.app.on-error=shut-up`? If people are going to have to configure 2 separate blocks for reactive and imperative data sources anyway, why not let them have separate config roots where each has full control over the listed/documented config? This would avoid awkward situations in doc where we have to say "property foo applies to reactive but not imperative" or "property X here corresponds to property Y on the Vertx-sql-client API".
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CAHiR6Z_BmSg_Vcjpp4y-b7qph04iJtt5_YGDLBpHBvf8JECWnQ%40mail.gmail.com.
Yes I am warming up to the idea. The simplification I was hoping is not materializing.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/A012B47C-12A7-42F6-ACCC-2D753FDEB249%40redhat.com.
Taking my previous example
deps:
- reactive-postgresql-extension
- jdbc-postgresql-extension
#reactive bit
quarkus.reactive-datasource.url=reactive:postgresql://postgres/table
quarkus.reactive-datasource.user=foo
quarkus.reactive-datasource.password=bar
#blocking bit
quarkus.datasource.url=jdbc://postgres/table
quarkus.datasource.driver=org.postgresql.Driver #should be quarkus.agroal.forflyway.driver?
quarkus.datasource.user=foo
quarkus.datasource.password=bar
quarkus.datasource.on-error=shut-up
So we clearly say that blocking and non blocking datasources are different beasts and that extensions will know whether they want to use the blocking or non blocking one. Therefore these are two different namespace not only in config name but also in data source names. If you want a blocking and a non blocking access to the same database, you will dupe the URL and username / password.
Flyway for reactive again can be treated as a special workaround case.
#reactive datasource a
quarkus.datasource.a.url=reactive:postgresql://postgres/table
quarkus.datasource.a.user=foo
quarkus.datasource.a.password=bar
#blocking datasource b
quarkus.datasource.b.url=jdbc://postgres/table
quarkus.datasource.b.user=foo
quarkus.datasource.b.password=bar
quarkus.datasource.b.jdbc.driver=org.postgresql.Driver #should be quarkus.agroal.forflyway.driver?
quarkus.datasource.b.agroal.on-error=shut-upquarkus.datasource.b.jdbc.driver=org.postgresql.Driverquarkus.datasource.a.vertx-reactive.idleTimeout=30#reactive datasource a
quarkus.vertx.sql-client.a.url=reactive:postgresql://postgres/table
quarkus.vertx.sql-client.a.user=foo
quarkus.vertx.sql-client.a.password=bar
#blocking datasource b
quarkus.datasource.b.url=jdbc://postgres/table
quarkus.datasource.b.user=foo
quarkus.datasource.b.password=bar
quarkus.datasource.b.driver=org.postgresql.Driver
I don't like the ref to vertx in the namespace. I hope it won't happen but I'd rather have a generic reactive-datasource definition here just like we have a generic datasource usage for agroal. So that other techs can reuse that information to boot itself.
--
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/34d3c2ce-6139-4702-ab76-9c4db3dee746%40googlegroups.com.
#reactive datasource aquarkus.database.a.url=reactive:postgresql://postgres/tablequarkus.database.a.user=fooquarkus.database.a.password=bar
#blocking datasource bquarkus.datasource.b.url=jdbc://postgres/tablequarkus.datasource.b.user=fooquarkus.datasource.b.password=barquarkus.datasource.b.driver=org.postgresql.Driver
That's the first example I got but my pov is that it failed to solve the problem because these are too deeply different things, see my other messag ein a minute or two.
as the user's intent is to use Reactive primarily; is it ok to you all
that the injection point type of the "Datasource" will changes type
when the url is reconfigured to a non-reactive url?
N.B. I've been annoying you about the actual *type* being different,
as dependency injection being resolved at build time, it implies that
this specific property would not be able to change from reactive to
non-reactive after build; that's a new class of configuration
properties, and would require a new kind of runtime validation.
N.B./2 which extensions do I need on classpath?
Documentation will need to reiterate all over that the dependencies
needed in the project are going to be different depending on such
properties. I don't like that as it's going to be hard to provide easy
to understand error messages but I suppose you might be able to
mitigate this in various ways - just please don't ignore this
additional hurdle.
On Dec 20, 2019, at 5:07 AM, Stephane Epardaud <stephane...@gmail.com> wrote:On Fri, 20 Dec 2019 at 11:52, Sanne Grinovero <sa...@hibernate.org> wrote:as the user's intent is to use Reactive primarily; is it ok to you all
that the injection point type of the "Datasource" will changes type
when the url is reconfigured to a non-reactive url?It's not exactly that it changes type, it's more that EntityManager injections stop working and SqlClient start working when you change it, but it feels similar in effect, I agree.Didn't think about that. I guess we don't have an equivalent when changing jdbc drivers.
--
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/AAC43A9C-8163-46C7-9435-E33F328A5EBE%40redhat.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/CANghgrTsbqN65MCjKSn0A3O1AMEs9OqVTFp_Mni%3DKjPyq18yEw%40mail.gmail.com.
Yeah, getting rid of JDBC URLs and driver class names has my vote.
We'll need to assume "quarkus.datasource.my-db.jdbc=true" is the
default for backwards compatibility, but it's easy enough to set to
false, or have it controlled by the presence of the needed
dependencies; pretty much everything else except the address should be
optional.
Hopefully no other objections?
--ÂGuillaumeÂ
--
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/CALt0%2Bo-_hQ59i4ivQ%3D6CSkUHe29V8PB9dmnrABjSUAT97HZM4Q%40mail.gmail.com.
>> To unsubscribe from this group and stop receiving emails from it, send an email to quark...@googlegroups.com.
People feel it is ease of use compliant? I have to admit, my initial reaction was that it was complicated but I held off initial judgement. And it's getting better on me.
First, aside from the fairly specific Flyway + reactive DB access where sharing is making things easier, I do think more and more that reactive and JDBC datasources are different and significantly alter how one writes an app. So not sharing the definition is ok for me. Of course if we share and see no drawback, even better.
With that said, couple of questions / remarks:
postgresql settings. Will I be able to add more and specifically more databases? Should these extra definitions live in the shared "datasource config" technical extension? Or can they be split?Emmanuel
PS we would need an old datasource setting to new datasource setting backward compatibility mode.
People feel it is ease of use compliant? I have to admit, my initial reaction was that it was complicated but I held off initial judgement. And it's getting better on me.
First, aside from the fairly specific Flyway + reactive DB access where sharing is making things easier, I do think more and more that reactive and JDBC datasources are different and significantly alter how one writes an app. So not sharing the definition is ok for me. Of course if we share and see no drawback, even better.
With that said, couple of questions / remarks:
- I see you set specific
postgresqlsettings. Will I be able to add more and specifically more databases?
- Should these extra definitions live in the shared "datasource config" technical extension? Or can they be split?
- we most likely need to allow raw JDBC URLs as well. There are many cases where passing a property via the URL is a lifesaver in case the upper framework does not expose some obscure feature of the database.
- I see you used some property as both leaf and node (JDBC), how does that look in YAML?
On Fri, 3 Jan 2020 at 12:58, David Lloyd <david...@redhat.com> wrote:
>
> On Fri, Jan 3, 2020 at 6:33 AM Emmanuel Bernard <eber...@redhat.com> wrote:
>>
>> People feel it is ease of use compliant? I have to admit, my initial reaction was that it was complicated but I held off initial judgement. And it's getting better on me.
>>
>> First, aside from the fairly specific Flyway + reactive DB access where sharing is making things easier, I do think more and more that reactive and JDBC datasources are different and significantly alter how one writes an app. So not sharing the definition is ok for me. Of course if we share and see no drawback, even better.
>>
>> With that said, couple of questions / remarks:
>>
>> I see you set specific postgresql settings. Will I be able to add more and specifically more databases?
>
> Yes.
>>
>> Should these extra definitions live in the shared "datasource config" technical extension? Or can they be split?
>
> They should be split. Each property would only live within its defining extension: generalized datasource support, generalized blocking and/or reactive support, specific driver support.
>>
>> we most likely need to allow raw JDBC URLs as well. There are many cases where passing a property via the URL is a lifesaver in case the upper framework does not expose some obscure feature of the database.
>
> This is something of a recurrent topic, isn't it? And we vacillate quite a lot about our philosophy here. I'm still opposed to configuration back doors. I think it's better to add properties as needed to the per-driver extension. Maybe even add them all up front. But I'm not immovable on that.
I'm +1 to not allow "configuration backdoors", we should at least try
to stand our ground there.
Yet having the traditional JDBC URL allows a nice copy/paste
experience from documentation of databases, and other tools, so
there's at least some merit in allowing it - perhaps just veto any
property?
Another reason to separate at least the JDBC properties into ad-hoc
properties is that we'd be able to override the defaults from the JDBC
driver - in some cases they really should: not going to nit-pick now
on specific odd choices, let's keep it at the fact that having this
capability would be nice.
BTW - not sure who said this but it's worth clarifying - it's not
strictly true that all JDBC drivers connect to "some hostname"; some
of the newer storage toys are more PaaS oriented and as such use
different forms of identification encoded in the URL; but that's
simple to support of course, we'd just have different specific
properties for such weird ones :)
Just keep it in mind as the set of properties shared across all
databases is getting smaller.