Skip to content
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

[Tracking] roll into botocore #36

Closed
thehesiod opened this issue Mar 6, 2016 · 10 comments
Closed

[Tracking] roll into botocore #36

thehesiod opened this issue Mar 6, 2016 · 10 comments
Labels

Comments

@thehesiod
Copy link
Collaborator

just wondering, thanks!

@jettify
Copy link
Member

jettify commented Mar 6, 2016

I do not object, just do not see clean way how to accomplish this. Could be tricky because botocore also supports python2.7 and aiobotocore uses yield from heavily.

@thehesiod
Copy link
Collaborator Author

perhaps making the aio portion available for python3.x only? I think they do a similar thing with pyzmq: http://pyzmq.readthedocs.org/en/latest/api/zmq.asyncio.html

@thehesiod
Copy link
Collaborator Author

I see this is being tracked in boto/botocore#458

@jettify
Copy link
Member

jettify commented Jul 1, 2016

the best way to handle this issue if client could be somehow abstracted from query/url/headers builder from IO. Nice approach also used here https://github.com/cablehead/python-consul

@thehesiod thehesiod changed the title [Question] is there a plan to roll this into botocore? [Tracker] roll into botocore Feb 16, 2017
@graingert
Copy link
Contributor

@jettify an option for abstraction of IO from any code: https://gist.github.com/graingert/ca6cdd5d9ae2e18ca917b4594ac8a633

@jettify
Copy link
Member

jettify commented May 22, 2017

We need to start thinking how to patch botocore so we can plugging our code using public api, for instance first easy change is to update https://github.com/boto/botocore/blob/develop/botocore/session.py#L108-L109 Session object to accept ClientCreator, so in aiobotocore we just pass AioClientCreator without coping screen of code.

@thehesiod
Copy link
Collaborator Author

perhaps we can have a class by class goal of rolling into botocore to make it bite-sized chunks of work. But I think before that we need a high-level strategy defined of how we want this to integrate into botocore to create a straw-man we can work towards and get botocore dev approval on the design.

@thehesiod thehesiod changed the title [Tracker] roll into botocore [Tracking] roll into botocore Jun 20, 2017
@thehesiod
Copy link
Collaborator Author

another option is switching to the c++ library: https://github.com/aws/aws-sdk-cpp this would greatly increase performance as well, mainly due to signing.

@dazza-codes
Copy link
Contributor

dazza-codes commented Feb 15, 2020

The general pattern in botocore is to register components or to hook up callbacks to an event-emitter (which itself could be a component). See

  • https://boto3.amazonaws.com/v1/documentation/api/latest/guide/events.html#boto3-specific-events
  • the boto3 example shows how to replace the BaseClient with a substitute parent class, which could be AioBaseClient
  • it also shows how to add custom methods on a client; aiobotocore could add new async methods that could be used side-by-side with existing "synchronous" methods rather than replacing those methods (if the botocore API is preserved and extended with new async methods, it might have a better chance of inclusion in botocore)
  • the boto3 event documentation is better than botocore event documentation, but essentially the same event system is used in botocore and boto3
  • moto uses the event system to apply mocks as before-send callbacks

In that context, aiobotocore might create and register components for:

  • custom event emitter that uses coroutines that can be awaited
  • custom client creator and client that can await event callbacks
  • custom client event handlers/coroutines that can be awaited

It’s not clear whether this would be any different, in the end, than what aiobotocore is already. This might be an alternative pattern to explore in aiobotocore as a POC, but it’s not clear whether it would work and it’s got little chance, if any, of ever getting merged into botocore (lots of useful PRs are stale on botocore).

Copy link

This issue has been marked as stale because it has been inactive for more than 60 days. Please update this pull request or it will be automatically closed in 7 days.

@github-actions github-actions bot added the Stale label Aug 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants