Hi
I’ve been contemplating this issue for quite some time and haven’t come across with a good solution and was wondering on your viewpoints and how you’d tackle this problem in the most efficient way possible.
The Problem:
I have many different projects built with Elixir/Phoenix and some are on the way to being released. If I only had 1-2 disconnected apps this would not be a problem.
During the years I’ve added a variety of bits and pieces such as a user management. CMS, Payment processing, accounting, invoicing and a variety of tasks which I’ve had in different libraries and programming language.
IN order not to “reproduce” the same functionality on all application I even created a phoenix library which installed such as phx.gen.auth.
HOWEVER due to my fiddling with many different technolgies on frontend (switching between tailwind, bulma, pure css + others), backend processing, even elixir apps, server side, cloudwise (kubernetes)
I soon found out that managing such a library created too many dependencies and it complicated the workflow enormously. Backwards compatibiity, upgrades, bugfixes and differences in Elixir, Erlang and PHoenix AND other libraries upgrades and deprecations made it impossible to actually get anything done over the array of the majority of the projects as the dependency cycle grew. Ex: I’ve had 2 apps implode 2 times because of a Nebulex upgrade which was not immediately visible in the authentication system (seconds changed to milliseconds, users kept getting logged out in a few minutes).
A HUGE FRICTION OCCURRED AND FRUSTRATION ENSURED. I even gave up the library concept after 3 years of hard work and decided to go anew with the projects with the latest phoenix. But i’m constantly finding I need certain bits here and there and the library idea is still around because of this.
I’ve tried umbrella apps, monoliths, the library approach and can’t quite find a sweet spot. Because I feel that the productivity/efficiency/capabilities system is kind of “missing”. The ONe thing I’m mostly missing is a plugin system akin to systems such as PHP have. Or even the Tcl’s dynamic interpreter stuff which means pushing changes accross systems is almost seamless.
I was thinking that the admin interface should be built on something totally different and that it could look identically on all apps to minimize this friction in the event of using a central reusable library model. What are your thoughts on this?
Latest Ideas
I was considering building a central microservice system which would instead do all of these things to minimize friction.
The idea would be that it would communicate with an API where i’d be able to build as simple library to handle this.
THe “problem” i’m facing is for payment processing and online shop i’d have to redirect from App A → App B → App C → App B → App A
- App A (Any App making usage of the microservice)
- App B( MicroService)
- which would redirect to the payment processor (App C) Which could also mean a more complex architecture because there’s also a gateway in between
This would probably confuse the end users as iframes aren’t really that good.
An option I thought about was to add a subdomain which redirects to App B (the microservice) without it being “visible” to the end user. Although the API communication would still need to occur.
This would greatly simplify everything as I’d only have to manage the API library instead of the whole cycle of dependencies and I’d keep
I’d also like for a way to interconnect with the system such as that user info may be available accross platforms.
What are your thoughts on this?
Thanks.