Wow - serendipity. I'm in a similar situation, just starting to get my mind around this same problem - having the module/app "know" which backend is up.
Any chance I could take a peek at your solution? The idea of "little objects that score themselves" intrigues me...