Skip to content

Transactions API #95

@d-r-q

Description

@d-r-q

Currently qbit uses traditional transactions api: begin/act/commit/rollback.

But this such api allows concurrent transactions and requires either keep all transaction data in memory or allow concurrent writes.

Some modern DBs (datomic, voltdb) uses another (stored procedures-like) approach, where user calls code, that is sequentially executed within DB. This approach eliminates concurrency in transaction processing what is especially important in qbit due to kotlin/native memory model.

But this approach make tricky implementing transaction, which requires additional IO (e.g. read some data from DB, execute several http requests basing this data and write results into db).

Consider switch to db-functions transactions API.

Can this API support spring-like approach to transactions - one class upper on stack manages transaction and another classes down on stack works with it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    apichooseIssues, where there are several alternatives to consider and choosemultiplatformIssues related to multiplatform supportrefactoringresearch

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions