Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucasnetau/php-ec
Event Stream correlation engine for PHP
https://github.com/lucasnetau/php-ec
correlation event-sourcing event-streaming eventstream
Last synced: 2 months ago
JSON representation
Event Stream correlation engine for PHP
- Host: GitHub
- URL: https://github.com/lucasnetau/php-ec
- Owner: lucasnetau
- License: mit
- Created: 2018-07-25T10:11:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-24T05:54:22.000Z (8 months ago)
- Last Synced: 2024-04-24T11:11:58.536Z (8 months ago)
- Topics: correlation, event-sourcing, event-streaming, eventstream
- Language: PHP
- Homepage: https://packagist.org/packages/edgetelemetrics/eventcorrelation
- Size: 412 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Event Correlator (Event Sourcing)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Flucasnetau%2Fphp-ec.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Flucasnetau%2Fphp-ec?ref=badge_shield) ![GitHub](https://img.shields.io/github/license/lucasnetau/php-ec)PHP Event Correlator is an event correlation tool to process a stream of events, make decisions based on Rules sets, and perform actions based on these Rules.
Event correlation is useful in many areas. For example, log processing, microservice coordination, IoT event processing.
PHP-EC is being used in production for multiple IoT projects, some processing 10M+ events per day from multiple disparate systems.
## Requirements
The package is compatible with PHP 8.0+
## Installation
You can add the library as project dependency using [Composer](https://getcomposer.org/):
```sh
composer require edgetelemetrics/eventcorrelation
```Performance can be improved by installing optional PHP extensions (ext-libuv or ext-libev)
## Examples
See [/examples](/examples) directory
* [Online shopping service](/examples/online_shop/online_shop.php)## Getting Started
TBC.Components are:
* Events: An event is made up of a type, date, id, and data
* Event Stream: A time ordered stream of events
* Input Processes: programs that provide event streams into PHP-EC. These can be PHP scripts, NodeJS, Bash script etc.
* Actions: Programs that perform tasks when requested. This may be writing to a database, sending an email etc.* Rules: Rules define a set of events to be processed within a defined time period. Once a Rule is matched or a defined timeout period is exceeded the rule can:
* run Actions (for example send email, write to database)
* emit Events (emit a new or modified event for another Rule to handle \[chaining rules\])
* run an additional input process (load more data into the system)### Cron Like Rules
PHP-EC supports rules that can call actions based on Cron time expressions, system start and system shutdown.## License
MIT, see [LICENSE file](LICENSE).[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Flucasnetau%2Fphp-ec.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Flucasnetau%2Fphp-ec?ref=badge_large)
### Contributing
Bug reports (and small patches) can be submitted via the [issue tracker](https://github.com/lucasnetau/php-ec/issues). Forking the repository and submitting a Pull Request is preferred for substantial patches.