Pattern for develping an extensible application with immutable deployment environment

Viewed 30

This is the problem at hand:

I'm developing a system that has as one of its core requirements extensibility: there should be the ability to develop plug-ins that extend the core functionalities. The application will provide some core API and developers will be able to write packages and extensions that add features.

One thing I'm having issues designing is the following: let's say a plug-in is represented as a folder with a certain structure; how should the plug-in be installed onto the main application?

Traditionally, many web apps used to be extensible by means of uploading a plug-in's code to a specific folder inside of the application, with some mechanism for the main application to discover new plug-ins.

The way I plan on deploying the application I'm developing is by means of containers: either by writing a Dockerfile for it, or by using Dokku. Both of those ways involve working with a repository and deploying to immutable environments: this makes the idea of adding code to a folder problematic because that code would be versioned and would change the repository, which is not what I want because adding a plug-in shouldn't be something that alters the codebase in my opinion.

For example, if somebody decides to fork the repository of my application, add a folder with the plug-in, and deploy it, it'll be problematic to stay in sync if the main codebase is updated.

For this reason, I'm trying to come up with a way to add plug-ins to an application without touching its code base and in a way that is compatible with immutable deploying such as when using docker.

Are there any known patterns for achieving this? If it's relevant, the system I'm developing is made up of two separate applications: a Django REST backend and a Vue.js frontend, both deployed in two separate containers.

0 Answers
Related