Giter VIP home page Giter VIP logo

ocramius-event-sourcing-workshop's Introduction

EventSourcing Workshop

In here, you will find a "from scratch" PHP-based implementation of Event-Sourcing, kept to a minimum on purpose, to allow workshop attendees to explore and experiment with its concepts.

DISCLAIMER: Not a production project

This is not a library nor production-ready project: this is an educational project. Its target audience is students and backend engineers that want to get better at abstracting/maintaining business logic.

Knowledge required

To work in this project, you need some rough knowledge about:

  • php
    • you should be familiar with php's syntax
    • the provided test suite and tooling should help you prevent mistakes, but you should have basic knowledge of how php runs and fails.
    • we use functional and object-oriented paradigms: you may be up for a crash-course, if you never saw code structured this way.
  • composer
    • php class autoloading and dependency installation is handled for you, but if something goes wrong, you should know some composer basics
  • sql
    • the entire workshop is based on SQLite databases: it's just files, but you need to know some very basic SQL
  • make
    • most repetitive tasks have been added to a Makefile: run make to see what's available
  • docker and docker-compose
    • to ensure everyone runs on the same environment, we run tests inside a docker container. Building images and starting/stopping containers is sufficient: we will not use any advanced docker features
    • don't worry too much if you don't: the Makefile should abstract most docker stuff away

Firing it up

Run:

make composer-install
make quality-assurance
make interactive-shell

Architecture


Exercises

Note: all exercises are under the watchful eye of static analysis and CS tooling. Use make quality-assurance to validate your current work!

  1. Standalone recording of a temperature
  2. Tracking the last recorded temperature at each location
  3. Tracking the average recorded temperature at each location, but in the database
  4. Send an alert when the temperature is below freezing point
  5. Payment aggregate
  6. Collaborative event-sourcing:
    • TODO: idea of mapping a speed-trap fine management process
    • TODO: idea of mapping a hotel reservation + stay process

License

This software is proprietary: please contact the author for permission to use, but for now, these sources are not freely reusable outside educational purposes. Yes: you are reading correctly, this is not MIT/BSD software :-P

ocramius-event-sourcing-workshop's People

Contributors

ocramius avatar renovate[bot] avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.