Open mcoffin opened 8 years ago
The way I see it, there are four ways of going about this.
I'm leaning towards 2 the most right now, as it lets us stay in the java servlets / WAR pattern and lets us stay with the standard typesafe config library. Moving away from typesafe config would require some code changes that wouldn't exactly be fun.
Within option 3, there are a few options.
Option 1 would be the least restrictive in terms of how aion is deployed, whereas 2 would definitely be a more standard approach, but would restrict us to OSGi-based deployments (which might not be that big of a deal, so long as we provide an alternative for non-OSGi deployments, which would just be a lot of work).
This is blocking #28
This is blocking #31
While all configuration is loaded from a single place (TypeSafe config file) right now. There are really two separate components to configuration.
SplitStrategy
instances.DataSource
sIdeally, DataSource's would be able to choose how they are configured based on how they are discovered (i.e. they could use the OSGi configuration admin service in an OSGi environment, but default back to using TypeSafe config).
In this pluggable way, I think it makes the most sense to start building around loading in an OSGi environment, and using OSGi-style configuration.
SchemaProvider
instance to load the schema configuration from TypeSafe config files provided by bundle fragments.DataSource
instantiations (i.e. CassandraDataSource
).SchemaProvider
, DataSource
, and SplitStrategy
will all be exposed as OSGi services instead of being hard-coded. This implementation will fix #28.
While using typesafe's config library's default mechanism for loading configuration files (via
ConfigFactory.load()
) works decently for single-application systems, it gets more complex when deploying things as awar
like how aion is meant to be deployed.Consider, for instance, a web application that consists of two
war
s. One is aion, and another is another application that uses typesafe config. One might have to merge the two configuration files, which would be a pain.