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
Internal and remote actor invocation optimization #7231
Conversation
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7231 +/- ##
==========================================
- Coverage 62.30% 62.25% -0.05%
==========================================
Files 240 240
Lines 22159 22135 -24
==========================================
- Hits 13807 13781 -26
- Misses 7193 7200 +7
+ Partials 1159 1154 -5 ☔ View full report in Codecov by Sentry. |
…ctor-messaging Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
…ctor-messaging
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
/ok-to-test |
Dapr E2E testCommit ref: f8d0517 ✅ Build succeeded for linux/amd64
✅ Infrastructure deployed
✅ Build succeeded for windows/amd64
✅ Tests succeeded on windows/amd64
✅ Tests succeeded on linux/amd64
|
…ctor-messaging Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Dapr SDK Python testCommit ref: 853c705 ✅ Python SDK tests passed |
Dapr SDK Java testCommit ref: 853c705 ❌ Java SDK tests failedPlease check the logs for details on the error. |
Dapr SDK Go testCommit ref: 853c705 ✅ Go SDK tests passed |
Dapr SDK JS testCommit ref: 853c705 ✅ JS SDK tests passed |
…ctor-messaging Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Please fix conflicts. Codes looks good to me. |
…leAle/dapr; branch 'master' of https://github.com/dapr/dapr into internal-actor-messaging Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ctor-messaging Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* WIP Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Bunch of fixes in tests Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More tweaks Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixes and improvements to code legibility Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Use a lock around internalActors property Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * 💄 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixed last test Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Changed per review feedback: use a single struct for reminders and timers Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * WIP: use factory for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Improve APIs for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated comment Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com>
* WIP Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Bunch of fixes in tests Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More tweaks Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixes and improvements to code legibility Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Use a lock around internalActors property Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * 💄 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixed last test Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Changed per review feedback: use a single struct for reminders and timers Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * WIP: use factory for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Improve APIs for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated comment Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com>
This reverts commit e45de2c.
* WIP Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Bunch of fixes in tests Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More tweaks Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixes and improvements to code legibility Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Use a lock around internalActors property Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * 💄 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixed last test Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Changed per review feedback: use a single struct for reminders and timers Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * WIP: use factory for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Improve APIs for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated comment Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com> Signed-off-by: Elena Kolevska <elena@kolevska.com>
This reverts commit e45de2c. Signed-off-by: Elena Kolevska <elena@kolevska.com>
* WIP Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Bunch of fixes in tests Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More tweaks Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * More test fixes Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixes and improvements to code legibility Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Use a lock around internalActors property Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * 💄 Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Fixed last test Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Changed per review feedback: use a single struct for reminders and timers Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * WIP: use factory for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Improve APIs for internal actors Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> * Updated comment Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --------- Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com> Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com> Co-authored-by: Loong Dai <long.dai@intel.com>
This PR changes the data structures used for actor invocation (direct messaging, reminders, timers), optimizing them for when internal and remote actors are invoked.
pkg/messaging/v1.InvokeMethodRequest
, which is optimized for invocations on the app channel. This changes the main data structure to bepkg/proto/internals/v1.InternalInvokeRequest
, which is the same that is used for local and remote actor invocation. This avoids unnecessary conversions to/from the messaging data structure, which is meant for a different purpose and optimized for streaming.All told these changes should improve performance, especially when invoking internal actors, and reduce allocations.