Skip to content

Implement a Data Persistence Worker #12

@proXDhiya

Description

@proXDhiya

We need to implement a worker will handle data persistence within our application. This worker should listen for a save signal, take a snapshot of the current application data, and save it to a file named dump.rdb by default in the same file path as the application.

Requirements:

  • The worker should be able to:
    • Listen for a save signal within the application.
    • Capture a copy of the current application data.
    • Serialize the data according to the RDB (Redis Data Persistence) file format.
    • Save the serialized data to dump.rdb in the same file path as the application by default.

Acceptance Criteria:

  • The worker listens for and correctly responds to the save signal.
  • Data is accurately captured and serialized according to the RDB format.
  • The serialized data is saved to a file named dump.rdb in the appropriate file path.
  • The implementation is tested to ensure that the dump.rdb file can be used for data restoration.
  • The file name should follow the arguments if set or uses dump.rdb

Additional Notes:

  • Ensure the implementation follows best practices for worker design in BunJS.
  • Consider edge cases where the save signal may be triggered multiple times in quick succession.

Metadata

Metadata

Assignees

Labels

RDBRedis DatabaseWorkerWorker updateenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions