4

I need to make a web app which provides the feature to install/uninstall plugins. Think of something like Eclipse IDE like software. The only difference is you cannot restart it like Eclipse to apply changes. I guess I can say, it would be similar to Wordpress.

I thought of am implementing this using OSGi as follows: Whenever a new plugin is installed, new HTTP servlet will be registered at Http Whiteboard. These exposed servlet endpoints will be used by other bundles as well as third-party apps which are present outside. Each plugin will be developed separately as an OSGi bundle. I can use Apache Felix web console to allow the user to install/uninstall bundle of his choice.

The problem with OSGi is that there is very little support available.

  1. Is there any better architecture and framework to do this?
  2. Anyone knows about Wordpress plugin ecosystem architecture?

Note: I have already looked at https://stackoverflow.com/questions/323202/how-to-design-extensible-software-plugin-architecture. It was asked 10 years ago. My question is more specific and I hope that lot must have happened in this area in last 10 years.

10
  • Are you only looking for Java answers?
    – Paul
    Feb 19, 2018 at 4:27
  • @Paul Preferred but I am OK with other languages too. Feb 19, 2018 at 4:31
  • 2
    Applications that don't need restarts to apply changes are still a smuch a headache nowadays than before, becuse such stuff is complicated. It's more usual to have a cluster which you upgrade node by node (restarting them) while ensuring than node version N and node version N+1 can still communicate. Do your application really can't afford some reloading time ?
    – Walfrat
    Feb 19, 2018 at 11:37
  • @Walfrat Good point. Unfortunately, hundreds of clients will be communicating with this and high availability is expected. So, I think restart is not an option. Feb 19, 2018 at 15:17
  • What I described : multiple nodes in a cluster that you upgrade one after another shouldn't interrupt avaibility that is if you have an architecture that can handle that (shared session, disabled nodes that will be soon upgraded on load balancing, automated deployment) should be able to handle that. Of course you can first reduced the need to reboot nodes by splitting your webapplication into smaller ones, or at least, split static resources and dynamic content. Knowing how to do that is pretty such a job in itself :/
    – Walfrat
    Feb 19, 2018 at 16:18

1 Answer 1

3
+25

Personally, I'd implement the client side of this using WebComponents and the concept of "micro-frontends". Though your question is pretty broad it seems like you already have the backend part figured out for the most part but as this is a heavy client side app (assuming from the fact that you cannot afford to even refresh the page) it makes sense to me to use native browser APIs to register your plugins as web components. Even your "main" should be compatible with this plugin architecture, being able to supply the state to other plugins seamlessly and manage things like layout / selection of your plugin. Do you have any other questions regarding this type of architecture? Besides "up time" what additional requirements and use Cases need to be heavy? What state is needed? What do these plugins do?

2
  • Awesome! This is new info. for me! Please explain more. I don't have any other requirements apart from up-time. I'm not so much worried about it being heavy. To understand what plugins do, the typical use case is a plugin computes some quantities and shows them on UI. The following image should make more clear what I am thinking: pasteboard.co/H94TMHC.jpg Feb 24, 2018 at 5:47
  • @nikhilchilwant I apolgize for responding 4 months later. I suppose i havent checked my SO in a long, long, long time. Please let me know if you ever got a solution. Jun 27, 2018 at 22:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.