Data Warehouse Transaction Limitations

in a Google app application, when a user purchases several contracts, these events are executed (simplified for clarity):

  • user.cash is decreasing
  • user.contracts is incremented
  • contracts.current_price updated.
  • market.no_of_transactions increases by 1.

in rdms, they will be placed in one transaction. I believe google repository does not allow entities from more than one model to be in one transaction.

What is the correct approach to this problem? How can I guarantee that if a record fails, all previous records will be rolled back?

edit: I obviously missed entity groups. Now I would like more information on how they are used. Another point that needs to be clarified is that Google says, “Use only groups of objects when they are needed for transactions. For other relationships between objects, use the ReferenceProperty properties and Key values ​​that can be used in queries.” Does this mean that I have to define both the reference property (since I need to double-check them) and the parent-child relationship (for transactions)?

edit 2: and finally, how to define two parents for an entity if an entity is created to establish an n-to-n relationship between two parents?

+3
3

, google , . java.

0

Datastore:

, .

- . .

0

shanyu, , . , . erick armbrust . dan .

nick johnson "" , , . , -, .

, , , . , . , dan erick, , .

: 1) , / (.. ). , , . , .

2) . "--", , , ListProperty (.. ). . .

0

Source: https://habr.com/ru/post/1707904/


All Articles