Overview
Before reviews, annotations, and approvals can take place, you'll first need to get your assets into ConceptShare. Depending on the nature of your integration and your clients' needs, getting assets into ConceptShare can be accomplished in one of two primary methods. Each method has its own benefits and drawbacks, and your chances of a successful integration increase substantially by understanding the differences and nuances.
Direct Upload
You can push files directly from the host application's storage to ConceptShare as a byte array using the Add*Asset API calls.
- AddProjectAsset
- AddVersionedAsset
This is the method to use when your host application can't expose an asset's URL in storage to ConceptShare (ex. some IT security policy or infrastructure limitation that doesn't allow asset URLs to be exposed for ConceptShare). In these cases, you can utilize this method to push the entire file as a byte-arrary in the HTTP Request body to Conceptshare.
This method may be slightly quicker to deploy in the sense that you don't have to worry about security considerations to allow ConceptShare access to the asset store, without also introducing vulnerabilities or unauthorized access. For example, white-listing ConceptShare queue IPs, generating one-time-use URIs, or giving your access token predefined lifespans. This way, the specific asset is exposed for a minimal duration for the queue to download it without exposing the asset to other unknown end-points.
In exchange for not having to secure ConceptShare access to your asset storage, you're inhering the complexity to handle retry logic when uploads fail (since you're not leveraging ConceptShare's queues for downloads), and you're also stuck with a 2 GB payload limit on all uploads.
Cloud Storage
If your solution includes cloud storage, such as Amazon's S3, Azure Storage, or any other storage provider that can provide a URL to the resource; you can push your assets to ConceptShare by simply providing that external URI using any of the Add*AssetFromExternallUri calls. This call triggers ConceptShare’s queue service to start a worker thread that will download the file in the background.
- AddProjectAssetFromExternalUri
- AddVersionedAssetFromExternalUri
Simply indicate the files that need to be added to ConceptShare, and have the host application provide the URL(s) for ConceptShare to grab those asset(s) from asset storage in the background. Once ConceptShare is finished downloading (and processing the file), it will notify the host application via ASSET_CREATED or ASSET_VERSIONED callbacks, which can then trigger additional notifications to end-users that can now take action.
NOTE: The use of External URI function calls circumvents the upload file size limit of direct uploads. This is because the file is being downloaded from cloud storage, not uploaded via the HTTP Request body.
For an overview of event callbacks, checkout the guide, and the callback reference documentation has a page listing all the Callbacks and their respective parameters.
Key Components of Asset Ingestion
As the sequence diagrams above will indicate, regardless of whether you use external URIs or push assets directly as byte arrays, your host application will need a mechanism in order to remain informed of the upload state of assets both during and after ingestion. The sequence diagrams for both methods would be adequate if there was never a risk of network disruptions, which is not the case in the real world.
As such, for a comprehensive implementation of asset ingestion you need to account for three things:
- A mechanism to initiate asset ingestion in ConceptShare, and retain the asset's place-holder ID
- An event handler at an endpoint of your choosing which can receive callback events when the asset has finished processing and is ready for use
- Some mechanism to restore synchronization in the event of a failure whereby callbacks cannot reach the host system
Only with these three mechanisms working together can you ensure that the host application and ConceptShare can remain synchronized, even through temporary communication outages or other such transient infrastructure failures.
-
Initiating Asset Ingestion
This component makes API calls to initiate asset uploads. It also retains and stores the asset place-holder ID that's immediately returned by the API. Ideally, it should also track whether the request was to version or upload a net new asset, as well as the time the request was made under a "last checked" column (or something of equivalence). This information should all be tracked in a persistent "pending assets list" for later reference. -
Handling Callbacks
The callback component is just an event handler that can parse and handle ConceptShare callbacks associated with asset ingestion (and optionally others as well). When ConceptShare is finished queuing, uploading, processing, generating proxy formats, creating thumbnails, and all other prerequisite tasks required to display the asset to users, it will trigger the ASSET_CREATED or ASSET_VERSIONED callback. When the callback is received by this component, it should remove the associated entry for that asset in the pending asset list, as all necessary ingestion work is now complete. Whatever other workflow needs to be triggered when assets are ready, can now begin as well. If you're using external URIs, this would be a good time to expire/revoke any access tokens associated with the asset that just completed processing. -
Scanning for Stragglers
This component reasserts synchronization for any assets that are deemed to be in an "unknown" or "dangling" state. By looking at entries in the pending assets list, you can see if any assets ingestion requests were initiated longer than some threshold of your choosing. If you check the time-stamp in the "last checked" column and determine that it's been too long since you heard back, you may consider it a dangling asset. At this point, it's unknown whether the host application missed a callback from ConceptShare, or whether the asset is just very large, or network congestion is just particularly bad that day, and the asset is still processing. Rather than continuing to wait, you can specifically inquire about the asset using the GetAssetProfile API call.
If the asset has uploaded but the callbacks failed to reach the host application, you'll see the asset come back with an Upload Status of None.
If the asset is still processing in some fashion, that too will be reflected in the Upload Status, in which case, you can update the "last checked" field in your pending assets list and you'll either get the callback when things finish or you'll check back when your threshold is reached once more.
If there was an error and the ASSET_ERROR callback did not reach the host application, you'll receive an API error when you use the placeholder ID. This is because ConceptShare will have discarded the asset placeholder ID when ingestion failed.
Ideally, this component would run on a predetermined schedule, either as a scheduled event for each entry added to the pending assets list, or as a maintenance routine which runs at a set interval and checks all remaining entries.
Additional Notes: Networked Storage (Legacy)
You may have noticed a third set of API functions in the API reference documentation using Local URIs. These are legacy API calls; a throw-back to a time when on-premise deployments of ConceptShare were supported. In those cases, if the deployment included networked storage (Storage Area Network), you could push assets into ConceptShare by their local URI using any of the Add*AssetFromLocalUri calls. This call triggered the background queue service to start a worker thread that would download the file in the background, allowing the user to proceed with other tasks until the upload is completed.
- AddProjectAssetFromLocalUri
- AddVersionedAssetFromLocalUri
Deltek Project Nation Newsletter
Subscribe to receive the latest news and best practices across a range of relevant topics and industries.