Hi airbyte devs! I have been following the project for a while but today I got the chance to do a deeper dive. Kudos to you all 💯
At first when I saw that airbyte is using temporal I expected all the connector code to be implemented and registered as temporal activities (using temporal python sdk) deployed independently in containers. I would have imagined the Airbyte python CDK would have wrapped around the third party connector code as a temporal activity.
This would mean a temporal workflow can invoke connector activities (spec, check, discover, read) and they would be picked up by a temporal worker, retried if they fail, be cancellable ect..
But looks like temporal activities are used to run
containerized connector code but the underlying connector code does not communicate with temporal
directly anymore.
I think for each TemporalAttemptExecution a new container is created and the connector code is executed inside the newly recreated container. If the connector code fails in the container temporal does not know about it, and therefore can't retry the activity, handle cancellations and all the other nice things temporal does.. Also some of the container/process communication needs to be re-invented as this comes for free with temporal.
For example there now needs to be manual logic to cancel a running connector process.
Did I get this right? This makes me think that maybe I am overestimating temporal’s benefits? Is there a backstory in why connector code is not implemented as temporal activities? My guess would be that temporal python sdk was not mature enough (maybe still not) when airbyte was built.