Hi Robert, On Fri, Mar 21, 2008 at 1:09 PM, Robert Osfield <[EMAIL PROTECTED]> wrote:
> Hi Serge, > > I would be good to collaborate on a single libcurl based plugin that > can meet the variety of different types of usage models users will > through at it. I have thrown together a very simple one right now. > So far it can load databases, including hierarchical ones. I haven't > implemented cache support, but I'm tempted to push cache support into > osgDB and make it available to a range of plugins. > About cache, in our plugin its implemented thanks to SQLite support, it would be great to have a general approach into osgDB to have custom cache implementation. Thanks to that we could provide a simple file system based cache, but anyone would be able to make its own implementation. W.r.t going a mulit-threaded route where a request is made and then > the data is loaded later. How do you go about implementing this? > Using ProxyNode? Using your own database pager? We use the standard DatabasePager. In the plugin side, when a request comes, we ask to another thread if the file has already been requested. If not, we add it to a list and return a FILE_NOT_HANDLED response. If it has been requested before, we check the request status, if the file is available we return the correct node, if not we return again a FILE_NOT_HANDLED response. It works with ProxyNode or PagedLOD as they continue to ask for the node as long as they don't have any answer. And we can off course explicitely ask for a blocked response from the plugin if the request doesn't come from the DatabasePager. > > My thought has been to change osgDB::DatabasePager so that is has one > or more database threads, so push the multi-threading here, rather > than into any specific plugin. > > Off course it's a better approach, when starting our plugin we thought about that, but it was much more simple to make the trick into our plugin instead of changing all the DatabasePager behaviour. Moreover it was still during the pre 2.0 period, and the DatabasePager (or the multi-threaded approach) wasn't as flexible as now. -- Serge Lages http://www.tharsis-software.com
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

