External Service Overview¶
External Services in 3DIAX involve 3 parties: DIAX, users and providers. Generally, users have data in 3DIAX and wish to operate on that data using services offered by providers. Providers may have services that are freely available to the public or services that have complicated pricing structures.
Let’s explain how this works with an example. We have a user, Gareth, that uses 3DIAX. He has a user account in 3DIAX and a collection of models. He would like to ensure his models are printable by healing those models. There is a provider, FixMyPrint, that has some advanced technology to repair models and make them fit to print.
First FixMyPrint needs to indicate to 3DIAX that it wants to provide its model healing to users on 3DIAX. FixMyPrint creates a user account and a group, and registers itself with 3DIAX as a provider. 3DIAX then generates a shared secret to FixMyPrint.
FixMyPrint will now be listed in the registry of partners that provide model repair services. FixMyPrint saves the shared secret for future communication with 3DIAX.
FixMyPrint is not a free service and requires users to have an account with a balance to pay for transactions. Gareth doesn’t know this at first. He finds FixMyPrint in the list of partners and attempts to send his model across.
When 3DIAX communicates with FixMyPrint about Gareth’s intentions FixMyPrint rejects the request indicating that 1) it doesn’t recognize Gareth as a user in its system and 2) it needs payment. 3DIAX passes the message along to Gareth which includes information about where he can register with FixMyPrint.
Gareth goes to FixMyPrint, establishes an account and requests from FixMyPrint a token for 3DIAX. FixMyPrint provides this token and signs it using the shared secret it received when it registered with 3DIAX.
Gareth then provides this token to 3DIAX. 3DIAX can check the signature using the shared secret it provided to FixMyPrint and verify that it is indeed a token from FixMyPrint, and the token identifies the account that Gareth uses with FixMyPrint
3DIAX will store this account information against Gareth’s account with 3DIAX and use it for future transactions that Gareth requests with FixMyPrint
Gareth now retries his request to have his model repaired. This time 3DIAX adds his FixMyPrint account information to the request and signs it. FixMyPrint recognizes the signature and the account information and can bill Gareth’s account correctly for the operation. It signals the transaction can proceed.
3DIAX then provides temporary credentials to FixMyPrint to access the model in Gareth’s account that is to be repaired as well as a location to download the model over a secure channel. FixMyPrint downloads the model.
FixMyPrint repairs the model and signals to 3DIAX that the repair is complete. It provides a location where 3DIAX can download the model and put it into Gareth’s model repository.
3DIAX then informs Gareth that the model is repaired and available. This could happen via a callback HTTP request or just whenever Gareth next communicates with 3DIAX. Gareth can download the repaired model or use it in another 3DIAX service to slice or print it.
There are several important features to identify in this workflow.
First, FixMyPrint was able to initiate its inclusion into 3DIAX itself without any need for 3DIAX to do custom work to accomodate its service. FixMyPrint decides it wants to be part of the 3DIAX ecosystem and can dictate the terms, including how users provide payment or maintain accounts. 3DIAX only acts as a secure broker in these relationships.
Second, this system works with or without a browser. The passing of security tokens follows standards that do not require the use of a UI (though UIs can certainly be built on top of them). As such the process is friendly to desktop applications, scripts, web applications and embedded systems with a network connection. Even open source projects can work with 3DIAX (though that workflow is slightly different than this one and involves a per-user rather than per-service shared secret).
Third, all mechanisms support pushing notifications and asynchronous workflows. The model healing process can take as long as it needs to take and the system will handle it appropriately.
Now that you have seen the overview take a look at the External Service Provider Reference to get started making your service ready to integrate with 3DIAX.