title: ÐÐ¾Ð´Ñ Ð¾Ð´ ÑÐ¾ÑÐ¼Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð¾ÑÐ²ÐµÑÐ¾Ð² Ð¾Ñ Ð¼Ð½Ð¾Ð¶ÐµÑÑÐ²Ð° Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ¾Ð² Ñ Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð½Ð¸ÐµÐ¼ Ð¿Ð°ÑÑÐµÑÐ½Ð° BFF
title: Ð²ÑÐ¿ÑÑÐºÐ½Ð°Ñ ÐºÐ²Ð°Ð»Ð¸ÑÐ¸ÐºÐ°ÑÐ¸Ð¾Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð¼Ð°Ð³Ð¸ÑÑÑÐ°
titleType: Subtitle
title: An approach to generating responses from multiple microservices using the BFF pattern
Creators: name: ÐÐ¾ÑÐ¾Ð»ÐµÐ², ÐÐµÐ½Ð¸Ñ
Publisher: name: Ð¡Ð°Ð½ÐºÑ-ÐÐµÑÐµÑÐ±ÑÑÐ³ÑÐºÐ¸Ð¹ Ð¿Ð¾Ð»Ð¸ÑÐµÑÐ½Ð¸ÑÐµÑÐºÐ¸Ð¹ ÑÐ½Ð¸Ð²ÐµÑÑÐ¸ÑÐµÑ ÐÐµÑÑÐ° ÐÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾
Year: 2024
Subjects: ÐÑÑÐ¸ÑÐ»Ð¸ÑÐµÐ»ÑÐ½ÑÐµ Ð¼Ð°ÑÐ¸Ð½Ñ ÑÐ»ÐµÐºÑÑÐ¾Ð½Ð½ÑÐµ Ð¿ÐµÑÑÐ¾Ð½Ð°Ð»ÑÐ½ÑÐµ
Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ½Ð°Ñ Ð°ÑÑ Ð¸ÑÐµÐºÑÑÑÐ°
Ð¾ÑÐºÐ°Ð·Ð¾ÑÑÑÐ¾Ð¹ÑÐ¸Ð²Ð¾ÑÑÑ
ÑÐ°ÑÐ¿ÑÐµÐ´ÐµÐ»ÐµÐ½Ð½ÑÐµ ÑÐ¸ÑÑÐµÐ¼Ñ
ÑÐ¾ÑÐ¼Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ðµ Ð¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°ÑÐµÐ»ÑÑÐºÐ¾Ð³Ð¾ Ð¾ÑÐ²ÐµÑÐ°
microservice architecture
fault tolerance
distributed systems
user response generation

description: ÐÐ°Ð½Ð½Ð°Ñ ÑÐ°Ð±Ð¾ÑÐ° Ð¿Ð¾ÑÐ²ÑÑÐµÐ½Ð° Ð¸ÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾Ð´ÑÐ¾Ð´Ð¾Ð² Ðº ÑÐ¾ÑÐ¼Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð¾ÑÐ²ÐµÑÐ¾Ð² Ð¾Ñ Ð¼Ð½Ð¾Ð¶ÐµÑÑÐ²Ð° Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ¾Ð² Ð² Ð¸Ð½ÑÐ¾ÑÐ¼Ð°ÑÐ¸Ð¾Ð½Ð½ÑÑ ÑÐ¸ÑÑÐµÐ¼Ð°Ñ, ÑÐµÐ°Ð»Ð¸Ð·Ð¾Ð²Ð°Ð½Ð½ÑÑ Ñ Ð¿ÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸ÐµÐ¼ Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ½Ð¾Ð¹ Ð°ÑÑÐ¸ÑÐµÐºÑÑÑÑ. Ð ÑÐ¾Ð´Ðµ Ð¸ÑÑÐ»ÐµÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð±ÑÐ» Ð¿ÑÐ¾Ð²ÐµÐ´ÐµÐ½ Ð°Ð½Ð°Ð»Ð¸Ð· ÑÑÑÐµÑÑÐ²ÑÑÑÐ¸Ñ Ð¼ÐµÑÐ¾Ð´Ð¾Ð² Ð¸ Ð²ÑÐ±ÑÐ°Ð½ Ð¿Ð¾Ð´ÑÐ¾Ð´ Ñ Ð¿ÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸ÐµÐ¼ Ð¿Ð°ÑÑÐµÑÐ½Ð° Backend For Frontend (BFF), ÑÐ´Ð¾Ð²Ð»ÐµÑÐ²Ð¾ÑÑÑÑÐ¸Ð¹ Ð½Ð°Ð¸Ð±Ð¾Ð»ÑÑÐµÐ¼Ñ ÐºÐ¾Ð»Ð¸ÑÐµÑÑÐ²Ñ ÐºÑÐ¸ÑÐµÑÐ¸ÐµÐ². Ð ÑÐ°Ð¼ÐºÐ°Ñ Ð²ÑÐ±ÑÐ°Ð½Ð½Ð¾Ð³Ð¾ Ð¿Ð¾Ð´ÑÐ¾Ð´Ð° ÑÐµÐ°Ð»Ð¸Ð·Ð¾Ð²Ð°Ð½ Ð¼Ð°ÑÑÑÐ°Ð±Ð¸ÑÑÐµÐ¼ÑÐ¹ Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸Ñ Ñ Ð¿ÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸ÐµÐ¼ ÑÐ·ÑÐºÐ° Ð¿ÑÐ¾Ð³ÑÐ°Ð¼Ð¼Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ Golang Ð¸ Ð¸Ð½ÑÑÑÑÐ¼ÐµÐ½ÑÐ° ÐºÐ¾Ð½ÑÐµÐ¹Ð½ÐµÑÐ½Ð¾Ð¹ Ð¾ÑÐºÐµÑÑÑÐ°ÑÐ¸Ð¸ Docker Swarm, Ð¾Ð±ÐµÑÐ¿ÐµÑÐ¸Ð²Ð°ÑÑÐ¸Ð¼ ÑÐ´Ð¾Ð±Ð½Ð¾ ÑÐ¿ÑÐ°Ð²Ð»ÐµÐ½Ð¸Ðµ Ð¾ÑÐºÐ°Ð·Ð¾ÑÑÑÐ¾Ð¹ÑÐ¸Ð²Ð¾ÑÑÑÑ Ð¸ Ð³Ð¾ÑÐ¸Ð·Ð¾Ð½ÑÐ°Ð»ÑÐ½Ð¾Ð¹ Ð¼Ð°ÑÑÑÐ°Ð±Ð¸ÑÑÐµÐ¼Ð¾ÑÑÑÑ ÑÐ¸ÑÑÐµÐ¼Ñ. Ð Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐµ ÑÐ°ÐºÐ¶Ðµ Ð±Ñ ÑÐµÐ°Ð»Ð¸Ð·Ð¾Ð²Ð°Ð½Ð¾ ÑÐ¾ÑÐ¼Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ðµ Ð³Ð¸Ð±ÐºÐ¾Ð³Ð¾ Ð¾ÑÐ²ÐµÑÐ° Ð¾Ñ Ð¼Ð½Ð¾Ð¶ÐµÑÑÐ²Ð° Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ¾Ð² Ð½Ð° Ð¾ÑÐ½Ð¾Ð²Ðµ ÑÑÑÑÐºÑÑÑÑ ÐºÐ¾Ð½ÑÐµÐ½ÑÐ°, Ð¿Ð¾Ð»ÑÑÐµÐ½Ð½Ð¾Ð¹ Ð¾Ñ ÑÑÐ¾ÑÐ¾Ð½Ð½ÐµÐ³Ð¾ Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ°. ÐÐ»Ñ Ð°Ð½Ð°Ð»Ð¸Ð·Ð° Ð¿ÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÐµÐ»ÑÐ½Ð¾ÑÑÐ¸ Ð±ÑÐ»Ð¾ Ð¿ÑÐ¾Ð²ÐµÐ´ÐµÐ½Ð¾ Ð¿ÑÑÑ ÑÐºÑÐ¿ÐµÑÐ¸Ð¼ÐµÐ½ÑÐ¾Ð² Ð¿Ð¾ Ð¿Ð¾Ð»ÑÑÐµÐ½Ð¸Ñ Ð¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°ÑÐµÐ»ÑÑÐºÐ¾Ð³Ð¾ Ð¾ÑÐ²ÐµÑÐ° Ñ Ð¿ÑÐ¸Ð¼ÐµÐ½ÐµÐ½Ð¸ÐµÐ¼ Ð¿Ð°ÑÑÐµÑÐ½Ð° BFF Ð¸ Ð±ÐµÐ· Ð½ÐµÐ³Ð¾. ÐÐ° Ð¾ÑÐ½Ð¾Ð²Ðµ Ð²ÑÑÐ¸ÑÐ»ÐµÐ½Ð½Ð¾Ð³Ð¾ Ð¼Ð°ÑÐµÐ¼Ð°ÑÐ¸ÑÐµÑÐºÐ¾Ð³Ð¾ Ð¾Ð¶Ð¸Ð´Ð°Ð½Ð¸Ñ Ð²Ð¸Ð´Ð½Ð¾, ÑÑÐ¾ Ð¿ÑÐ¾Ð¸Ð·Ð²Ð¾Ð´Ð¸ÑÐµÐ»ÑÐ½Ð¾ÑÑÑ ÑÐ¾ÑÐ¼Ð¸ÑÐ¾Ð²Ð°Ð½Ð¸Ñ Ð¾ÑÐ²ÐµÑÐ° Ð¾Ñ Ð¼Ð½Ð¾Ð¶ÐµÑÑÐ²Ð° Ð¼Ð¸ÐºÑÐ¾ÑÐµÑÐ²Ð¸ÑÐ¾Ð² Ð²ÑÑÐ¾ÑÐ»Ð° Ð½Ð° 12 Ð¼Ñ Ð¿ÑÐ¸ Ð¸ÑÐ¿Ð¾Ð»ÑÐ·Ð¾Ð²Ð°Ð½Ð¸Ð¸ Ð¿Ð°ÑÑÐµÑÐ½Ð° BFF.
description: This work is devoted to the study of approaches to generating responses from a variety of microservices in information systems implemented using microservice architecture. During the study, an analysis of existing methods was carried out and an approach was selected using the Backend For Frontend (BFF) pattern, which satisfies the largest number of criteria. A scalable microservice is implemented using the Golang programming language and the container orchestration tool Docker Swarm, which provides convenient management of fault tolerance and horizontal scalability of the system. The microservice would also implement the generation of a flexible response from multiple microservices based on the content structure received from a third-party microservice. To analyze the performance, five experiments were conducted to obtain a user response with and without the BFF pattern. Based on the calculated mathematical expectation, the performance of generating a response from many microservices increased by 12 ms when using the BFF pattern.