0

I am using Jhipster and really like it.

Instead of generating my microservice frontend integrated inside the gateway, I would like to generate a separate frontend microservice. Instead of having gateway -> µservice-backend, I would have gateway -> µservice-frontend -> µservice-backend

My use case :

  • userA has a physical device devicev1. userA logs in on the gateway. He can see the application for the devicev1.
  • userB has a physical device devicev2 (different features than v1). userB logs in on the gateway. He can see the application for the devicev2. (the backend is a different µservice for v1 and v2)
  • userC is using a virtual device. He will see and use again another frontend + backend

Some researches :

I understand this is a hard to maintain feature because we would have to inject the "µservice-frontend" module inside the gateway. (And now there is Angular + React).

The question was asked in 2016 :

I suppose I can still do it by generating a "client only" application and link it separately (rewrite the url), but I loose all the monitoring/registry/security jhipster stack. Sooo, I won't do it and keep everything in my gateway.

I could also have multiple gateways, but I was more willing to have load-on-demand modules, in the same application.

To keep it clean, I can create different angular modules for my load-on-demand part. I can use git mono-repo to separate each version in separated repository and compose before compiling. They are a lot of solutions, but I would like to use a more µservice way.

Any solution or architectural good practice?

Thank you

  • This is an interesting use case. Perhaps the best option will be having multiple clients. Since all your api calls go through the gateway you will still get a good coverage from the gateway int terms of security and monitoring. I don't think there is much the gateway/registry do to the frontend apps themselves rather they monitor and sercure traffic into your services – uruemu Dec 04 '18 at 06:00
  • @usagandi so you mean I would need to use multiple (jhipster) gateway. One for each device version and redirect my user based on his configuration? – Vincent KERDRAON Dec 05 '18 at 16:26
  • *usaganbi haha. No not multiple gateways but rather multiple react or angular standalone applications. Just as you would if you were building a mobile app. You should be able to have multiple frontend applications(web/mobile) and all they would do is communicate via the gateway to their respective services. Does that make sense? – uruemu Dec 05 '18 at 18:54

0 Answers0