ets:delete_all_objects(State#state.routes_table_id),ets:delete_all_objects(State#state.reverse_routes_table_id),ets:delete_all_objects(State#state.handlers_table_id),load(State),
I've been tinkering in the boss router a bit lately, and you're right about how the use of a gen_server guarantees atomicity.
But at the same time, a gen_server does present a potential bottleneck.
Frankly, I've been thinking the router controller might benefit from having the router configuration either compiled into an actual module (like how erlyDTL compiles html to a module), or using a routing handler, either of which effectively removes that potential for a bottleneck, and reloading the module with Erlang ensures atomic changes to the routing system.
Personally, I like the routing handler idea myself, as it requires less screwing around with compiler magic and also would make the router more flexible (more powerful than just regular expression matching). But it also makes the configuration a little longer. I still think it's a worthwhile tradeoff.
-Jesse
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/99d3f555-d07f-4ae2-9582-da818856216e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAPTXyXernM9JOVSJKjTJU63gwmJ9Oo7QwRaDbVB3tRfL_sBkxg%40mail.gmail.com.
Thanks Chan,
You had closed the request saying it needs more work. But I see you've reopened it without any changes.
What should I be wary of?
--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAB-OfhkBzKuSEyoorShUGCYXiDKtnLx5FYGZsp%3D7YN6zoKgeNQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAPTXyXcrHop94kaw6RPPwGM8U7BRNaDWNt1%3D7WcUnEFCV5uEgg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CAB-Ofhk_TenzO%2BdwbLaPNKu2ihB9mCvLNrVroxsXSs5H%2BZSyqQ%40mail.gmail.com.