angelo icon indicating copy to clipboard operation
angelo copied to clipboard

Modular routing

Open nash8114 opened this issue 7 years ago • 2 comments

I've added a "map" method for the Angelo::Base class, which will map an Angelo::Base class (or descendent thereof) to a path. The accompanying spec file describes it for the most part.

In this approach I've added the "mapped_module" routing directly in Angelo::Server#route! An alternative would be to use a specialized Router class object. This would save a little overhead on routing for all Angelo::Base objects. Another alternative would be to create a module which can be imported if routing is wanted (in which case the overhead increases only for the class on which it is imported)

Perhaps we can do some profiling to determine the benefits and cost of each approach.

nash8114 avatar Jan 03 '18 18:01 nash8114

@nash8114 hello, thanks for using angelo and sorry for the late reply. i hope to have time to look at your work this week.

kenichi avatar Jan 09 '18 23:01 kenichi

some very basic initial profiling does show a drop off in handled requests per second on this branch. perhaps a more opt-in approach might be best.

kenichi avatar May 28 '18 21:05 kenichi

This pull request has been stagnant as I've not been using angelo for a while.

nash8114 avatar Nov 02 '22 14:11 nash8114