The interface for the client-side storage plugin web resource has a one-to-many conflict #3258

Open
opened 2019-10-03 13:56:17 +00:00 by exarkun · 1 comment
exarkun commented 2019-10-03 13:56:17 +00:00
Owner

Storage plugins can contribute to the web interface on client nodes. They do this by implementing IFoolscapStoragePlugin.get_client_resource. This is somewhat awkward to implement because it does not receive all of the same information that IFoolscapStoragePlugin.get_storage_client receives and collecting that information where get_client_resource needs to be called is challenging to implement.

This divergence in available information is caused by the following conflict. get_client_resource is expected to return a single resource which represents "the plugin". However, get_storage_client is called on a per-server basis to get an IStorageServer provider specifically for that single server. Since a Tahoe-LAFS client can be connected to many servers, this call may be made many times to create many objects.

I don't see any way to easily simultaneously accommodate both of these constraints.

Storage plugins can contribute to the web interface on client nodes. They do this by implementing `IFoolscapStoragePlugin.get_client_resource`. This is somewhat awkward to implement because it does not receive all of the same information that `IFoolscapStoragePlugin.get_storage_client` receives and collecting that information where `get_client_resource` needs to be called is challenging to implement. This divergence in available information is caused by the following conflict. `get_client_resource` is expected to return a single resource which represents "the plugin". However, `get_storage_client` is called on a per-server basis to get an `IStorageServer` provider specifically for that single server. Since a Tahoe-LAFS client can be connected to many servers, this call may be made many times to create many objects. I don't see any way to easily simultaneously accommodate both of these constraints.
tahoe-lafs added the
unknown
normal
defect
n/a
labels 2019-10-03 13:56:17 +00:00
tahoe-lafs added this to the storage economics plugins milestone 2019-10-03 13:56:17 +00:00
tahoe-lafs changed title from Get the client-side web resource for storage plugins from the storage object itself to The interface for the client-side storage plugin web resource has a one-to-many conflict 2019-10-03 16:33:24 +00:00
exarkun commented 2019-10-03 16:35:43 +00:00
Author
Owner

Originally I thought that there was a solution to this that involved making a web resource per-storage-server as well. This may indeed end up being a solution but it is more involved than I thought. There still very likely needs to be a per-plugin resource that can act as some kind of container for the per-storage-server resources.

For the time being, I think I can get by with the interface as-is - by imposing some additional constraints on the plugin I am implementing outside of Tahoe-LAFS. At some point I will want to revisit this, though, and almost certainly make interface changes here.

I've edited the ticket description to more directly describe the problem instead of my hypothesized solution.

Originally I thought that there was a solution to this that involved making a web resource per-storage-server as well. This may indeed end up being a solution but it is more involved than I thought. There still very likely needs to be a per-plugin resource that can act as some kind of container for the per-storage-server resources. For the time being, I think I can get by with the interface as-is - by imposing some additional constraints on the plugin I am implementing outside of Tahoe-LAFS. At some point I will want to revisit this, though, and almost certainly make interface changes here. I've edited the ticket description to more directly describe the problem instead of my hypothesized solution.
Sign in to join this conversation.
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: tahoe-lafs/trac-2024-07-25#3258
No description provided.