Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CQRS / Event Sourcing im Content Repository

CQRS / Event Sourcing im Content Repository

Oliver Hader vom TYPO3 Kernteam und ich erklären gemeinsam die Konzepte und Vor- und Nachteile von Event Sourcing und CQRS, am Beispiel von Neos und TYPO3 CMS. Gehalten auf dem TYPO3Camp Mitteldeutschland.

Vortrag als Video: https://www.youtube.com/watch?v=lefgKJSWqx0&t=4968
Ollys Masterarbeit: https://www.slideshare.net/ohader/typo3-cms-datenmodifikation-event-sourcing-masterarbeit

Sebastian Kurfürst

January 25, 2019
Tweet

More Decks by Sebastian Kurfürst

Other Decks in Technology

Transcript

  1. write side read side Event store (DB Table) Projection 1

    (e.g. various DB tables) Commands Events Projection 2 (soft) constraints
  2. write side read side Event store (DB Table) Content Graph

    Commands Events Workspace Dirtyness (soft) constraints …
  3. TYPO3 Data Architecture Repository & Reconstitution Routing Controller View Model

    Permission Persistence Infrastructure Frontend Extbase Backend EditDocumentController FormEngine <<TCA>> FormDataProvider BackendUserAuthentication DataHandler RelationHandler TypoScriptFrontendController ActionContoller AbstractView AbstractEntity & AbstractValueObject Repository Typo3DbBackend Backend PersistenceManager DataMapper StandaloneView <<custom>> ConnectionPool Connection <<TCA>> AbstractPlugin ContentObjectRenderer Frontend\RequestHandler Backend\RouteDispatcher Backend\RequestHandler MVC\Dispatcher <<TypoScript>> <<direct database operations>> <<direct database operations>> x x x
  4. Localization in TYPO3 DataHandlerController DataHandler RelationHandler DatabaseConnection translate <<create>> localize()

    copyRecord() <<create>> DataHandler process_datamap() last_insert_id() fetch record record [x]-processDBdata() <<create>> start() fetch references references writeForeignField() update references insert record new_record_id new_record_id new_record_id references new_record_id multiple read & write processes
  5. Context & Overlays is translation of uid 13 sys_language_uid 0

    :tt_content l10n_parent 0 header Message pid 100 t3ver_wsid 0 t3ver_state 0 t3ver_oid 0 uid 27 sys_language_uid 1 :tt_content l10n_parent 13 header Nachricht pid 100 t3ver_wsid 1 t3ver_state 1 t3ver_oid 0 uid 28 sys_language_uid 1 :tt_content l10n_parent 13 header Nachricht pid -1 t3ver_wsid 1 t3ver_state -1 t3ver_oid 27 uid 41 sys_language_uid 0 :tt_content l10n_parent 0 header News pid -1 t3ver_wsid 1 t3ver_state 0 t3ver_oid 13 is workspace version of is new version is default version is workspace version of is new palceholder
  6. COMMAND Update node properties properties: text: oldValue: "Down the Rabbit-"

    newValue: "Down the Rabbit-Hole" nodeAggregateIdentifier: uuid dimensionSpacePoint: ... contentStreamIdentifier: uuid Down the Rabbit-Hole Editing With Events
  7. EVENT STORE EVENT Node properties were updated properties: text: oldValue:

    "Down the Rabbit-" newValue: "Down the Rabbit-Hole" nodeAggregateIdentifier: uuid dimensionSpacePoint: ... contentStreamIdentifier: uuid COMMAND HANDLER e1 Editing With Events COMMAND Update node properties properties: text: oldValue: "Down the Rabbit-" newValue: "Down the Rabbit-Hole" nodeAggregateIdentifier: uuid dimensionSpacePoint: ... contentStreamIdentifier: uuid
  8. e1 EVENT STORE e1 Node properties were updated e2 NodeAggregateWithNode

    was created e3 Node properties were updated e4 Create Workspace Editing With Events
  9. versioning editing notifications better read performance undo/redo intelligent write conflict

    resolution synchronization of content across instances our feature wishes