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

Feature request: synchronous API variant #532

Closed
owenpearson opened this issue Sep 21, 2023 · 9 comments · Fixed by #537
Closed

Feature request: synchronous API variant #532

owenpearson opened this issue Sep 21, 2023 · 9 comments · Fixed by #537
Assignees
Labels
enhancement New feature or improved functionality.

Comments

@owenpearson
Copy link
Member

Create a synchronous API variant so that users upgrading from <= 1.1 can do so without having to use the newer asyncio APIs.

@owenpearson owenpearson added the enhancement New feature or improved functionality. label Sep 21, 2023
@sync-by-unito
Copy link

sync-by-unito bot commented Sep 21, 2023

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3862

@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 28, 2023

unasync requires use of setup.py file. Alternative way to do it in poetry itself -> https://stackoverflow.com/questions/60073711/how-to-build-c-extensions-via-poetry

@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 28, 2023

Link to internal conv - https://ably-real-time.slack.com/archives/C030C5YLY/p1695733725858389
Low level asynios eventloop apis -> https://docs.python.org/3.7/library/asyncio-eventloop.html
High level task and coroutines build on top of asyncio eventloop -> https://docs.python.org/3.7/library/asyncio-task.html#asyncio.run

@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 28, 2023

@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 28, 2023

@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 28, 2023

Use of multithreading for sync variant APIs will be avoided as per #534. There's an explicit requirement in the spec to use shared active fallback for HTTP requests, so the use of multithreading will create an overhead to manage active fallback ( same question raised at #531 (comment))

@sacOO7 sacOO7 self-assigned this Sep 28, 2023
@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 28, 2023

Update documentation as a part of -> #530

@sacOO7
Copy link
Collaborator

sacOO7 commented Sep 29, 2023

There's one more unasync implementation -> https://github.com/alex-sherman/unsync.
Checking usage for the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment