Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
737a41e
persistency: Feature request for KVS
LittleHuba Jan 24, 2025
da8276d
persistency_kvs: formulated feature parts
sbachmann-qorix Jan 30, 2025
cb78ebe
persistency_kvs: updated year in copyright notice
sbachmann-qorix Apr 23, 2025
b92f91e
persistency_kvs: merged with same branch from eclipse-score repo
sbachmann-qorix Apr 23, 2025
1529fdc
persistency_kvs: map old stakeholder req names to new ones
sbachmann-qorix Apr 23, 2025
7de5deb
persistency_kvs: match all relevant stakeholder reqs with feature reqs
sbachmann-qorix Apr 23, 2025
9518076
persistency_kvs: add architecture UML descriptions
sbachmann-qorix Apr 24, 2025
f5ede35
persistency_kvs: document PlantUML files in index
sbachmann-qorix Apr 28, 2025
84f31ee
persistency_kvs: map feature requirements to architecture
sbachmann-qorix Apr 28, 2025
ba84993
persistency_kvs: add component architecture
sbachmann-qorix Apr 28, 2025
5367364
persistency_kvs: moved requirements into extra file
sbachmann-qorix Apr 30, 2025
448c1b3
persistency_kvs: fix bazel build warnings
sbachmann-qorix Apr 30, 2025
ff250a3
score_metamodel: allow 90 instead of 45 chars for requirement ids
sbachmann-qorix Apr 30, 2025
147b36d
persistency_kvs: review with Volker Häussler
sbachmann-qorix May 5, 2025
b4c1598
persistency_kvs: fix safety assignments
sbachmann-qorix May 5, 2025
1262a38
persistency_kvs: rename feature key_value_storage to kvs
sbachmann-qorix May 5, 2025
34e4a32
persistency_kvs: added component requirements
sbachmann-qorix May 6, 2025
8872280
persistency_kvs: snapshot component architecture
sbachmann-qorix May 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def check_id_format(app: Sphinx, need: NeedsInfoType, log: CheckLogger):
@local_check
def check_id_length(app: Sphinx, need: NeedsInfoType, log: CheckLogger):
"""
Validates that the requirement ID does not exceed the hard limit of 45 characters.
Validates that the requirement ID does not exceed the hard limit of 90 characters.
While the recommended limit is 30 characters, this check enforces a strict maximum
of 45 characters.
If the ID exceeds 45 characters, a warning is logged specifying the actual length.
of 90 characters.
If the ID exceeds 90 characters, a warning is logged specifying the actual length.
---
"""
if len(need["id"]) > 45:
if len(need["id"]) > 90:
msg = (
f"exceeds the maximum allowed length of 45 characters "
f"exceeds the maximum allowed length of 90 characters "
f"(current length: {len(need['id'])})."
)
log.warning_for_option(need, "id", msg)
Expand Down
2 changes: 1 addition & 1 deletion docs/features/persistency/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Persistency
.. toctree::

file-access/index.rst
key-value-storage/index.rst
kvs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@startuml

title Sequence Diagram: KVS Builder

participant "User" as actor
participant "«component» :builder" as builder
participant "«component» :kvs" as kvs

actor -> builder: Create KVS builder
builder --> actor: KVS builder instance

actor -> builder: Set need_defaults flag
builder --> actor: KVS builder instance

actor -> builder: Set need_kvs flag
builder --> actor: KVS builder instance

actor -> builder: Build KVS instance
builder -> kvs: Open KVS with builder config

alt kvs-open
kvs --> builder: KVS instance
builder --> actor: KVS instance
else kvs-open-error
kvs --> builder: KVS ErrorCode
builder --> actor: KVS ErrorCode
end

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml

title Sequence Diagram: Check if Key contains Default Value

participant "User" as actor
participant "«component» :kvs" as kvs

actor -> kvs: Does key has default value

alt default-key-exists
alt key-exists
alt default-and-key-match
kvs --> actor: Key contains default value
else key-doesnt-exist
kvs --> actor: Key doesn't containt default value
end
else key-doesnt-exist
kvs --> actor: Key contains default value
end
else default-doesnt-exist
kvs --> actor: Key doesn't contain default value
end

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@startuml

title Sequence Diagram: Delete Key from KVS Instance

participant "User" as actor
participant "«component» :kvs" as kvs

actor -> kvs: Remove key

alt key-exists
kvs --> actor: Successfully deleted key
else key-doesnt-exist
kvs --> actor: Key-Not-Found-Error
end

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
@startuml

title Sequence Diagram: Flush Local Representation to Data File

participant "User" as actor
participant "«component» :kvs" as kvs
participant "«component» :snapshot" as snapshot
participant "«component» :TinyJSON" as json_parser
participant "«component» :fs" as fs
participant "«component» :Adler32" as hasher

actor -> kvs: Flush KVS

kvs -> json_parser: Generate string from local representation

alt json-string
json_parser --> kvs: JSON data string
else json-string-error
json_parser --> kvs: JSON generator error
kvs --> actor: JSON generator error
end

kvs -> snapshot: Rotate snapshots

alt snapshot-rotate
snapshot -> kvs: Snapshots rotated
else snapshot-rotate-error
snapshot --> kvs: Snapshot-Rotate-Error
kvs --> actor: Snapshot-Rotate-Error
end

kvs -> hasher: Create JSON data string hash

alt hash-created
hasher --> kvs: Data hash
else hash-create-error
hasher --> kvs: Hash-Calc-Error
kvs --> actor: Hash-Calc-Error
end

kvs -> fs: Write JSON data string to file

alt file-write
fs --> kvs: File successfully written
else file-write-error
fs --> kvs: File-Write-Error
kvs --> actor: File-Write-Error
end

kvs -> fs: Write JSON data hash to file

alt file-hash-write
fs --> kvs: Hash file successfully written
kvs --> actor: Flush successful
else file-hash-write-error
fs --> kvs: File-Hash-Write-Error
kvs --> actor: File-Hash-Write-Error
end

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml

title Sequence Diagram: Read Key from KVS Instance

participant "User" as actor
participant "«component» :kvs" as kvs

actor -> kvs: Get value for key

alt key-exists
kvs --> actor: Return value for key
else key-doesnt-exist
alt default-exists
kvs --> actor: Return default value for key
else default-doesnt-exist
kvs --> actor: Key-Not-Found error
end
end

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@startuml

title Sequence Diagram: Read Data into Local Representation (KvsValue)

participant "Builder" as actor
participant "«component» :kvs" as kvs
participant "«component» :TinyJSON" as json_parser
participant "«component» :fs" as fs
participant "«component» :Adler32" as hasher

actor -> kvs: Open KVS

kvs -> fs: Read defaults file

alt file-exists
fs --> kvs: Defaults file content (JSON)
else file-based-error
fs --> kvs: File-Error
kvs -> actor: File-Error
end

kvs -> fs: Read defaults file hash

alt file-exists
fs --> kvs: Defaults file hash
else file-based-error
fs --> kvs: File-Error
kvs -> actor: File-Error
end

kvs -> hasher: Generate defaults file hash
hasher --> kvs: Defaults file generated hash

alt hash-matches
kvs -> json_parser: Parse JSON data
else hash-match-error
kvs -> actor: Hash-Error
end

alt parsing-success
json_parser --> kvs: Parsed JSON object
else parsing-based-error
json_parser -> kvs: Parser-Error
kvs -> actor: Parser-Error
end

kvs --> actor: KVS instance

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@startuml

title Sequence Diagram: Restore Snapshot

participant "User" as actor
participant "«component» :kvs" as kvs
participant "«component» :snapshot" as snapshot

actor -> kvs: Restore snapshot

alt snapshot-found
snapshot --> kvs: Snapshot restored into local representation
kvs --> actor: Snapshot restored successfully
else snapshot-error
snapshot --> kvs: Snapshot-Not-Available-Error
kvs --> actor: Snapshot-Not-Available-Error
end

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@startuml

title Sequence Diagram: Write Key to KVS Instance

participant "User" as actor
participant "«component» :kvs" as kvs

actor -> kvs: Set value for key
kvs --> actor: Value set for key

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@startuml

interface Kvs {
open
flush_on_exit
reset
get_all_keys
key_exists
get_value
get_default_value
has_default_value
set_default_value
set_value
remove_key
flush
snapshot_count
snapshot_max_count
snapshot_restore
get_kvs_filename
get_hash_filename
}

@enduml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@startuml
allowmixing

title Static View - kvs

!include kvs_interface.puml


skinparam package {
BackgroundColor #E0E0D0
BorderColor Black
backgroundColor<<feature>> yellow
}

skinparam component {
backgroundColor<<component>> white
}

' Define Features
package "kvs" <<feature>> {
component kvs <<component>>
component fs <<component>>
component tiny_json <<component>>
}

kvs -u- Kvs

kvs ..> tiny_json : use
kvs ..> fs : use


@enduml
Loading
Loading