prooph meetup 2016

prooph components

CQRS and Event Sourcing packages for PHP

Supported Web Frameworks

or any other framework/codebase supporting container-interop & interop-config

prooph team

Community

Focused on digital solutions based on modern web technologies like PHP7, prooph components, Node.js, TypeScript, react/riot, Docker, Cloud Services

A software vendor for web-based solutions. Focused on content management solutions over the Insecia Cloud. SaaS and IaaS. Modern Stack with PHP7, OpenStack, Kubernetes, Docker

Meetup Sponsors

Alexander Miertsch

Founder and CEO of prooph software GmbH

Founder and core contributor prooph components

 

 

contact@prooph.de

@codeliner

@prooph_software

Christof Heinzel

Founder and CEO of Insecia GmbH

Passionate PHP developer and Cloud Computing lover

 

 

christof.heinzel@insecia.com

 

@christofheinzel | @INSECIA

Agenda

Event Sourcing case study by @codeliner

time to grab a beer

Hot new features in prooph by @prolic

Networking

Event Sourcing

Introduction of the problem space

Event Sourcing for enterprise application integration (EAI)

Manage business processes with event sourcing

Monitor long-running business processes

CQRS for high performance microservices

A Case Study

The Problem Space

Simplified version of a true story

 

The Problem Space

Bob runs a successful fashion business

New Strategy: Simplify and modernize the sales process

The Problem Space

Bettina is one of the many account managers in Bob's company

The Problem Space

Petra is a shop owner and one of 50.000 business customers of Bob

Bettina is one of the many account managers in Bob's company

The Problem Space

John is part of the customer service team in Bob's company

Petra is a shop owner and one of 50.000 business customers of Bob

Bettina is one of the many account managers in Bob's company

The Problem Space

Strategy: Simplify and modernize the sales process

requires negotiation of new contracts

The Problem Space

Contract App

The Contract App

  • Supports account manager during contract negotiation
  • Provides customer search and filter capabilities
  • Dynamic multistep data form
  • In-browser/realtime validation of complex decision rules
  • Offline functionality

Event Sourcing

Introduction of the problem space

Event Sourcing for enterprise application integration (EAI)

Manage business processes with event sourcing

Monitor long-running business processes

CQRS for high performance microservices

A Case Study

EAI

Bettina needs to find Petra out of 50.000 customers in the Contract App

EAI with Event Sourcing

Customer data is in a legacy system

Some Customer Events ...

Customer Import Stream

Some Customer Events ...

Some Customer Events ...

EAI with Event Sourcing

Customer data is in a legacy system

Some Customer Events ...

Customer Import Stream

Petra's shop was added

Some Customer Events ...

Petra's shop was updated

Nightly projection into customer search

Nightly XML export

Some Customer Events ...

EAI with Event Sourcing

  • All data + history available
    useful for future requirements
  • Data blob stored in event payload
    No mapping required during import
  • Import API is dead simple
    Minimal integration work
  • Bonus
    Audit log for free

Some Customer Events ...

Customer Import Stream

Petra's shop was added

Some Customer Events ...

Petra's shop was updated

Some Customer Events ...

Customer Projections

  • No heavy ORM required, because customer data is read only in the Contract App
  • Read model is recreated every night to reflect latest changes
  • Mapping of legacy structure is done when building the read model
  • New features based on so far unused data can be added without new import

Event Sourcing

Introduction of the problem space

Event Sourcing for enterprise application integration (EAI)

Manage business processes with event sourcing

Monitor long-running business processes

CQRS for high performance microservices

A Case Study

Focus on Behavior

Contract Stream

Appointment was made

Some Contract Events ...

Special conditions were requested

Some Contract Events ...

Send mail to John

Focus on Behavior

Contract Stream

Special conditions were requested

Some Contract Events ...

Special conditions were accepted

Some Contract Events ...

Send to external signing service

Event Sourcing

Introduction of the problem space

Event Sourcing for enterprise application integration (EAI)

Manage business processes with event sourcing

Monitor long-running business processes

CQRS for high performance microservices

A Case Study

Monitor External Service

Contract Stream

Contract signing was started

Some Contract Events ...

Contract was internally signed

Some Contract Events ...

Contract was externally signed

Event Sourcing

Introduction of the problem space

Event Sourcing for enterprise application integration (EAI)

Manage business processes with event sourcing

Monitor long-running business processes

CQRS for high performance microservices

A Case Study

Projections for Speed

A B2B portal also needs customer data and Contract App has a http API, but...

... requires other structure of the data and filtering is based on other properties

... http API would have to handle lot of additional traffic

New Consumer

Dedicated Projection

Same customer event stream projected into a document store

Accessed by a microservice

Can be scaled independently of Contract App

?

Thanks for listening

Questions?
Time to grab a beer!

prooph meetup 2016

By prooph

prooph meetup 2016

  • 3,972