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

Improve Literal path matching via state machine #2960

Open
987Nabil opened this issue Jul 13, 2024 · 17 comments · May be fixed by #3277
Open

Improve Literal path matching via state machine #2960

987Nabil opened this issue Jul 13, 2024 · 17 comments · May be fixed by #3277
Assignees
Labels
💎 Bounty enhancement New feature or request

Comments

@987Nabil
Copy link
Contributor

987Nabil commented Jul 13, 2024

Matching on path literals is currently done by set operations on a set of strings.
The idea would be to improve this, by creating a state machine, that transitions to the next state based on the chars of all the possible alternative path segments.
For example, if we have two segments on the same level aa and ab, we can only proceed if the first char is an a, the second a or b.
Also we might be able to make a check based on the input length and fast exist if non of the possible segments has the same length.

This requires benchmarking first. So we can compare the current to the state machine version.

@987Nabil 987Nabil added the enhancement New feature or request label Jul 13, 2024
@jdegoes
Copy link
Member

jdegoes commented Jul 30, 2024

/bounty $1250 for benchmarks and compilation to super fast state machines. Benchmarks should prove superior performance and happy path should be zero allocation, or as close as is theoretically possible.

Copy link

algora-pbc bot commented Jul 30, 2024

💎 $1,250 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #2960 with your implementation plan
  2. Submit work: Create a pull request including /claim #2960 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-http!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @987Nabil Jul 30, 2024, 3:31:17 PM #3277
🔴 @hoklims Nov 23, 2024, 9:33:25 AM WIP
🔴 @promisingcoder Dec 12, 2024, 2:46:45 AM WIP

@987Nabil
Copy link
Contributor Author

987Nabil commented Jul 30, 2024

/attempt #2960

Algora profile Completed bounties Tech Active attempts Options
@987Nabil    56 ZIO bounties
+ 1 bounty from 1 project
Scala
﹟1522
Cancel attempt

Copy link

algora-pbc bot commented Aug 6, 2024

@987Nabil: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Aug 13, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #2960 🙌

@RohanMishra315
Copy link

hey @987Nabil you working on these, i would like to do this ??

@987Nabil
Copy link
Contributor Author

Yes, i am

@hoklims
Copy link

hoklims commented Nov 23, 2024

/attempt #2960

Copy link

algora-pbc bot commented Nov 30, 2024

@hoklims: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Dec 7, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #2960 🙌

@promisingcoder
Copy link

promisingcoder commented Dec 12, 2024

/attempt #2960

@promisingcoder
Copy link

@jdegoes @987Nabil
please review my pull request

@promisingcoder
Copy link

@vigoo

@987Nabil
Copy link
Contributor Author

Please do not attempt this issue anymore. I already came to a conclusion and I have JMH benchmarks implemented and some fixes that are unrelated to the issue but will make the routing faster. We are not able to use state machines.
I leave this issue open until this changes are merged.

Copy link

algora-pbc bot commented Dec 19, 2024

@promisingcoder: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Dec 26, 2024

The bounty is up for grabs! Everyone is welcome to /attempt #2960 🙌

@987Nabil 987Nabil linked a pull request Jan 18, 2025 that will close this issue
Copy link

algora-pbc bot commented Jan 18, 2025

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants