Skip to content

Commit

Permalink
chore: update readme (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
godruoyi authored Aug 28, 2023
1 parent 0193ef3 commit bf77419
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: codestyle
on:
pull_request:
paths:
- "!*.md"
jobs:
code-coverage:
name: Code Coverage
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- master
- '*.x'
pull_request:
paths:
- "!*.md"

permissions:
contents: read
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: test
on:
pull_request:
paths:
- "!*.md"
jobs:
phptests:
runs-on: ${{ matrix.operating-system }}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ Snowflake is a network service for generating unique ID numbers at high scale wi
> You must know, The ID generated by the snowflake algorithm is not guaranteed to be unique.
> For example, when two different requests enter the same node of the same data center at the same time, and the sequence generated by the node is the same, the generated ID will be duplicated.
So if you want to use the snowflake algorithm to generate unique ID, You must ensure: The sequence-number generated in the same millisecond of the same node is unique.
If you want to use the snowflake algorithm to generate unique ID, You must ensure: The sequence-number generated in the same millisecond of the same node is unique.
Based on this, we created this package and integrated multiple sequence-number providers into it.

* RandomSequenceResolver (Random)
* RedisSequenceResolver (based on redis psetex and incrby)
* FileLockResolver(PHP file lock `fopen/flock`, **Concurrency Safety**
* RedisSequenceResolver (based on redis psetex and incrby, **Concurrency Safety**)
* LaravelSequenceResolver (based on redis psetex and incrby)
* SwooleSequenceResolver (based on swoole_lock)
* FileLockResolver(PHP file lock `fopen/flock`

Each provider only needs to ensure that the serial number generated in the same millisecond is different. You can get a unique ID.

Expand Down

0 comments on commit bf77419

Please sign in to comment.