Confirm it again

  • That’s right, the micro front end starts with Golang
  • Core point: Any technical discussion outside of a business scenario is rogue
  • Juejin. Im/Post /686082…
  • Keywords: style, event, cache conflict, rule scheme of feature code, establishment of communication mechanism

Demand background

  • New and old multi-system integration
  • Unique users access xx daily
  • Cooperation across multiple lines of business

The main problem

  • The front-end system is a multi-technology stack, and the old and new projects are complicated, including the JQ project which has been maintained for 6 years, and the React project which has been newly added
  • The back end is completely out of control, and although the front end page is a collection of backend systems, it has no idea about the state of each subsystem

The solution

  • The front-end provides two modes of embedding, ifream and Qiankun coexist, with the central base project as the communication base, message ADAPTS
  • Back-end super gateway solution: The service status of all subsystems in the full link, the general direction of locating and tracking visual management, real-time alarm nail

Detour summary

  • The overall scheme design logic of personal feeling is not wrong
  • In other words, add or modify a new microservice, you can modify consul configuration or nodeJS interface, easy, add how much, how much all can dynamic adaptation, You do not need to restart NG. Nodejs team has high language fit, poor performance, low security, environment dependence (this was the judgment at the time, but still chose, in order to implement quickly). There are obvious disadvantages in performance and configuration (listen to the opinions of the operation and maintenance team). In the face of insufficient consideration of the daily xx access of the current system, config implementation which relies on egg.js also has weak support for environment scenarios.
  • For details, see Juejin. im/post/686529…

Start all over again

  • There are three categories of selection (JAVA, NodeJS, GO)
  • JAVA community perfect scene support is rich, disadvantage front-end team language bottleneck
  • Nodejs has advantages of rapid development, but disadvantages of insufficient support for large projects
  • GO advantage performance advantage, cross-platform innate advantage, type check, disadvantage team lack of experience
  • The configuration visualization page is missing

Technical solution

  • Language Golang
  • Framework GIN (41.7K), VUE (fast development, simple pages)
  • Registry Consul (cross-platform, non-dependent, itself go based implementation)
  • Database SQLite (lightweight database, embedded mode, zero configuration, easy migration, simple business fields)
  • Test tool ab.exe

Results the preview

Resources to address

  • Github:github.com/fodelf/easy…
  • Modao.cc /app/ 5EE1502…

conclusion

  • Qiankun and Golang micro service gateway are used to implement front-end micro services for old projects with high performance, independent, configurable and monitored in-depth reconstruction

The progress of

  • In the continuous open source, the function is not finished!

The end of the

🏆 technology project stage 4 | chat micro front end of those things…