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:
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.
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.rdbby default in the same file path as the application.Requirements:
dump.rdbin the same file path as the application by default.Acceptance Criteria:
dump.rdbin the appropriate file path.dump.rdbfile can be used for data restoration.dump.rdbAdditional Notes: