js lab2017_Под микроскопом: блеск и нищета микросервисов на...
TRANSCRIPT
![Page 1: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/1.jpg)
Блеск и нищета микросервисов на
Node.JS@xanf_ua
![Page 2: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/2.jpg)
WookieeLabsCEO
JavaScript.NinjaТренер
Kottans.OrgКотан-джаваскриптер
Кто я
KhJSОрганизатор
![Page 3: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/3.jpg)
«Тебе это понравится»•Big Data
•Проект прошел точку самоокупаемости
•Сложные математические модели
•Это работает
![Page 4: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/4.jpg)
RDD
ResumeDrivenDevelopment
![Page 5: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/5.jpg)
Как это было
PHP .bat
R
C++
Python
![Page 6: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/6.jpg)
Наведение порядка
![Page 7: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/7.jpg)
Первые микросервисыBilling
Mailer
Cron
CRUD
![Page 8: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/8.jpg)
Первые storage
![Page 9: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/9.jpg)
Что дальше?•Больше вычислительных нод
•Личные демоны
•API
![Page 10: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/10.jpg)
Service Discovery
Billing Mailer???
![Page 11: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/11.jpg)
Message Broker
XML JSON
SHM Files
BabelFish
R
ScalaC++
![Page 12: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/12.jpg)
Auto-scaling
CFRunner
CFRunner
CFRunner
CFRunner
CFRunner
CFRunner
CFRunner
CFRunner
CFRunner
CFRunner
![Page 13: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/13.jpg)
ESB
EnterpriseServiceBus
![Page 14: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/14.jpg)
ESB на Node.JS•Спагетти-код
•Неконтролируемый рост
•Garbage Collector
![Page 15: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/15.jpg)
ESB на Node.JS
KISSDRYYAGNI
![Page 16: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/16.jpg)
Контракты
WSDL
![Page 17: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/17.jpg)
Pattern Matching
![Page 18: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/18.jpg)
Seneca•Все есть микросервис
•Микросервисы обмениваются
сообщениями
•Транспорт – лишь абстракция
![Page 19: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/19.jpg)
Обработка ошибок
¯\_( ツ )_/¯
![Page 20: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/20.jpg)
Транзакции
Reserve Process Pay
![Page 21: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/21.jpg)
IPC – это дорого
Calc Storage
![Page 22: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/22.jpg)
IPC – это дорого
Calc Storage
![Page 23: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/23.jpg)
Копии данных
Calc Storage
![Page 24: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/24.jpg)
Split Brain
![Page 25: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/25.jpg)
Резервные копии97%
![Page 26: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/26.jpg)
Совет #1
Просто перезапусти это
![Page 27: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/27.jpg)
Время ответа API
0
20
40
60
80
100
120
Chart Title
![Page 28: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/28.jpg)
Совет #2
Логируй всё. Логируй красиво
![Page 29: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/29.jpg)
Grafana
![Page 30: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/30.jpg)
Совет #3Думай о
состоянии
![Page 31: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/31.jpg)
Бесконечная очередь
![Page 32: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/32.jpg)
Совет #4Умей считать до бесконечности
Дважды.
![Page 33: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/33.jpg)
Взрыв в облаках
:(){ :|: & };:
![Page 34: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/34.jpg)
Совет #5Знай слабые
места
![Page 35: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/35.jpg)
«Хак»
Image
BinaryPayload
Base64
![Page 36: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/36.jpg)
Архитектура
Image
BinaryPayload
Base64Image part
BinaryPayload chunk
Base64
![Page 37: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/37.jpg)
Совет #6Помни: все лгут
![Page 38: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/38.jpg)
Кто следит за следящими?
![Page 39: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/39.jpg)
Совет #7
Аккуратно витай в облаках
![Page 40: JS Lab2017_Под микроскопом: блеск и нищета микросервисов на node.js](https://reader030.vdocuments.pub/reader030/viewer/2022013120/58e65b991a28ab8d758b485f/html5/thumbnails/40.jpg)
Вопросы?@xanf_ua