java - Architecture Microservices Jhipster -


i want start architecture microservices of jhipster have doubts. have 4 pieces.

  • "hr" <- front , backend application
  • "selection" <- front , backend application
  • validation <- 1 database front
  • customers <- shared between "hr" , "select" in front in microservice , "hr" , "select".

both applications must validated against same database (jwt). both applications must share microservicio "customer" have backend, front in each of 2 applications.

  • 1 - "hr" gateway?
  • 2 - "selection" gateway?
  • 3 - how implement security both against same database (jwt) validated
  • 4 - "customer" microservicio?

sorry english.

your needs fit using jhipster in conjunction jhipster uaa.

general design

your first part model bounded contextes, such "hr", "selection" or "customer". microservice backend. every single item in model, "customer", or customers "address", or "hr" entity, called resources. these resources have divided wise across services.

using gateway

the jhipster gateway 2 things you. first, takes of microservices , expose them via single api gateway. secondary feature offers user interface (here: in bootstrap + angular). not force use interface. can use "jhipster:client" generator, generate 2 clients "hr" , "selection" js+html only, , serve them using plaig old nginx, , refer 1 jhipster gateway.

security

this uaa option comes play. using default jwt implementation force login user (which stored in gateway), if "customer" microservice calling "hr" microservice.

the uaa offers option of using oauth2 enable kinds of secure communication. in case can make "customer" service ask "hr" more privileged data, user allowed see, using feignclients or general "client credentials grant".

if users "customers", jhipster uaa becomes "customer" microservice.

if have time wait this feature beeing merged, implementing become easy declare communication interfaces similar jpa repositories, handle securing you.

wrap up

look how design architecture. use 1 gateway services (maybe without ui), generate ui later jhipster:client , serve them on nginx, , other things of logic have realized rest apis inside small microservices, , take of how use uaa.

to learn how use uaa right way, suggest take on my spring security article , my example application, using unmerged pr mentioned above. had no time write official docs this, yet. wrote general article, how use jhipster microservices, can read addtionally official documentation.

beyond this, free ask me further information!

good luck


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -