portals-project / portals

Portals is a framework for stateful serverless apps, unifying dataflow streaming with actors
https://www.portals-project.org/
Apache License 2.0
19 stars 2 forks source link

Implement transactional support for the SQL engine #226

Closed jspenger closed 1 year ago

jspenger commented 1 year ago

The transactional support is not yet fully integrated into the new syntax. Right now, if transactional mode is activated, it will throw an exception.

See examples:

https://github.com/portals-project/portals/tree/pr216-merge/portals-libraries/src/main/scala/portals/libraries/sql/examples/sqltodataflow https://github.com/portals-project/portals/blob/pr216-merge/portals-libraries/src/main/scala/portals/libraries/sql/sqlDSL.scala

In order to also implement transactions, we need to extract and integrate:

See the current Utils for the non-transactional variants, these have been copy-pasted from the underlying engine, so that we can extract things.

https://github.com/portals-project/portals/blob/pr216-merge/portals-libraries/src/main/scala/portals/libraries/sql/sqlDSL.scala#L158-L277

Once we have these, we need to also make it so that they are also chosen if TRANSACTIONAL is set to true.

Context:

We are currently working on merging the work on an SQL abstraction https://github.com/portals-project/portals/tree/pr216-merge into a clean state branch https://github.com/portals-project/portals/tree/portals-sql-experiment.

jspenger commented 1 year ago

Fixed to some extent in #236 , works well enough for now, not stable enough to be merged with the main branch