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

Initial asyncio support #906

Merged
merged 7 commits into from
Jun 26, 2021
Merged

Initial asyncio support #906

merged 7 commits into from
Jun 26, 2021

Conversation

WhyNotHugo
Copy link
Member

@WhyNotHugo WhyNotHugo commented Jun 17, 2021

So far, all storage test pass with xandikos (a few more with radicale) with the dav storages. Haven't gotten to the google storage.

All system and unit tests pass. Manually experimenting with sync, discover and metasync the basics all seem intact, but this still needs more thorough testing.

Non-dav storages have not really been ported, they just "work with the new async interface", but don't really operate async, so don't really have any performance changes.

For dav storages, preliminary results show that this is much faster than multi-threaded support, but there's still a lot of work to be done to really unlock all the benefits we can get from using asyncio. There's some reduction in code complexity by trimming out the threading support too.

I'm not 100% happy about passing a TCPConnector around so much, but it makes limiting the maximum amount of connections very easily at a global level.

I'll likely need some special wrapper to limit the amount of open files in a similar way (with a limit and a queue).

Missing

  • google storage to asyncio. Still need to find a library for aiohttp + oauth.
  • google storage testing. There's no tests for that, so need to set some up to make sure this still works.
  • etesync is still tied to run as a module rather than standalone, and won't work with our dependencies.

Other changes

  • Only sha256 fingerprints for certificates are not supported. sha1 and md5 are insecure and have been dropped.

@WhyNotHugo WhyNotHugo force-pushed the async branch 2 times, most recently from 9f84e4d to 88e9fb0 Compare June 19, 2021 14:25
@WhyNotHugo WhyNotHugo force-pushed the async branch 7 times, most recently from 4b6e331 to 0f491a6 Compare June 26, 2021 10:18
Hugo Osvaldo Barrera added 3 commits June 26, 2021 13:02
This is mainly in preparation to moving to an async architecture.
Hugo Osvaldo Barrera added 4 commits June 26, 2021 13:40
Add asyncio to the storage backends and most of the codebase. A lot of
it merely uses asyncio APIs, but still doesn't actually run several
things concurrently internally. Further improvements will be added on
top of these changes

Thanks to  Thomas Grainger (@graingert) for a few useful pointers
related to asyncio.
@WhyNotHugo WhyNotHugo changed the title WIP: Initial asyncio support Initial asyncio support Jun 26, 2021
@WhyNotHugo WhyNotHugo merged commit 152ebb0 into master Jun 26, 2021
@WhyNotHugo WhyNotHugo deleted the async branch June 26, 2021 13:56
sumnerevans added a commit to sumnerevans/nixpkgs that referenced this pull request Jan 11, 2023
This makes the "google" storage work again after the upstream asyncio
refactor: pimutils/vdirsyncer#906

Signed-off-by: Sumner Evans <me@sumnerevans.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants