Initial edit

jbirddog 2024-01-22 10:46:05 -05:00
commit b2d3a02df9
1 changed files with 32 additions and 0 deletions

@ -0,0 +1,32 @@
# Connectors and the Connector Proxy
## Service Tasks
1. Allow communication with external systems
1. In the core SpiffWorflow library, implemented using the [delegate pattern](https://github.com/sartography/SpiffWorkflow/blob/main/SpiffWorkflow/spiff/specs/mixins/service_task.py#L51)
1. SpiffWorkflow has no knowledge of "http/Get", "aws/StartEC2Instance", "os/SpawnProcess"
1. SpiffWorkflow handles parsing extensions, evaluating expressions, delegation to the host app, updating task data
1. The host application is responsible for the communication to the external system
## Connector Proxy
1. Middle man for external communication from the backend of Spiff Arena
1. Tailored for the backend, but could be used by other host applications
1. Made up of some group of Connectors and a discovery mechanism
1. Brokers communication to/from Connectors in a generic fashion
1. Allows the backend to remain agnostic to all external dependencies needed for varying deployments, avoiding things like:
1. ClientA wants to write to AWS, ClientB refuses to use any app with any mention of AWS
1. ClientA requires an old version of SomeSDK, ClientB requires a bleeding-edge version that would conflict
1. ClientA really needs to talk to a library that is written in Java
1. ClientA has a proprietary library that cannot be included in the backend
1. When the backend needs to facilitate a ServiceTask delegate call from SpiffWorkflow it does so in a generic fashion allowed by the Connector Proxy abstraction
## Connectors
1. Isolated Python packages that conform to a pre-defined protocol
1. Do the "actual work" of talking to an external system
1. Use data provided by the Connector Proxy to form the needed request
1. Make the request using the required protocol (HTTPS/FTP/Gopher/Fax/OS System Calls/docker run)
1. Use the result to form a response that can be returned through the Connector Proxy