-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: asyncio-based CDK #34424
Closed
Closed
WIP: asyncio-based CDK #34424
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eption type not being caught
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
octavia-squidington-iii
added
area/connectors
Connector related issues
CDK
Connector Development Kit
connectors/source/salesforce
labels
Jan 22, 2024
@clnoll what's the status of this PR? Just wondering as I created a filter for PRs that have the extensibility team as a required reviewer and noticed it. |
@erohmensing this is not going anywhere any time soon. Closing it now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up to the POC that shows how to integrate asyncio into the CDK and Salesforce connector.
This demonstrates how we might split out an asyncio-based CDK module.
High-level overview:
In this implementation, we interact with the CDK from the same entrypoint (although it's worth considering whether to create a new asynico-based entrypoint).
To make use of the asyncio-based concurrency, connectors will inherit from the
AsyncAbstractSource
andAsyncStream
, which provide async versions of theabstractmethods
required for the Airbyte commands. This code also includes aSourceDispatcher
which can route requests to either synchronous or async sources, for backwards compatibility.Outside of swapping out the
requests
library foraiohttp
, there is just one other major change to support the async functionality, which is the introduction of aSourceReader
. This was required to bridge the entrypoint's sync code with the async code.The
SourceReader
is instantiated by the source. When instantiated, it creates a queue, and kicks off a single thread that will do the async work. Instead of emittingAirbyteMessage
s on this second thread, they're enqueued in theSourceReader
's queue, and the async source, usingSourceReader
as an iterator, reads and emits items from the queue.This will replace the infrastructure for the thread-based implementation, which I won't go into detail on here, but here's a diagram giving a simplified overview.
TODOs:
StreamReader
.