13
Node.js on Windows Azure Виктор Сотов DataArt

Node.js on Windows Azure

Embed Size (px)

Citation preview

Page 1: Node.js on Windows Azure

Node.js on Windows Azure

Виктор Сотов

DataArt

Page 2: Node.js on Windows Azure

Содержание • Node.js в Windows •  IIS Node • Windows Azure • Сервисы Azure

Page 3: Node.js on Windows Azure

Node.js в Windows • Оптимизиорованно под ОС • Инсталлятор (node + npm) • Поддержка модулей • Производительность • Инструменты

Page 4: Node.js on Windows Azure

IIS Node • Управление процессами • Масштабируемость на многоядерных серверах

• Встроенная отладка • Автоматический перезапуск • Другие преимущества IIS

Page 5: Node.js on Windows Azure

IIS Node базовая конфигурация <configuration> <system.webServer> <handlers>

<add name="iisnode" path="hello.js" verb="*“ modules="iisnode" /> </handlers> </system.webServer> </configuration>

Page 6: Node.js on Windows Azure

Windows Azure • Что это? • Службы данных • Службы приложений • Сеть • Среда выполнения приложений

Page 7: Node.js on Windows Azure

Среда выполнения приложений • Виртуальные машины • Веб-сайты • Облачные службы • Мобильные службы

Page 8: Node.js on Windows Azure

Взаимодействие с Blob хранилищем

var azure = require('azure'); var blobClient = azure.createBlobService(); // Создание var text = 'Содержание'; blobClient.createBlockBlobFromText(container, blob, text, function (error, blockBlob, response) { // создан });

// Выборка blobClient.getBlobToText(container, blob, function (error, text, blockBlob, response) { // получен });

// Удаление blobClient.deleteBlob(container, blob, function (error, isSuccessful, response) { // удалён });

Page 9: Node.js on Windows Azure

Взаимодействие с таблицами var azure = require('azure'); var tableClient = azure.createTableService(); // Вставка var item = new SomeEntity(); item.PartitionKey = ‘Item 1'; item.RowKey = uuid(); tableClient.insertEntity('table', item, function (error, entity, response) { }); // Выборка tableClient.queryEntity('table', item.PartitionKey, item.PartitionKey, function (error, successful, response) { });

Page 10: Node.js on Windows Azure

Взаимодействие с очередями var azure = require('azure'); var queueClient = azure.createQueueService(); // Записать в очередь queueClient.createMessage('queue', ‘Сообщение', function (error, queueMessageResult, response) { }); // Выбрать сообщения queueClient.getMessages('queue', function (error, queueMessageResults, response) { });

Page 11: Node.js on Windows Azure

Windows Azure Mobile Services • Данные • Нативные SDK • Пуш уведомления • Авторизация • Масштабирование

Page 12: Node.js on Windows Azure

Q & A

Page 13: Node.js on Windows Azure

Как начать? •  http://bit.ly/sAv4RB • Node Dev Center - http://bit.ly/scw4nZ •  IIS Node - http://bit.ly/mW9Pzf