A client has identified a performance issue with very large JDBCConfig catalogs.
The AdvertisedCatalog and SecurityCatalog wrappers both add Filter objects (anonymous inner subclasses of InternalVolatileFilter) which JDBCConfig is unable to convert to SQL so it has to retrieve the objects in full, deserialize them, and then filter them all.
This prevents JDBCConfig from pushing paged listings and counting operations to the database. So for every page of the Layer Page or Layer Preview, it retreives and deserializes the full metadata for every single layer in the catalog, at least twice in order to simply show twenty items and a count of the total.
The Layer page can be resolved by not adding the filter if the request is not for a GetCapabilities request. It wasn’t doing anything for other requests.
Layer Preview does care about advertisability, and doesn’t use the filter system, but could be made much faster by doing paging and counting in the DB if it used filters none of the filters were unsupported by JDBCConfig.
The Advertised filter looks like it could be made to work with JDBCConfig although it’s potentially tricky due to the recursive definition of Advertisability (it depends on used resources or sublayers).
The Security filter is far more complicated though. However all it’s needed for is to hide inaccessible layers. Making layers that the user can’t read visible in those lists (the security wrapper would still prevent reading of the layers). Either an option to disable hiding these layers, or having JDBCConfig do it automatically would resolve this part of the problem.
Of the two, I favour an explicit option is it is security issue. It’s better to have sluggish performance for large JDBCConfig Catalogs that can be fixed if the user decides that the names of those layers being exposed is OK, rather than exposing potentially sensitive information by default.
Indicating that the layers are inaccessible, or even redacting information about them while still giving them a place in the list is also a possibility.
If anyone has any other ideas for getting around this problem I’d love to hear them.
–
Kevin Smith
Junior Software Engineer | Boundless
+1-778-785-7459