How we sawed the monolith. Part 1

Hi, my name is Vanya. I solve architectural problems on the frontend in Tinkoff Business and now I will tell you about one of them.

Several years ago, we had a large monolithic application that has grown into a dozen smaller ones over time. In this article I will tell you what problems we had on a regular basis in the monolith, how we solved them and whether it is worth “sawing” our frontend.

Synchronization

«» , , -. , iframe . .

(- ), . , -.

A rough diagram of a monolithic frontend application
-

, : « - !». .

?

, , - . :

,

, .

TBD -

, — , —

, .

(ownership) . , . - 5, 10, - (),

, . , , -

, . git flow

— , state-, , , . « »

, , , , .

— - ?

— . , , .

? :)

, , , .

, . , ( ). : 

  1. , - ,

  2. : - —

, , codemod . 100%

, —

- , , . ,

-

, «» , . , , , - , «» , .

?

- , :-) , :

  • . -, . Frame Manager, .

  • . , , window.myVar .my-bar. , - . , .

  • . : . vendor.js , vendor1.js, vendor2.js . . , — . № 4, , , url' .

, , , , , . : , ?

. , :

  1. . , . , , . , .

  2. foundation. () libs . : - , ?

  3. SPA. SPA, , , , , . , . , Frame Manager, . , , . : window.myVar, localStorage, sessionStorage, CustomEvent, postMessage .

  4. (SSR), . . . , , iframe, SSR.

.

. . , npm-. 

, , - , , , . : « , , ?» :

  • . , ? , . ?

  • .

  • ci pipeline, .

: Nx. apps/, libs/. , . ci pipeline pipeline , IaC.

tl;dr

, Frame Manager.

Scheme of customer interaction with microfront-end

. , . tips&tricks, :

  1. , ? , , , , , :)

  2. «», . , , , , , , .

  3. , . -, , — , , : .

  4. — , , , . /.

  5. , . , , , . , .

P. S.

, , , , , .

.




All Articles