Streaming in the database!
I had heard that you could do streaming and transformation in the Oracle Database with nothing but
PL/SQL, and it turns out you can.
My friend Chris Beck shot me over some code that at a very basic level demonstrates the queueing portion of streams.
In a nutshell this code
- creates a database object type to represent our messages
- sets up the queue with the
- creates a dummy source table and populates it with 1000 rows
- enques the 1000 rows with the
- deques one of the rows and prints it’s message
your output should look something like this
for more info start here
Check out the
the Advanced Queueing User’s Guide
and Oracle Streams Concepts and Administration for more about streams
I’d really like to see the streaming capabilities of the database (or adwc) compared to alternatives like RabbitMQ or Apache Kafka. Althought performance might be hard to test I’d just like to see which one is the easiest to implement.
I wonder how we’d test performance between streaming platforms, and what would be our metrics? messages/second? ability to scale horizontally? ability to scale vertically? latency? other features like guarenteed ordering?