Distributed transactions are difficult in cloud computing. See GCP Spanner. Also read up on “saga” pattern. If you have multiple sources participating in the transaction, saga seems to be the preferred method for highly scalable solutions.
> On Dec 10, 2018, at 8:55 AM, bonpi bonpi <golangori...@gmail.com> wrote: > > I would like to abstract DB access of certain server programs like GCP > bookshelf sample. > However, in this example transactions are not handled. > https://github.com/GoogleCloudPlatform/golang-samples/tree/master/getting-started/bookshelf > > When dealing with transactions, adding APIs to the interface complicates the > API > When one request is handled as a transaction, since it is necessary to start > a transaction for each request > The Server itself can not have an abstracted data source. > Am I wrong something fundamental? > > What kind of approach can be seen in actual projects? > Also, how do you deal with the lock function such as ForUpdate? > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.