-
Notifications
You must be signed in to change notification settings - Fork 54
0007 use guava ioc as service selector
Bruno Thomas edited this page Nov 23, 2021
·
1 revision
Date: 2018-08-01
Accepted
We need to make run Datashare in local mode on small configs, and also to make it run on AWS server clusters.
So we could use :
- for database : sqlite in localmode, postgresql in server mode
- for databus : memory databus in local mode and redis in server mode
- for index : embedded Elasticsearch in local mode and distinct cluster in server mode
That means that we will have different implementations for the services.
We will use dependency injection pattern to choose the concrete implementation for datashare services. As springframework is quite heavy with large XML configuration description files, we will use Guava.
The Application context will be defined at launch with Guava depending on the executable arguments (run mode).