brooklyncentral/brooklyn — pull request #31 by ahgittin (2012-04-26 15:13:40+00:00)
Title: global-web-fabric example and lots of improvements along the way

This adds a multi-location fabric example and some changes elsewhere to make it robust.
These include:

* location-lookup support if you have installed the free MaxMind geodns data,
or configure lookup support for an external service
* Cloud Foundry promoted from sandbox to systems/
* jclouds ComputeService cache (so we don't spin up lots of redundant instances,
all of which want to pull down all AWS images...)
* mutex support for running multi-cf instances (also tidies how software is installed)
* fix nginx subscription/discovery for target entities (wasn't 100% reliable)
* change geoscaling discovery to be more like nginx (still not ideal, but good enough for now)
* clarification of a service's hostname and the URL it responds to, as these will be different
when geo-load-balanced
* minor fixes and improvements elsewhere

I'm not thrilled with the use of properties in location, with inheritance, side-by-side with HostGeoInfo
lookup; but as both these previously existed I have just (attempted to) make better use of them.

I'd like to clean this up at some point, but that needs a separate discussion.
(My rough thinking is to make TypedKey a util class, then EntityConfigKey extends this,
as does LocationPropertyKey; and figure out map support for this,
so that host-geo-info just becomes some derived properties. And make apps inherit config
from their management context, which loads from brooklyn.properties by default.
But this needs more thinking, as a separate issue if people agree.)

I'd also like to ask MaxMind for permission to modify their code (used in MaxMind lookup),
or for them to release it dual-licensed under APL2 (and ideally release it to maven central).
It should be good publicity for them. As we haven't changed their code and are reproducing
it in its entirety then compiling it for use as a library, I think we are clearly in compliance with
their (LGPL2) license terms.