Abstract file backend access through file manager #204

Closed
opened 2020-10-07 01:58:14 +00:00 by jamie · 4 comments
jamie commented 2020-10-07 01:58:14 +00:00 (Migrated from git.hazaar.io)

This is the first step toward achieving #201. I will be using the Hazaar\File\Manager class to handle the failover stuff. However at the moment, read/write commands sent to a backend come from the Hazaar\File and Hazaar\File\Dir classes directly.

So this issue about removing direct access to the file backends from these classes and all read/write operations will go via the Hazaar\File\Manager class. This will allow these calls to be intercepted and how they are handle can be altered based on the current situation.

The goal is to allow the writes to go Hazaar\File -> Hazaar\File\Manager -> Hazaar\File\Backend\Whatever. That way if the backend throws an offline exception we can complete write operations by writing to a local file. Then any read operations can look for that file locally and not use the backend. That is until the file is then moved onto the backends inline storage and removed from disk.

Read operation will still have to fail, unfortunately.

Bright idea! This would allow us to do some sort of crude RAID-like system where we can write to two backends at a time and have build in redundency. Maybe. haha.

This is the first step toward achieving #201. I will be using the `Hazaar\File\Manager` class to handle the failover stuff. However at the moment, read/write commands sent to a backend come from the `Hazaar\File` and `Hazaar\File\Dir` classes directly. So this issue about removing direct access to the file backends from these classes and all read/write operations will go via the `Hazaar\File\Manager` class. This will allow these calls to be intercepted and how they are handle can be altered based on the current situation. The goal is to allow the writes to go `Hazaar\File` -> `Hazaar\File\Manager` -> `Hazaar\File\Backend\Whatever`. That way if the backend throws an offline exception we can complete write operations by writing to a local file. Then any read operations can look for that file locally and not use the backend. That is until the file is then moved onto the backends inline storage and removed from disk. Read operation will still have to fail, unfortunately. Bright idea! This would allow us to do some sort of crude RAID-like system where we can write to two backends at a time and have build in redundency. Maybe. haha.
jamie commented 2020-10-07 01:58:21 +00:00 (Migrated from git.hazaar.io)

mentioned in merge request !99

mentioned in merge request !99
jamie commented 2020-10-07 01:58:21 +00:00 (Migrated from git.hazaar.io)

created merge request !99 to address this issue

created merge request !99 to address this issue
jamie commented 2020-10-07 01:59:40 +00:00 (Migrated from git.hazaar.io)

marked this issue as related to #201

marked this issue as related to #201
jamie commented 2020-10-08 04:07:32 +00:00 (Migrated from git.hazaar.io)

mentioned in commit c58538ec6c20ea91a97fa17827cd32c4e9aa9272

mentioned in commit c58538ec6c20ea91a97fa17827cd32c4e9aa9272
jamie (Migrated from git.hazaar.io) closed this issue 2020-10-08 04:07:32 +00:00
jamie self-assigned this 2025-09-04 01:15:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hazaar/framework#204
No description provided.