Skip to content

Add "small message" net fallback#36

Closed
sarahsturgeon wants to merge 2 commits into
mainfrom
feature/net-send-fallback
Closed

Add "small message" net fallback#36
sarahsturgeon wants to merge 2 commits into
mainfrom
feature/net-send-fallback

Conversation

@sarahsturgeon
Copy link
Copy Markdown
Member

@sarahsturgeon sarahsturgeon commented May 27, 2023

After our latest performance tests, it became clear that Express performs poorly for small messages.
But we already knew that, Express wasn't made to send small messages - no big surprise.

Well, based on our current per-key storage metrics, people are sending tons very small messages using Express. Unfortunately with messages this small, their experience will be exclusively worse than if they had just used a net message.

The performance tests highlighted another important thing: Express is only worse for messages that require 3 or fewer net messages.

This is interesting. If we look at both the usage metrics and the performance results, we find a cheap way to improve Express.

I don't necessarily want to make a pure-net data sender, but we could pretty easily cover the situation where a message could fit into a single net message.

That's what this PR does; it redirects small message payloads through the net library instead of the Express API, while still behaving the same way (calling receivers, respecting preDl receivers handling proofs, etc.).

I want to take this opportunity to refactor a few things and slim down the code, so the diff will be large but the functional changes will be few.

I also need to decide what to use as the id for these "small" messages in the callback chain. (some callbacks want the item ID). I don't want to introduce a regression, but I also don't want to write any worse code...

@sarahsturgeon sarahsturgeon added the enhancement New feature or request label May 27, 2023
@sarahsturgeon sarahsturgeon self-assigned this May 27, 2023
@sarahsturgeon sarahsturgeon mentioned this pull request Jan 21, 2024
2 tasks
@sarahsturgeon
Copy link
Copy Markdown
Member Author

This will be addressed in #37

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant