From b2d3a02df9aab8887968ce89caa3a1d6d5ecf953 Mon Sep 17 00:00:00 2001 From: jbirddog <100367399+jbirddog@users.noreply.github.com> Date: Mon, 22 Jan 2024 10:46:05 -0500 Subject: [PATCH] Initial edit --- Connector-Proxy-in-5-mins.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Connector-Proxy-in-5-mins.md diff --git a/Connector-Proxy-in-5-mins.md b/Connector-Proxy-in-5-mins.md new file mode 100644 index 0000000..675e291 --- /dev/null +++ b/Connector-Proxy-in-5-mins.md @@ -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 + +