Are there any plans for TRIGGERS/PROCEDURES of any kind on the ScyllaDB Roadmap

A single outbox table is definitely the way to go - but it is not clear exactly why you would need a trigger. In fact, there are concerns to that, eg: tables can have a different partition (thus making your updates to end up on different set of replicas), or even in different DCs (should the table in keyspace live in a different keyspace), all of which could introduce an availability concern and make your trigger to fail (or worse, accumulate and over time degrade the entire system performance).

What is feasible is to write to both your primary datastore and to an outbox table, and then consume the tail (with CDC or not) of the outbox table overtime.

However, I see where you are coming from given Are BATCH insert/update into different tables logged + "safe"? (which is ultimately tied to scylladb/scylladb#13390), but you will ultimately need to decide whether you will batch both entries (to different tables) altogether, or concurrently write.

For batching, this will incur an entry on the batchlog, and the updates will be done asynchronously. So it may happen that you consume an event from the outbox table before a record gets persisted in the main service table (though that should be rare), but it doesn’t mean that the main table record is lost, as there’s a built-in retry mechanism to ensure that all entries eventually are applied.

For parallel writes, you would need to work around the old fashioned “dual write” problem, so indeed not fun.

1 Like