This PR makes Cyclades more modular and extendable, by implementing
support for external backend drivers on the Image Service of Cyclades
(Plankton).
Until now, Plankton was directly creating and using an instance of the
Pithos backend, which has the following downsides:
The two services are using the same Database
The Plankton Service becomes an Archipelago peer
The goal of this PR is to decouple those components and make Cyclades
able to use a different backing store for Plankton by means of external
drivers. The current implementation that is using the Pithos backend is
provided as the default driver implementation. An alternative
implementation based on Pithos could use the Pithos public HTTP API
instead of directly importing the client.
The first commits of this PR make some minor modifications to the
PlanktonBackend and how it is used throughout the code to make it more
modular.
The last commit, adds the PLANKTON_BACKEND_DRIVER setting that can be
used to define the driver class that will be used and moves the existing
backend implementation to synnefo.plankton.drivers.pithos_driver.PithosPlanktonDriver.
This PR does not modify the functionality of Plankton in any way, and it
maintains full compatibility with the previous code path. User-wise,
there are no visible changes. Hopefully, the flexibility to implement
custom drivers will prove useful.
Hello!
This PR makes Cyclades more modular and extendable, by implementing support for external backend drivers on the Image Service of Cyclades (Plankton).
Until now, Plankton was directly creating and using an instance of the Pithos backend, which has the following downsides:
The goal of this PR is to decouple those components and make Cyclades able to use a different backing store for Plankton by means of external drivers. The current implementation that is using the Pithos backend is provided as the default driver implementation. An alternative implementation based on Pithos could use the Pithos public HTTP API instead of directly importing the client.
The first commits of this PR make some minor modifications to the PlanktonBackend and how it is used throughout the code to make it more modular.
The last commit, adds the
PLANKTON_BACKEND_DRIVER
setting that can be used to define the driver class that will be used and moves the existing backend implementation tosynnefo.plankton.drivers.pithos_driver.PithosPlanktonDriver
.This PR does not modify the functionality of Plankton in any way, and it maintains full compatibility with the previous code path. User-wise, there are no visible changes. Hopefully, the flexibility to implement custom drivers will prove useful.