Comments (6)
I don't have an answer to your problem but I'm curios to see if anyone faced a similar request and if they solved the problem.
In the same SaaS context I have a request for a plug-able features, each feature comes with a contribution for database layer (create new tables, alter existed tables, .. - using flyway or liquibase), service layer and so on. Things seem relatively simple until this SaaS intervenes (multi tenant, ..).
from pf4j.
Indeed, in my current design, I've integrated multi-tenancy and established a table that tracks each tenant's installed plugins along with their respective statuses, whether they're marked as "STARTED" or "STOPPED."
However, the challenge arises when dealing with plugins that possess multiple versions yet belong to the same package.
Your insights on this matter would be greatly appreciated.
from pf4j.
To make a summary, if I understood correctly you have an application (SaaS platform) with a bunch of plugins, there is the possibility that one or more plugins come in several versions.
You have a store (database table) where you keep some metadata related to what plugins (plugin <-> version pair) uses each tenant (customer) and the status of these plugins for that tenant (started, stopped, ..).
The idea is that your application uses the same logic (code base) for all tenants -> your application loads and starts a bunch of plugins for all tenants. If your plugins come with extensions => you use getExtensions(Class<T> type, String pluginId)
method instead of getExtensions(Class<T> type)
method because you need to check if a plugin is "visible" for a tenant.
Is what I say correct, can you add additional information?
from pf4j.
Yes. But I am now using pf4j-spring to manage these plugins. So if Saas platform has different versions of plugins. Suppose different versions of plugins have the same package name and class name, in that case it will report an error. Because the same bean cannot exist in the same spring container.
Do I need to set up different spring containers for different versions of the plugin? Or do I need to specify that different versions of the plugin cannot have the same package name? Or is there another better solution here.
from pf4j.
Maybe the best place for a such question is pf4j-spring, because the problem is related to the integration of pf4j in a spring application.
Suppose different versions of plugins have the same package name and class name, in that case it will report an error. Because the same bean cannot exist in the same spring container.
An idea is to create a different spring ApplicationContext
(in SpringPlugin
) for each plugin version when you have multiple versions.
from pf4j.
Thank you for your reply. Maybe it is a good idea to create a different spring ApplicationContext (in SpringPlugin) for each plugin version. I will close this issure and search more ideas form pf4j-spring.
from pf4j.
Related Issues (20)
- CVE-2023-40826 Execution of arbitrary code via zippluginPath HOT 2
- Diagram from the "Plugin lifecycle" ? HOT 5
- Security updates release? HOT 1
- org.pf4j.PluginRuntimeException: Field 'id' cannot be empty but it exists HOT 3
- Where is the correct "entry point"? HOT 4
- Unload broken plugins HOT 1
- Load Plugin JAR Resource from Inside Plugin Code HOT 3
- LegacyExtensionFinder finds duplicate extensions
- Support Kotlin KSP with PF4J HOT 3
- Getting extensions by class when plugin is not started HOT 6
- Question: How to add extension point from another plugin for another plugin? HOT 3
- Feature request: Passing context variables HOT 2
- define the execution sequence of extensions across the plugins HOT 7
- Is pf4j compatible with arrch64 architecture? HOT 5
- Method AbstractPluginManager#loadPlugins logs and return silently for resolve plugins errors
- enhance the ModuleclassLoader to support dependency class load HOT 1
- pf4j vs dependency injection framework HOT 4
- v3.11.0 plugin status canβt change from STARTED to DISABLED. HOT 2
- pf4j for python or typescript? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pf4j.