Yesterday I pushed to GitHub a small Crystal library called Toro, an acronym of Tree-Oriented Routing. If you are familiar with Cuba or Syro, you will notice the similarity.
This uncommon way of structuring routes is probably the one that yields the best performance; the search for the correct match is gradual, and once a segment is matched all the other attempts at that same level are not even evaluated.
Toro is not the right tool for building full featured websites,
as it completely lacks a security layer. Still, it fulfills my
current needs as it lets me specify an API in a way that is both
elegant and performant. At this point, I know what you may be
thinking: performant
is not a word. You may be right, as explained
elsewhere, but I think it should be a valid word, and here's
my definition: Performant (adjective): getting outstanding results
given the means employed
.
⊙