-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AQ support via R2DBC #27
Comments
Thanks for this suggestion! I haven't worked with AQ before, so my knowledge of this technology is really minimal. It certainly does seem that Publisher would be the most natural abstraction for an asynchronous queue, so that's something. I'll plan to do some more research and just see what it would take to implement this. I'll also bring this to the attention of product management at Oracle and get their thoughts as well. I'll update this issue once I know more. |
I don't feel that I've settled on a solution yet, but I'd like to share some thoughts I have at this point. The R2DBC SPI is designed for SQL execution with a relational database. AQ requires APIs to enqueue and dequeue messages from a remote queue. These seem to represent two different use cases. So my first instinct is that while the R2DBC SPI is great for executing SQL, it might not be the greatest API for communicating with remote message queue. One idea that I want to explore is what we can do with the javax.jms SPI. https://docs.oracle.com/javaee/7/api/javax/jms/MessageConsumer.html Oracle AQ has a javax.jms implementation. If this implementation provides asynchronous callbacks, backpressure, and non-blocking I/O, then we should have all the ingredients need to implement a Publisher on top of this: At this point, I'm leaning towards a separate library designed for message queues as the right solution, rather than extending Oracle R2DBC. But I'd like to discuss more, and consider alternative ideas. As stated, I have no experience working with message queues, so I could benefit from hearing a perspective that is more informed about the message queue use case. |
To the user, this is "just" (dreaded word, I know) a stored procedure call to some non-blocking version of Perhaps this is no different from a procedure call to a procedure returning results via In the past, I've found it challenging to integrate with AQ via JDBC, which was too bad because AQ is such useful technology. I really think this is a great use-case for both AQ and R2DBC, and a very distinct use-case from my past user point of view. I run a query ( I don't think a JMS client is a bad idea. It fits well in an Java EE paradigm, but one approach doesn't exclude the other. I can't stress this enough: AQ is a very underrated piece of Oracle technology. PostgreSQL has this |
Re the Postgres example: All this makes only sense by the fact that the R2DBC Postgres driver uses a push-based I/O mechanism. The driver keeps reading incoming frames. Since notifications are not a response to a SQL command, these are generally made available through a |
This is going to be out of scope for R2DBC, but I don't know where else to place this idea, except to send an email to @gvenzl :-) Imagine this. Some new synthetic syntax like this: STREAM a, b
FROM my_aq
WHERE x = 1 The actual syntax is not important. This And BAM. Oracle Database has its own Kafka SQL language, which would be a no-brainer to integrate with from R2DBC, all backed by AQ, but people wouldn't have to worry about the low level AQ details and laborious infrastructure logic anymore. |
FWIW, this is something a lot of folks keep asking, to obtain a live view of data (mostly speaking about new data being inserted) where a |
Oracle calls this Database Change Notification. Our reactive extensions to JDBC don't currently cover Database Change Notification, but they could be extended to do so. We could provide native support for an R2DBC API that provides this capability.
Nothing here should be construed as making any commitment by Oracle.
Douglas
On Apr 27, 2021, at 12:12 AM, Mark Paluch ***@***.******@***.***>> wrote:
FWIW, this is something a lot of folks keep asking, to obtain a live view of data (mostly speaking about new data being inserted) where a SELECT-like projection doesn't complete but the result cursor remains open (similar to MongoDB's tailable cursors).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/oracle/oracle-r2dbc/issues/27*issuecomment-827371993__;Iw!!GqivPVa7Brio!MyNbwg2WaJ2DadDDiS3pToBulZSam_55WTJKUrx9fSBZPLpJOA1E68pZle7sgzG7Bt4$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AARZS6OLNFDLTA7ZSWQRTK3TKZPXPANCNFSM43BBSJ6A__;!!GqivPVa7Brio!MyNbwg2WaJ2DadDDiS3pToBulZSam_55WTJKUrx9fSBZPLpJOA1E68pZle7s-AL6N4g$>.
|
Maybe it's premature, but I can hope :)
One awesome Oracle feature that could greatly profit from R2DBC support is Oracle AQ. Instead of blocking on
DBMS_AQ.DEQUEUE
calls, I could imagine aPublisher
per queue that clients could subscribe to in various ways. Are there any plans for this yet, or too soon?The text was updated successfully, but these errors were encountered: