[Smtk-developers] Resource Proxies (not the ParaView kind)

TJ Corona tj.corona at kitware.com
Wed Mar 14 20:31:28 EDT 2018


Let me start with my own two cents:

1. For now, we make the practice of loading a resource proxy completely manual. The proxy will satisfy some of the Resource API (location, id, type, inheritance) but that’s it. 

2. No automagic updates. There will be an operation for resolving resource links for an existing resource. If one of its links has already been loaded, it will simply get the pointer to that resource (in the presence of a resource manager). With no resource manager, there’s no problem with loading the same resource twice if the user executes the “ResolveResourceLinks” operator (or whatever it will be called).

3. Yes, this needs to work. Otherwise, the entire paradigm of meshing a model falls apart in the absence of a resource manager.

By a) narrowing the API to only allow loading of resource links via the resource that linked it, and b) requiring that resolving resource proxies be done as an operation, I think we can get around the multithreading issues. Thoughts?


> On Mar 14, 2018, at 8:00 PM, TJ Corona <tj.corona at kitware.com> wrote:
> 
> Hi all,
> 
> I have been working on resource links today. In the process, I decided to try and tackle the case where a resource has links to another resource, and we don’t want to load that resource until we need to. The problem I ran into is the open-ended nature of this task: “until we need to” load a resource. 
> 
> 1. When do we “need” a resource to load? When an operator uses it as a parameter? When a resource with links (think a model with an associated mesh) is operated on (if you remove a model face, should we remove the associated mesh part)? 
> 
> 2. If two resources link to the same resource proxy and one of them resolves that resource, do we expect the resource link in the other resource to automagically update itself? Can two resources link to the same resource?
> 
> 3. Does this need to work in the absence of a resource manager (I hope not!)?
> 
> The problem becomes much more complex when you take into account thread safety, where many things can try to resolve a proxy at once. I have some ideas for how this all should work, but I would really like to hear from you all what concrete examples need to be supported.
> 
> Sincerely,
> T.J.
> 
> Thomas J. Corona, Ph.D.
> Kitware, Inc.
> Senior R&D Engineer
> 21 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-881-4443
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://smtk.org/pipermail/smtk-developers/attachments/20180314/ca91e081/attachment.html>


More information about the Smtk-developers mailing list