You can have a look to https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html … or the symfony router who is even faster
-
-
Replying to @lyrixx
I found this article a while ago, and I wanted to try regex aggregation (after compilation) but so far FSM solutions have not been fast enough :/
1 reply 0 retweets 0 likes -
@burntsushi5 has released a version of the regex crate where expressions are compiled at compiled-time. It might interest you. I think it is https://crates.io/crates/regex-automata ….1 reply 0 retweets 0 likes -
I don’t need compile time, routing is modified at runtime. But a more efficient aggregation of thousands of regexes would be interesting. I tried the fst crate but I don’t understand it enough yethttps://github.com/sozu-proxy/trie_benches/blob/master/src/experiment4_fst.rs …
1 reply 0 retweets 1 like -
I was about to suggest fst!
@burntsushi5 wrote a blog post to explain how it works AFAIK.1 reply 0 retweets 0 likes -
I read it a few times already :) Things that are annoying for my use case: the list of keys must be sorted, so if I edit it I must regenerate the whole machine. Regexes apparently generate huge machines? I do not understand yet the format generated and interpreted
4 replies 0 retweets 1 like -
Fsts and fsms general are not suitable for online mutation. I saw no accessible description of the problem you're trying to solve though, so it's hard to give advice. If you really require mutation instead of just building all at once, then choices are limited.
1 reply 0 retweets 0 likes -
Here's the description of the issue: https://github.com/sozu-proxy/sozu/issues/571 … it's about domain and url matching in the sozu proxy. I've put tries to good use but the patterns they support are limited
1 reply 0 retweets 0 likes -
Yes, i read that but can't really make sense of it. There are no examples. Inputs and outputs aren't clearly defined. If you really just need to match a bunch of literals then use aho corasick. I also don't understand why RegexSet doesn't work for your use case.
1 reply 0 retweets 0 likes -
Thanks for your help anyway, I'll test with RegexSet and check if aho corasick can fit. BTW fst is awesome, I learned a lot playing with it and reading up on it :)
1 reply 0 retweets 1 like
No problem. Feel free to ping me on that issue if you can nail the problem down a bit more. :-)
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.