Giter VIP home page Giter VIP logo

orkestramono's Introduction

Orkestra

Monorepo Split

Orkestra is a set of PHP components for building Systems and Applications using concepts from Domain Driven Design (DDD), Command Query Responsibility Segregation (CQRS) and Event Souring (ES).

These components can be used independently according to the needs of the systems.

The main goal behind this set of components is to simplify the plumbing required to support the principles of DDD/CQRS/ES and allow developers to build systems by simply focusing on the core domain and business logic.

These components are Infrastructure and Framework independent, allowing them to be used in any kind of setup. There is currently a component tailored for easy integration with the Symfony Framework to simplify the process even further.

The Orkestra components

Core Components

Here's a list of the current core components of Orkestra:

  • Messaging: Provides the building block to define messages and handlers such as Commands, Queries, Events, Time based messages called (Timers). It also includes the basic mechanisms to integrate intra-process message buses to an application to map messages to their message handlers while providing hooks to alter the behaviour of sending messages to their handlers. In short, it's the Mediator pattern with helpers for CQRS.
  • Modeling: Provides the building blocks for Modeling Entities, Aggregates and Aggregate Roots.
  • EventSourcing: This component contains the building block to add Event Sourcing capabilities to a system. It provides implementations for Event Sourced Aggregate Roots, interfaces for an Event Store as well as Event Processors which are services responsible for forwarding events saved in an event store to the various components of the system.
  • Normalization: This component allows transforming complex object trees into simple PHP arrays of primitives for easy serialization in any format. As a side effect it greatly reduces the need for ORMs while decoupling persistence mechanism from the domain model as it does not require annotations or inheriting interfaces. In short, it provides ways to do: Entity -> array -> dump to database (MongoDb, PostgreSql, Redis etc.)
  • Privacy: This component provides building blocks to make Personal Data and Privacy an explicit requirement of the system and to simplify the integration of regulations such as GDPR or CCPA.
  • DateTime: Based on cake-php/chronos to improve the capabilities of DateTimes in an Immutable fashion as well as providing interfaces to access time through ClockInterface some an application can provide different means to get the current time in different contexts, such as time travel.
  • Enum: Provides typed Enum to PHP.
  • Collections: Provides typed Collections.
  • Exceptions: Provides common exceptions.
  • Retry: Provides utilities to improve the resiliency of some components in a system through the use of Retry Classes with support for delays and exponential backoff.
  • Worker: Provides simple interfaces and base classes to define workers that should be used to run business logic in background processes.

Infrastructure Specific Components

There are also infrastructure specific implementations of some the Interfaces from the core Components:

Framework Integrations

Here are additional components for easier integration with specific frameworks:

  • SymfonyBundle: Integrates various Orkestra Components with Symfony, while also providing a Module system in order to structure projects in a Bounded Context oriented approach.
  • Orkestra Framework: Corresponds to an opinionated integration of all the core components with Symfony. It has useful defaults as well as some technical decisions for quickly bootstrapping projects.

Monorepo

The current repository is maintained as a Monorepo, all issues and pull requests for any of the components should be done in this repository. Internally whenever a new release is made it is propagated to the standalone repositories of the different components. For more information please read the Contribution Guide.

Getting Started

To get started, please read the following page from the documentation.

Help & Support

If you are using Orkestra Components in your project and are stuck on something or want to deepen your understanding of the code base, do not hesitate to open an issue in this repository, we will try our best to help you.

Contributing

Orkestra is open for contributions. If you want to contribute to one of the components or the documentation, please read the Contribution Guide.

orkestramono's People

Contributors

jwillp avatar

Stargazers

 avatar

Watchers

 avatar  avatar

orkestramono's Issues

[EventSourcing] UpcastringEventStoreDecorator does not test for support before upcasting

There is the following code:

    /**
     * Upcast an event and returns the result as an array as when upcasting an event might
     * have been split into many new ones.
     */
    private function upcastEvent(RecordedEventDescriptor $event): array
    {
        // Here a test to see if the upcasterChain supports the event should be performed

        return $this->upcasterChain->upcast(UpcastableEventDescriptor::fromRecordedEventDescriptor($event));
    }

And also in the UpcasterChain:

 if (empty($chain)) {
            return [$event];
        }

        $head = \array_slice($chain, 0, 1);
        $tail = \array_slice($chain, 1);
     
        // SHOULD BE TESTED here again
   
        $events = $head[0]->upcast($event);

Do you want to execute this recipe?

First composer install run, what is the correct answer here? Thanks

Symfony operations: 5 recipes (77cf3f9507dae77013fb16cb124ff045)
  -  WARNING  baldinof/roadrunner-bundle (>=2.0): From github.com/symfony/recipes-contrib:master
    The recipe for this package comes from the "contrib" repository, which is open to community contributions.
    Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/baldinof/roadrunner-bundle/2.0

    Do you want to execute this recipe?
    [y] Yes
    [n] No
    [a] Yes for all packages, only for the current installation session
    [p] Yes permanently, never ask again for this project

bin/ok command fails

MacOS 11.4

❯ bin/ok up
Failed to execute process 'bin/ok'. Reason:
The file 'bin/ok' specified the interpreter '/usr/bin/bash', which is not an executable command.
❯ which -a bash
/usr/local/bin/bash
/bin/bash

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.