javaGuruBY / javaGuruBY/jis8-project

[register-service] autoincrement identificator for fileSystem storage

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Create a service that read file with the latest id.
Name it generated_id
When entity creates, service should
1. check if `generated_id` locked, if locked - wait until it unlocked
2. lock file on write
3. read if from file and return it
4. increment value that has been read
5. save file with updated value
6. unlock file

next_id=34

On system start, if file generated_id is not exist, than create it with value
next_id=34

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.