Open jhoogeboom opened 4 years ago
Hey Joris, yeah, caching OTG (now called SVF2) is gonna be tricky due to its level of granularity.
I remember I was downloading individual geometries in forge-convert-utils with regular HTTP requests (https://github.com/petrbroz/forge-convert-utils/blob/3a625d1335ff6739818c9afbcef9e2055577aa51/src/otg/client.ts#L260-L262). Apart from the fact that it's not a very efficient approach (since you can have tens of thousands of geometries in one model), this approach is not guaranteed to work in the future as the OTG/SVF2 format is now being moved from https://otg.autodesk.com to the official Forge Model Derivative service.
Hi Petr! Any chance for a disconnected workflow that works with OTG? With web sockets that might be tricky, can OTG be served over another transport medium?
I see some hints of disabling websockets in Cyrille's fluent-server: https://github.com/Autodesk-Forge/forge.commandline-nodejs/tree/master/fluent-server#otg-viewer-options
And translated to a viewer option: https://github.com/Autodesk-Forge/forge.commandline-nodejs/blob/6c74e8219c55fa9627d542a552c03148114213ba/views/index.ejs#L78
But doesn't seem to work with any of the Production apis, still seeing calls ws calls to cdnws. If it would switch over to http calls for OTG, that would help in using webworkers to cache.