Upload
geekslab
View
357
Download
7
Embed Size (px)
Citation preview
Node.js on Windows Azure
Виктор Сотов
DataArt
Содержание • Node.js в Windows • IIS Node • Windows Azure • Сервисы Azure
Node.js в Windows • Оптимизиорованно под ОС • Инсталлятор (node + npm) • Поддержка модулей • Производительность • Инструменты
IIS Node • Управление процессами • Масштабируемость на многоядерных серверах
• Встроенная отладка • Автоматический перезапуск • Другие преимущества IIS
IIS Node базовая конфигурация <configuration> <system.webServer> <handlers>
<add name="iisnode" path="hello.js" verb="*“ modules="iisnode" /> </handlers> </system.webServer> </configuration>
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) { // удалён });
Взаимодействие с таблицами 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) { });
Взаимодействие с очередями var azure = require('azure'); var queueClient = azure.createQueueService(); // Записать в очередь queueClient.createMessage('queue', ‘Сообщение', function (error, queueMessageResult, response) { }); // Выбрать сообщения queueClient.getMessages('queue', function (error, queueMessageResults, response) { });
Windows Azure Mobile Services • Данные • Нативные SDK • Пуш уведомления • Авторизация • Масштабирование
Q & A
Как начать? • http://bit.ly/sAv4RB • Node Dev Center - http://bit.ly/scw4nZ • IIS Node - http://bit.ly/mW9Pzf