
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@speckle/objectloader2
Advanced tools
This is an updated objectloader for the Speckle viewer written in typescript
This is an updated object loader for the Speckle viewer rewritten in Typescript.
The main aim for the objectloader is:
getObjectIterator generator, as soon as possibleTo achieve increased concurrency, the different phases of the objectloader are divided into pools of workers with queues to feed them. Below is a sequence diagram of the worker stages
sequenceDiagram
ObjectLoader2->>CacheReader: Root+Children
CacheReader-->>Database: Item exists?
CacheReader->>ObjectLoader2: Item exists in Cache
CacheReader->>Downloader: Item does not exist in Cache
Downloader->>CacheWriter: Save Item to Cache
CacheWriter->>Database: Write Item
Downloader->>ObjectLoader2: Item exists in Cache
The queues between stages are illustrated below with the concurrency
flowchart TD
start(ObjectLoader2)
cachedQueue(BatchingQueue)
cachedExists{Exists?}
downloadQueue(BatchingQueue)
download{Download Batch}
saveQueue(BatchingQueue)
save{Save to Database}
asyncGeneratorQueue(Aggregated Async Generator Queue)
loop(Generate to Viewer!)
start -- Add IDs --> cachedQueue
subgraph CacheReader
cachedQueue -- Checks by Batch --> cachedExists
end
cachedExists -->|Yes| asyncGeneratorQueue
subgraph Downloader
cachedExists -->|No| downloadQueue
downloadQueue --> download
end
subgraph CacheWriter
download -- add to queue --> saveQueue
saveQueue --> save
end
subgraph Viewer
download -- add to queue --> asyncGeneratorQueue
asyncGeneratorQueue -- Generator Loop --> loop
end
From the list of IDs, they are moved to a queue to be begin checking the cache from a pool of readers.
Results are then sent to the viewer, if found, else they're send to the download queue.
The download queue is a batching mechanism that gets what is available, up to a limit or a timeout. The results are parsed and given to the generator and written to another queue.
The write cache queue is processed with a single writer to the indexeddb.
Deferment is what happens with the viewer does a random access to OL2. It returns a promise but it will be fulfilled later if the item isn't in memory.
The DefermentManager only holds a subset of the model in memory. If the requested item isn't in memory, then it enqueues the request into the general process laid out above.
When items are returned to the generator loop, undefer is called which caches the item in the manager as well as fulfills any outstanding promises.
A cleanup process is ran to be a singleton process. This process sorts by the total number of requests and the size. If anything falls outside the size window, then it is removed from the manager's memory cache.
The aim is to speed up random access while still getting items from the cache in batches. Items that are accessed randomly tend to be references in the model.
These can be use via a query string parameter. For example: https://app.speckle.systems/projects/57bbfabd80/models/81b8d76ef1 can have debug logging enabled with: https://app.speckle.systems/projects/57bbfabd80/models/81b8d76ef1?debug=true
Current parameters:
| Parameter | Default | Type |
|---|---|---|
debug | false | boolean |
useCache | true | boolean |
FAQs
This is an updated objectloader for the Speckle viewer written in typescript
We found that @speckle/objectloader2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.