Download the PHP package dynamophp/vector-clock without Composer
On this page you can find all versions of the php package dynamophp/vector-clock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package vector-clock
Vector Clock and Lamport timestamp PHP library
This project is a PHP implementation of the concept of Vector Clock and Lamport timestamp as defined in the paper : Timestamps in Message-Passing Systems That Preserve the Partial Ordering (paper/vector-clock-paper.pdf).
This library provides :
- Lamport timestamp
- Asynchrone vector clock
- Synchrone vector clock
These implementations carefully follow the research paper and all classes are fully tested (100% coverage).
Every example present in the paper is transcribed as a Phpunit test.
Installation
Lamport timestamp
Usage
In the test case : LamportTimestampScenarioTest::testPaperFigure1A and LamportTimestampScenarioTest::testPaperFigure1B you can see the full scenario of the paper :
Asynchrone vector clock
Usage
In the test case : AsyncVectorScenarioTest::testPaperFigure3 you can see the full scenario of the paper :
Synchrone vector clock
Usage
In the test case : SyncVectorScenarioTest::testPaperFigure7 you can see the full scenario of the paper :
How to contribue
Dev environment
You can launch the project locally, either using an old fashion PHP installation or Docker.
If you use Docker, there is a docker-compose file for you in the docker
directory.
Installing dependencies
Using composer in you dev env :
Code quality
Your code must be passed through PhpCsFixer :
Fix src/
Fix tests/
And be analyzed by Phpstan
Tests
The project use PhpUnit
Here is the command to launch the test suite
Note: You need Xdebug for the coverage. If you're using the Docker env provided in this project, it's already installed and configured.
Commit convention
Your commits message musts follow this convention