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

[Experiment] Synchronous send() #233

Conversation

mathias-baumann-frequenz
Copy link
Contributor

@mathias-baumann-frequenz mathias-baumann-frequenz commented Mar 2, 2023

This PR tries together with frequenz-floss/frequenz-channels-python#75 to make sender.send() synchronous.

It contains a few commits of my active PRs, but the main part are the changes in all the SDK to make the tests and existing code work when send() is synchronous.
See the last 2 commits.

Motivation for this: Code simplicity and speed. In my benchmark, it changed the throughput from 30k/s to 80k/s.
You should be able to run the benchmark when you have checked out this branch using

PYTHONPATH=. python benchmarks/timeseries/benchmark_datasourcing.py 15 1000 # 15 evcs, 1000 msgs per bat.

This is to be seen as an experiment/prototype PR to test this idea. Feel free to check it out and find errors.
Locally, with the correct channels changes, all tests succeed for me.

Note that you need the channel changes as well for this to work

@github-actions github-actions bot added part:actor Affects an actor ot the actors utilities (decorator, etc.) part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests labels Mar 2, 2023
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
When the senders closed the channels, the datasourcing actor will also close its sending channels.

Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Signed-off-by: Mathias L. Baumann <mathias.baumann@frequenz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:actor Affects an actor ot the actors utilities (decorator, etc.) part:data-pipeline Affects the data pipeline part:docs Affects the documentation part:microgrid Affects the interactions with the microgrid part:tests Affects the unit, integration and performance (benchmarks) tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants