Семинар по Node.js в КПИ 20 октября 2014. Докладчики: Тимур Шемсединов, Никита Савченко, Максим Петренко. Краткое содержание:
* Что такое Node.js и как работает JavaScript в V8
* Профессионалы расскажут, почему они выбрали Node.js
* Вы узнаете его сильные и слабые стороны и где его лучше применять
* Будет полный обзор особеностей и внутреннего строения Node.js
* Примеры внедрения и Highload-проекты
* Вопросы развертывания, хостинг, тестирования, и отладки
* Где и что учить, что читать, как осваивать
Node.js Меньше сложности, больше надежности Holy.js 2021Timur Shemsedinov
If Node.js is your everyday tool, it's almost certain that you use it in the wrong way, Timur will prove that in a very short review, uncover anti-patterns in your daily standard solutions, and show you the way to much better practices. The only thing that creates obstacles in your way to knowledge is your laziness.
Обзор подходов к построению прикладных программных систем на Node.js, анализ и сравнение архитектурных принципов развертывания высоконагруженных прикладных облачных сервисов, масштабирование, тенденции и перспективы в разработке приложений, обзор проблем платформы Node.js и пути их решения.
Video: https://youtu.be/RS8x73z4csI
What is middleware?
Mixins, Reference pollution and shared state, Race condition and Abstraction leaks, Fat controller and layers mix, High coupling and Error ignoring
Better than you think: Handling JSON data in ClickHouseAltinity Ltd
Robert Hodges shows how ClickHouse, a relational database with tables, can offer high-performance analysis of JSON data. This talk provides a cookbook of schema design, indexing, data loading, and query tricks we gave learned over years of helping users build analytical apps for servicds logs, observability data, financial transactions, and other types of semi-structured data. Robert Hodges is CEO of Altinity and a certified database geek.
https://altinity.com
https://www.meetup.com/San-Francisco-Bay-Area-ClickHouse-Meetup
Node.js Меньше сложности, больше надежности Holy.js 2021Timur Shemsedinov
If Node.js is your everyday tool, it's almost certain that you use it in the wrong way, Timur will prove that in a very short review, uncover anti-patterns in your daily standard solutions, and show you the way to much better practices. The only thing that creates obstacles in your way to knowledge is your laziness.
Обзор подходов к построению прикладных программных систем на Node.js, анализ и сравнение архитектурных принципов развертывания высоконагруженных прикладных облачных сервисов, масштабирование, тенденции и перспективы в разработке приложений, обзор проблем платформы Node.js и пути их решения.
Video: https://youtu.be/RS8x73z4csI
What is middleware?
Mixins, Reference pollution and shared state, Race condition and Abstraction leaks, Fat controller and layers mix, High coupling and Error ignoring
Better than you think: Handling JSON data in ClickHouseAltinity Ltd
Robert Hodges shows how ClickHouse, a relational database with tables, can offer high-performance analysis of JSON data. This talk provides a cookbook of schema design, indexing, data loading, and query tricks we gave learned over years of helping users build analytical apps for servicds logs, observability data, financial transactions, and other types of semi-structured data. Robert Hodges is CEO of Altinity and a certified database geek.
https://altinity.com
https://www.meetup.com/San-Francisco-Bay-Area-ClickHouse-Meetup
Back in 2015, Square and Google collaborated to launch gRPC, an open source RPC framework backed by protocol buffers and HTTP/2, based on real-world experiences operating microservices at scale. If you build microservices, you will be interested in gRPC.
This webcast covers:
- a technical overview of gRPC
- use cases and applicability in your stack
- a deep dive into the practicalities of operationalizing gRPC
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...Altinity Ltd
JSON is the king of data formats and ClickHouse has a plethora of features to handle it. This webinar covers JSON features from A to Z starting with traditional ways to load and represent JSON data in ClickHouse. Next, we’ll jump into the JSON data type: how it works, how to query data from it, and what works and doesn’t work. JSON data type is one of the most awaited features in the 2022 ClickHouse roadmap, so you won’t want to miss out. Finally, we’ll talk about Jedi master techniques like adding bloom filter indexing on JSON data.
A comparison of different solutions for full-text search in web applications using PostgreSQL and other technology. Presented at the PostgreSQL Conference West, in Seattle, October 2009.
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...Altinity Ltd
Presented at the webinar, June 26, 2019
Materialized views are a killer feature of ClickHouse that can speed up queries 20X or more. Our webinar will teach you how to use this potent tool starting with how to create materialized views and load data. We'll then walk through cookbook examples to solve practical problems like deriving aggregates that outlive base data, answering last point queries, and using AggregateFunctions to handle problems like counting unique values, which is a special ClickHouse feature. There will be time for Q&A at the end. At that point you'll be a wizard of ClickHouse materialized views and able to cast spells of your own.
Presented at Web Unleashed on September 16-17, 2015 in Toronto, Canada
More info at www.fitc.ca/webu
Why TypeScript?
with Jeff Francis
OVERVIEW
TypeScript is a type-checked superset of JavaScript that benefits medium-sized to complex JavaScript projects. Why would you want to learn a new language, instead of another JavaScript framework? You have all this existing JavaScript code, so how can you adopt something new without throwing the old stuff out?
This session is about the benefits of using TypeScript on top of JavaScript in your projects, and demonstrate step by step ways of migrating an existing JavaScript project to TypeScript. We will dive into code generated by the compiler and look at resources and tools that make working in TypeScript a pleasurable experience.
OBJECTIVE
To understand when it’s a good idea to use TypeScript.
TARGET AUDIENCE
JavaScript developers.
ASSUMED AUDIENCE KNOWLEDGE
Intermediate JavaScript experience.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
The basics of TypeScript – types, classes, modules, and functions
How TypeScript’s design makes getting started simple and helps projects
What compiled TypeScript looks like and how to debug
What tools can help take advantage of TypeScript’s type information
How to migrate a JavaScript project to TypeScript
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlareAltinity Ltd
Presented on December ClickHouse Meetup. Dec 3, 2019
Concrete findings and "best practices" from building a cluster sized for 150 analytic queries per second on 100TB of http logs. Topics covered: hardware, clients (http vs native), partitioning, indexing, SELECT vs INSERT performance, replication, sharding, quotas, and benchmarking.
Some companies have to process data volumes that by far exceed the capacity of “small” database clusters and they definitely have a valid use case for one of the modern parallelizing / streaming / big data processing technologies. For all others, expressing transformations in plain SQL is just fine and PostgreSQL is the perfect workhorse for that purpose.
In this talk, I will go through some of our best practices for building fast, robust, and tested data integration pipelines inside PostgreSQL. I will explain many of our technical patterns, for example for schema management or for splitting large computations by chunking and table partitioning. And I will show how to apply standard software engineering techniques to maintain agility, consistency, and correctness.
Video: http://www.ustream.tv/recorded/109227465
Cassandra Data Modeling - Practical Considerations @ Netflixnkorla1share
Cassandra community has consistently requested that we cover C* schema design concepts. This presentation goes in depth on the following topics:
- Schema design
- Best Practices
- Capacity Planning
- Real World Examples
Подходы и технологии, используемые в разработке iOS-клиента Viber, Кирилл Лаш...Yandex
Рассказ об основных принципах, которых придерживается Viber в длительной разработке приложения с большой кодовой базой — если разработкой занимается распределённая команда. Мы обсудим используемые технологии, библиотеки, работу с кодом и многое другое.
Back in 2015, Square and Google collaborated to launch gRPC, an open source RPC framework backed by protocol buffers and HTTP/2, based on real-world experiences operating microservices at scale. If you build microservices, you will be interested in gRPC.
This webcast covers:
- a technical overview of gRPC
- use cases and applicability in your stack
- a deep dive into the practicalities of operationalizing gRPC
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...Altinity Ltd
JSON is the king of data formats and ClickHouse has a plethora of features to handle it. This webinar covers JSON features from A to Z starting with traditional ways to load and represent JSON data in ClickHouse. Next, we’ll jump into the JSON data type: how it works, how to query data from it, and what works and doesn’t work. JSON data type is one of the most awaited features in the 2022 ClickHouse roadmap, so you won’t want to miss out. Finally, we’ll talk about Jedi master techniques like adding bloom filter indexing on JSON data.
A comparison of different solutions for full-text search in web applications using PostgreSQL and other technology. Presented at the PostgreSQL Conference West, in Seattle, October 2009.
ClickHouse and the Magic of Materialized Views, By Robert Hodges and Altinity...Altinity Ltd
Presented at the webinar, June 26, 2019
Materialized views are a killer feature of ClickHouse that can speed up queries 20X or more. Our webinar will teach you how to use this potent tool starting with how to create materialized views and load data. We'll then walk through cookbook examples to solve practical problems like deriving aggregates that outlive base data, answering last point queries, and using AggregateFunctions to handle problems like counting unique values, which is a special ClickHouse feature. There will be time for Q&A at the end. At that point you'll be a wizard of ClickHouse materialized views and able to cast spells of your own.
Presented at Web Unleashed on September 16-17, 2015 in Toronto, Canada
More info at www.fitc.ca/webu
Why TypeScript?
with Jeff Francis
OVERVIEW
TypeScript is a type-checked superset of JavaScript that benefits medium-sized to complex JavaScript projects. Why would you want to learn a new language, instead of another JavaScript framework? You have all this existing JavaScript code, so how can you adopt something new without throwing the old stuff out?
This session is about the benefits of using TypeScript on top of JavaScript in your projects, and demonstrate step by step ways of migrating an existing JavaScript project to TypeScript. We will dive into code generated by the compiler and look at resources and tools that make working in TypeScript a pleasurable experience.
OBJECTIVE
To understand when it’s a good idea to use TypeScript.
TARGET AUDIENCE
JavaScript developers.
ASSUMED AUDIENCE KNOWLEDGE
Intermediate JavaScript experience.
FIVE THINGS AUDIENCE MEMBERS WILL LEARN
The basics of TypeScript – types, classes, modules, and functions
How TypeScript’s design makes getting started simple and helps projects
What compiled TypeScript looks like and how to debug
What tools can help take advantage of TypeScript’s type information
How to migrate a JavaScript project to TypeScript
Clickhouse Capacity Planning for OLAP Workloads, Mik Kocikowski of CloudFlareAltinity Ltd
Presented on December ClickHouse Meetup. Dec 3, 2019
Concrete findings and "best practices" from building a cluster sized for 150 analytic queries per second on 100TB of http logs. Topics covered: hardware, clients (http vs native), partitioning, indexing, SELECT vs INSERT performance, replication, sharding, quotas, and benchmarking.
Some companies have to process data volumes that by far exceed the capacity of “small” database clusters and they definitely have a valid use case for one of the modern parallelizing / streaming / big data processing technologies. For all others, expressing transformations in plain SQL is just fine and PostgreSQL is the perfect workhorse for that purpose.
In this talk, I will go through some of our best practices for building fast, robust, and tested data integration pipelines inside PostgreSQL. I will explain many of our technical patterns, for example for schema management or for splitting large computations by chunking and table partitioning. And I will show how to apply standard software engineering techniques to maintain agility, consistency, and correctness.
Video: http://www.ustream.tv/recorded/109227465
Cassandra Data Modeling - Practical Considerations @ Netflixnkorla1share
Cassandra community has consistently requested that we cover C* schema design concepts. This presentation goes in depth on the following topics:
- Schema design
- Best Practices
- Capacity Planning
- Real World Examples
Подходы и технологии, используемые в разработке iOS-клиента Viber, Кирилл Лаш...Yandex
Рассказ об основных принципах, которых придерживается Viber в длительной разработке приложения с большой кодовой базой — если разработкой занимается распределённая команда. Мы обсудим используемые технологии, библиотеки, работу с кодом и многое другое.
Есть такая штука как инструментирование кода. Мало кто знает о ней, даже пользуясь результатами ее применения. Между тем, с инструментированием можно делать много всего интересного и, главное, полезного. Например, это может вам помочь лучше понять код или сделать процесс разработки более эффективным. Примеры инструментирования кода и принципы его работы.
.NET Fest 2018. Сергей Калинец. Azure веб разработка здорового человекаNETFest
Microsoft Azure, пожалуй, самый очевидный выбор для .NET разработчиков, когда они (или их клиенты) внезапно решают, что им нужен клауд. Но при этом мы все равно используем подходы и техники из до-облачного мира, иногда и не подозревая о тех сервисах и удобствах, которые нам дает Azure. На этом докладе Сергей покажет, как быстро и эффективно можно разрабатывать современное веб приложение. Мы затронем разные аспекты -- от организации кода до деплоя и мониторинга приложений, работающих в проде. Документация API, поддержка рабочих процессов, инициализация приложений, полезные инструменты и библиотеки -- все это, и не только, ждет вас на нашем докладе.
Архитектура кода нового 2ГИС Web API или куда мы дели MVCDevDay
Сергей Коржнев
Архитектор версии 1.4 2ГИС Web API
Архитектура кода нового 2ГИС Web API или куда мы дели MVC
Тезисы:
● Как организован код в старой версии.
● Вдумчиво смотрим, как мы используем Yii, хватаемся за голову и клавиатуру. Там отрезаем, тут пришиваем, и вуаля!
● Ну и делаем выводы, как мы забороли две классические проблемы программирования: борьба с дублированием кода и сложностью системы.
JavaScript-модули "из прошлого в будущее"oelifantiev
Доклад на первом Ярославском форнтэнд-митапе.
Рассказ об имеющихся методиках описания модулей в JavaScript а также о грядущем стандарте ES6 и, наконец-то, нативной поддержке модулей языком.
Веб-разработка без наркотиков с помощью PostgreSQL, Nginx и c2h5oh / Миша Кир...Ontico
Разговор в докладе пойдёт о веб-программировании.
При изготовлении веб-проектов то и дело пользуются широко распространёнными фреймворками на базе языков программирования — PHP, Python, Perl, Ruby, Go, Rust, Java и т.п.
Я предлагаю отказаться от употребления оных и использовать для разработки веб-приложений только c2h5oh — расширение для высокопроизводительного сервера nginx. Данное расширение позволяет эффективно использовать PostgreSQL в качестве сервера веб-приложений.
Хочу поделиться со слушателями своим личным опытом разработки с использованием подобной связки. Планирую рассказать о плюсах и минусах такого подхода.
Conference: JS is Back! fwdays
In addition to blocking CPU-bound tasks, we can use worker_threads to run asynchronous non-blocking domain logic if our main event loop is already overloaded. Now we have perf_hooks API which can be used to create load balancer to spread load in worker pool to provide the most dense event loop utilization. Mentioned machinery can be encapsulated in a simple abstraction with async/await contract to have a solution competing with goroutines in Go for both convenience and efficiency.
Low-code sells great, but in practice, it does not provide the benefits that vendors have claimed. What are the reasons and how can we get an advantage using the Low-code principle? Experience of radical rethinking and use-cases in enterprise applications together with multi-paradigm programming and metaprogramming.
https://fwdays.com/en/event/architecture-fwdays-2021/review/rethinking-low-code
Мы закончим обзор новых возможностей Node.js и сложив все это вместе в Node.js Starter Kit (шаблона проекта) от сообщества Metarhia для построения надежных и масштабируемых облачных и кластерных приложений и быстрой разработки API для высоконагруженных и интерактивных систем. Будет опубликован манифест Metaserverless. Мы разберем код, обсудим использование новейших возможностей платформы Node.js и фундаментальных знаний CS для построения грамотной структуры и архитектуры проекта.
Видео: https://youtu.be/r1u-dGocm1c
План 2-го вебинара: Обзор распространенных проблем: утечки памяти и ресурсов, игнорирование ошибок и потенциальных мест их появления, нарушение принципов GRASP и SOLID в Node.js, понятия связанности и зацепления программных компонентов, применение GoF паттернов и других шаблонов проектирования, обзор антипаттернов в Node.js и как это должно влиять на написание ежедневного кода.
Структура та архітектура програмних систем
Комітет АПУ з питань телекомунікацій, інформаційних технологій та Інтернету запрошує вас взяти участь у другомузаході третього сезону проекту «HowdoesITwork?», присвяченого структурі та архітектурі програмних систем.
Про що будемо говорити?
- Що таке мова програмування, компілятор, транслятор, класифікація мов програмування, які є мови програмування та сфери їх використання.
- Які є програмні компоненти: що таке фрейморк, бібліотека, модуль, клас, репозиторій, та як вони застосовуються в процесі розробки.
- Що таке середовище розробки, IDE, лінтер, CI/CD, та інші засоби та інфраструктурні компоненти розробки.
- Архітектура програмних рішень, клієнт-серверні, багатошарові, монолітні сервери, бекенд та фронтенд, сервісний підхід, мікросервіси, контейнери, хмарні технології.
- Особливості використання Open source коду при створенні програмних систем за різними ліцензіями та безпека використання відкритого коду.
- Організація процесу розробки, надійність, якість, ревью кода, рефакторінг, системи контролю версій, володіння кодом та bus-factor
Спікер:
Тимур Шемседінов, архітектор технологічного стеку та лідер спільноти Метархія, викладач КПІ, 2й у Github рейтингу розробників України, керівник R&D по створенню високонавантажених хмарних технологій.
Fwdays вединар: Node.js in 2020: Выйди и зайди нормально - Часть 1
Видео: https://youtu.be/GJY2dyE6328?t=480
За последние 5 лет Node.js очень изменился, но знания о платформе у сообщества остались на уровне 2013-2015 годов, все те же подходы, все те же проблемы. Сообщество плохо следит за новыми возможности, а если и узнает про них, то это не влияет на написание ежедневного кода. В Node.js, да и в JavaScript, слабо проникают фундаментальные знания по программной инженерии и архитектуре, параллельному программированию, GRASP, SOLID, GoF, а если и проникают, то не подвергаются адаптации и переосмыслению. Поэтому, среди других языков программирования JavaScript воспринимается, как несерьезный, а Node.js, как платформа для малограмотных людей. Как преодолеть эту тенденцию и как изменить подход к разработке на Node.js в 2020 году, с использованием всех современных возможностей и знаний, а так же, что нужно изменить в ежедневных практиках написания кода, эти и другие вопросы будут освещены в докладе «Node.js в 2020: Выйди и зайди нормально».
2. От JavaScript никуда не деться
«Всё, что может быть написано на JavaScript,
должно быть написано на нём»
«Any application that can be written in JavaScript,
will eventually be written in JavaScript»
Jeff Atwood
основатель Stack Overflow
3. Основные идеи Node.js
1. Один язык, один формат данных,
одна парадигма, одна архитектура
СУБД
Мобильные
приложения
Сервер
Браузер
Оконные
приложения
JSON
BSON
JavaScript
JavaScript
JavaScript
4. Основные идеи Node.js
2. Долгая жизнь приложений в
оперативной памяти на стороне сервера
• Состояние памяти сохраняется между запросами
• Структуры данных (объекты, модель)
• Соединения с БД и открытые файлы
• Конфигурация и инициализация
• Веб сервер внутри приложения, а не наоборот
• Меньше IPC
5. Основные идеи Node.js
3. Без ввода/вывода еще быстрее,
чем с асинхронным вводом/выводом
• Упреждающее чтение
• Отложенная запись
• Отдача всего из памяти
6. Преимущества JavaScript:
1. Имеет очень низкий порог входа;
2. Высочайшая гибкость;
3. Высокая скорость разработки;
4. Практически идеальный уровень
абстракции;
…
7. Недостатки JavaScript:
1. Имеет очень низкий порог входа;
2. Высочайшая гибкость;
3. Высокая скорость разработки;
4. Практически идеальный уровень
абстракции;
…
8. Особенности JavaScript
Наличие огромного количества особенностей.
Как в синтаксических конструкциях, так и в
логике программ.
“12” + 5 === “125”
Но…
“12” - 5 === 7
[] + [] === “”
[] + {} === “[object Object]”
{} + [] === 0
isNaN({} + {}) === true
10. Что такое NodeJS
• Open Source JavaScript-движок V8 от Google;
• Обёртка и библиотеки на JavaScript;
• libuv;
• Оболочка, написанная на C++.
11. Google V8
• Разработка Google, исходный код которой был
открыт в 2008 году;
• Самый оптимальный JavaScript-движок на
сегодняшний день;
• Основа браузеров Google Chrome и Chromium.
12. Преимущества V8
• Базовый и оптимизирующий компилятор;
• Компиляция JavaScript-кода непосредственно в
машинный код, без промежуточного байт-кода;
• Эффективная система управления памятью;
• Введение скрытых классов и встроенных кэшей,
ускоряющих доступ к свойствам и вызовы
функций.
13. Начало работы с NodeJS
1. Установка дистрибутива с nodejs.org;
2. Создание *.js файлов;
3. Запуск программ: $ node *.js;
19. Однопоточность и многопоточность
• Что дает однопоточность?
• Действительно ли 1 процесс = 1 поток?
• Как нагрузить все ядра?
• cluster = require('cluster')
• npm install webworker-threads
• самостоятельно делаем IPC
25. Отладка
• Через node-inspector
• Выводом в консоль console.log(); или в лог
• Если ошибку не видно
• node --stack-trace-limit=1000 application.js
• Может понадобиться фильтр
27. Обновление кода и перезапуск
• Наблюдение за процессом forever
npm install forever -g
forever start --spinSleepTime 10000 application.js
• Наблюдение за файлами
http://livereload.com/
http://habrahabr.ru/post/168091/
28. Callback’и и вложенность
Пример запроса:
request('http://www.google.com/api',
function (error, response, body) {
var googleData = JSON.parse(body);
...
}
);
29. Callback’и и вложенность
request('http://www.google.com/api',
function (gError, gResponse, gBody) {
request('http://www.yandex.com/api',
function (yError, yResponse, yBody) {
request('http://www.twitter.com/api',
function (tError, tResponse, tBody)
{
...
}
...
30. Callback’и: Библиотека async
async.parallel([
function(){ ... },
function(){ ... }
], callback);
Другие методы: series, parallel, whilst, until,
waterfall, compose, queue, cargo, retry, each, map,
reduce, detect, every ...
61. Жизненный цикл проекта
• Юниттесты и интеграционные тесты
• Continuous Integration (CI)
• Travis-CI
• drone.io
• Развертывание среды
• vagrant
• docker
62. Сферы применения node.js
Часто применяется для:
• cервера веб-приложений и SPA
• сервера мобильных приложений
• системы сборки для фронт-энда
• чаты, меседжинг
• игровые сервера
• как заплатка к ПО на других технологиях
• парсеры, кравлеры
63. Сферы применения node.js
Реже применяется для:
• оконные приложения: node-webkit
• приложения баз данных и корпоративные
• промышленная автоматизация и программирование
микроконтроллеров (arduino, espruino, tessel)
• обработка и трансляция видео и звука
64. Сферы применения node.js
Редко применяется (но подходит) для:
• CMS, публикация контента
• электронная коммерция и торговля
И плохо подходит:
• вычисления и моделирование
• научные приложения