SlideShare une entreprise Scribd logo
1  sur  46
Windows Azure StorageSQL Azure Developing with Windows Azure storage & SQL Azure Maarten Balliauw http://blog.maartenballiauw.be http://twitter.com/maartenballiauw maarten@maartenballiauw.be
Whoam I? Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … Special interest in interop PHPExcel, PHPLinq, PHPMEF, Windows Azure SDK for PHP, ... http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
Agenda ,[object Object]
Windows Azure SDK for PHP
SQL Azure,[object Object]
Windows Azure Data Storage Queue Blob Account Tables Drives
Azure Platform Data Storage Options Windows Azure Data Storage Blobs Unstructured data storage Tables Semi-structured or tabular data storage Queues Buffered delivery data storage Drives Durable NTFS volumes that Windows Azure applications can use.  See: http://microsoftpdc.com/Sessions/SVC14 SQL Azure Relational data storage
PHP + Cloud Storage Windows Azure Storage PHP Instance (web/worker) On-Premise VIP Load Balancer PHP App SQL Azure Windows Azure Platform
Windows Azure Data Storage
Windows Azure Data Storage
Windows Azure SDK for PHP A PHP porgramming model for Windows Azure Storage
PHP with Windows Azure Storage Windows Azure SDK for PHP at http://phpazure.codeplex.com PHP programming model for Windows Azure Storage Features  PHP classes for Blobs, Tables & Queues Store PHP sessions in Table Storage File system wrapper for Blob Storage
Blob  Container Entities Account Table http://<account>.blob.core.windows.net/<container> Messages Windows Azure Storage Concepts http://<account>.table.core.windows.net/<table> Queue http://<account>.queue.core.windows.net/<queue>
Windows Azure Blobs Unstructured data Scale massively At least 3 instances, 5 in optimal situation Can be used as CDN Can be mapped using a custom domain
Tools for connecting to blob storage CloudBerryLab Explorerhttp://www.cloudberrylab.com Azure Storage Explorerhttp://azurestorageexplorer.codeplex.com/ Onlinehttp://myazurestorage.com / ftp://ftp.cloudapp.net Windows Azure tooling for Eclipse
Blobs Sample $blobStorage= new Microsoft_WindowsAzure_Storage_Blob(); // Create if (!$blobStorage->containerExists($containerName)) { $blobStorage->createContainer($containerName); $blobStorage->setContainerAcl($containerName,  Microsoft_WindowsAzure_Storage_Blob::ACL_PUBLIC); } // Store $blob = $blobStorage->putBlob($containerName, $blobName,  $localFilename, $metadata); /* @var $blob Microsoft_WindowsAzure_Storage_BlobInstance */
Blobs Sample Cont… // Copy $result = $blobStorage->copyBlob(      $containerName, $blobName, $containerName, $blob2Name); // Retrieve $tempStore= azure_getlocalresourcepath('tempstore'); $tempPath= $tempStore. '' . $imageId; $blobStorage->getBlob($containerName, $blobName, $tempPath); // Delete $result = $blobStorage->deleteBlob($containerName, $blobName); $result = $blobStorage->deleteContainer($containerName); http://phpazurecontrib.codeplex.com
Blob Stream Wrapper $blobStorage= new Microsoft_WindowsAzure_Storage_Blob(); // Register: $blobStorage->registerStreamWrapper(); // registers azure:// // or $blobStorage->registerStreamWrapper('blob://'); // use blob:// // Use $fp= fopen('azure://mycontainer/myfile.txt', 'r'); // ... fclose($fp);
Windows Azure Drive (a.k.a. Xdrive) Virtual NTFS volume that can be mounted .vhd format Use existing NTFS API’s Easier migration Stored on blob storage provides quick mount/unmount in other VM
Queue Workflow Concepts Windows Azure Queue Provides Guarantee delivery (two-step consumption) Worker Dequeues Message and mark it as Invisible Worker Deletes Message when finished processing it If Worker role crashes, message becomes visible for another Worker to process Doesn’t guarantee “only once” delivery Doesn’t guarantee ordering Best effort FIFO Worker Role Web Role Input Queue (Work Items) Worker Role Azure Queue Web Role Worker Role Web Role Worker Role
Azure Queues RemoveMessage GetMessage (Timeout) Worker Role PutMessage Queue Msg 1 Msg 2 Msg 2 Msg 1 Web Role Worker Role Worker Role Msg 3 Msg 4 Msg 2
Loosely Coupled Work with Queues Worker-Queue Model Load work in a queue Many workers consume the queue Input Queue (Work Items) Azure Queue Worker Role Web Role Worker Role Web Role Worker Role Web Role Worker Role
Queues $queueClient= new Microsoft_WindowsAzure_Storage_Queue(); // Create $result = $queueClient->createQueue('imageQueue'); // Delete $queueClient->deleteQueue('imageQueue'); // Add message $queueClient->putMessage('imageQueue', $message, $ttl); // Retrieve Messages $messages = $queueClient->getMessages('imageQueue', 10); foreach($messages as $message) { // Do work here... $queueClient->deleteMessage('imageQueue', $message); }
Windows Azure Data Storage – Tables (Terms Part 1) Table  Contains a set of entities.   Entity (Row)  Basic data items stored in a table.   Property (Column)  Single value in an entity.    RowKey Unique ID of the entity within a partition Timestamp Time it was created
Windows Azure Data Storage – Tables (Terms Part 2) Partition  Entities in a table with the same partition key PartitionKey  Segments entities in to partitions to automatically distribute the table’s entities over many storage nodes. Sort Order There is a single index provided, where all entities in a table are sorted by PartitionKey and then RowKey
Key Example – Blog Posts Partition 1 Partition 2 Getting all of dunnry’s blog posts is fast Single partition Getting all posts after 2008-03-27 is slow Traverse all partitions
Table Sample $tableStorage= new Microsoft_WindowsAzure_Storage_Table( 'table.core.windows.net', 'myaccount', 'myauthkey'); // Create $result = $tableStorage->createTable($tableName); // List  $result = $tableStorage->listTables(); foreach($result as $table) { echo 'Table name is: ' . $table->Name . ""; } // Delete $tableStorage->deleteTable($tableName);
Tables with Entities // Structured entity class ImageEntityextends  Microsoft_WindowsAzure_Storage_TableEntity { /**      * @azure filename      */ public $filename; /**      * @azure size Edm.Int64      */ public $size; } // Unstructured entity // Microsoft_WindowsAzure_Storage_DynamicTableEntity
Tables with Entities Cont… // Insert $image = new ImageEntity($partitionKey, $rowKey); $image->filename = $_FILES['imageUpload']['name']; $image->size = $_FILES['imageUpload']['size']; $image = $tableStorageClient->insertEntity($tableName, $image); // Retrieve $image = $tableStorage->retrieveEntityById($tableName,  $partitionKey, $rowKey, 'ImageEntity'); // Update $image->filename = 'newname.jpg'; $result = $tableStorage->updateEntity($tableName, $image); // Delete $result = $tableStorage->deleteEntity($tableName, $image);
Table Queries // Filter condition $select = "filesizegt 1024 and PartitionKeyeq '$partitionKey'"; // Or fluent interface $select = $tableStorage->select()->from($tableName)           ->where('filesizegt 1024')           ->andWhere('PartitionKeyeq ?', $partitionKey); // Run query $images = $tableStorage->storageClient->retrieveEntities( 'testtable', $select, 'ImageEntity' ); foreach($images as $image) { echo 'Name: ' . $image->filename . ""; }
Batching Operations // Start batch $batch = $tableStorage->startBatch(); // Insert multiple $images = generateEntities(); foreach($images as $image) { $tableStorage->insertEntity($tableName, $image); } // Commit $batch->commit();
Table session handler $sessionHandler     = new Microsoft_WindowsAzure_SessionHandler($tableStorage); $sessionHandler->register(); session_start(); if (!isset($_SESSION['start'])) { $_SESSION['start'] = time(); }
SQL Azure A relational database for the cloud
SQL Azure and Windows Azure Table Comparison SQL Azure Tables Windows Azure Tables Fully structured Strongly typed Relational(RDBMS) Highly scalable Semi-structured Loosely typed Non-Relational(Not RDBMS) Massively scalable
MySQL: Simple Configuration VIP Load Balancer Web Role MySQL Worker Role
MySQL in a Windows Azure Application Running MySQL in a worker role Copy MySQL to the worker role sub-directory Copy to read-write local storage Configure MySQL to listen on the right port Monitor MySQL health Consuming MySQL Discover IP address and port Normal access from then on Handle topology changes
Simple Configuration VIP Load Balancer MySQL
Replication VIP Load Balancer M S S MySQL MySQL MySQL
Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL
Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL
SQL Azure Features Supported Not supported Tables, Indexes, Views Stored Procedures Triggers Constraints Table Variables Temp Tables (#Name) Physical Server Access  Catalog DDL Common Language Runtime Service Broker Reporting Services Analysis Services Distributed Transactions and Queries
SQL AzureDeployment Web Portal (API) DB Script SQL Azure TDS
SQL AzureAccessing databases Web Portal (API) Your App SQL Azure TDS Change Connection String
Database Replicas Single Database Multiple Replicas Replica 1 Single Primary Replica 2 DB Replica 3
SQL AzureDatabase Monitoring & Recovery Web Portal (API) ! Your App SQL Azure TDS
SQL Azure Server Creation

Contenu connexe

Tendances

The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of LithiumNate Abele
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuerydeimos
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPVineet Kumar Saini
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVCThomas Reynolds
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryRemy Sharp
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHPVineet Kumar Saini
 
PHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkPHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkG Woo
 
Yy
YyYy
Yyyygh
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texteSai Ef
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwrdeimos
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway ichikaway
 
Intro to advanced caching in WordPress
Intro to advanced caching in WordPressIntro to advanced caching in WordPress
Intro to advanced caching in WordPressMaor Chasen
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data ObjectsWez Furlong
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From IusethisMarcus Ramberg
 
Assetic (Symfony Live Paris)
Assetic (Symfony Live Paris)Assetic (Symfony Live Paris)
Assetic (Symfony Live Paris)Kris Wallsmith
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreRemy Sharp
 

Tendances (20)

The Zen of Lithium
The Zen of LithiumThe Zen of Lithium
The Zen of Lithium
 
Remy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQueryRemy Sharp The DOM scripting toolkit jQuery
Remy Sharp The DOM scripting toolkit jQuery
 
Add edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHPAdd edit delete in Codeigniter in PHP
Add edit delete in Codeigniter in PHP
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVC
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQuery
 
Pagination in PHP
Pagination in PHPPagination in PHP
Pagination in PHP
 
Country State City Dropdown in PHP
Country State City Dropdown in PHPCountry State City Dropdown in PHP
Country State City Dropdown in PHP
 
PHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkPHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php framework
 
Yy
YyYy
Yy
 
Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
 
Joe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand DwrJoe Walker Interactivewebsites Cometand Dwr
Joe Walker Interactivewebsites Cometand Dwr
 
Php 101: PDO
Php 101: PDOPhp 101: PDO
Php 101: PDO
 
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
Tips of CakePHP and MongoDB - Cakefest2011 ichikaway
 
Intro to advanced caching in WordPress
Intro to advanced caching in WordPressIntro to advanced caching in WordPress
Intro to advanced caching in WordPress
 
Drupal, meet Assetic
Drupal, meet AsseticDrupal, meet Assetic
Drupal, meet Assetic
 
PHP Data Objects
PHP Data ObjectsPHP Data Objects
PHP Data Objects
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Assetic (Symfony Live Paris)
Assetic (Symfony Live Paris)Assetic (Symfony Live Paris)
Assetic (Symfony Live Paris)
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymore
 

En vedette

AnalyticsConf : Azure SQL Data Warehouse
AnalyticsConf : Azure SQL Data WarehouseAnalyticsConf : Azure SQL Data Warehouse
AnalyticsConf : Azure SQL Data WarehouseWlodek Bielski
 
Windows Sql Azure Cloud Computing Platform
Windows Sql Azure Cloud Computing PlatformWindows Sql Azure Cloud Computing Platform
Windows Sql Azure Cloud Computing PlatformEduardo Castro
 
Cloud Databases in Research and Practice
Cloud Databases in Research and PracticeCloud Databases in Research and Practice
Cloud Databases in Research and PracticeFelix Gessert
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VMJames Serra
 
Introducing Azure SQL Database
Introducing Azure SQL DatabaseIntroducing Azure SQL Database
Introducing Azure SQL DatabaseJames Serra
 
HA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybridHA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybridJames Serra
 

En vedette (7)

AnalyticsConf : Azure SQL Data Warehouse
AnalyticsConf : Azure SQL Data WarehouseAnalyticsConf : Azure SQL Data Warehouse
AnalyticsConf : Azure SQL Data Warehouse
 
Azure SQL DWH
Azure SQL DWHAzure SQL DWH
Azure SQL DWH
 
Windows Sql Azure Cloud Computing Platform
Windows Sql Azure Cloud Computing PlatformWindows Sql Azure Cloud Computing Platform
Windows Sql Azure Cloud Computing Platform
 
Cloud Databases in Research and Practice
Cloud Databases in Research and PracticeCloud Databases in Research and Practice
Cloud Databases in Research and Practice
 
Implement SQL Server on an Azure VM
Implement SQL Server on an Azure VMImplement SQL Server on an Azure VM
Implement SQL Server on an Azure VM
 
Introducing Azure SQL Database
Introducing Azure SQL DatabaseIntroducing Azure SQL Database
Introducing Azure SQL Database
 
HA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybridHA/DR options with SQL Server in Azure and hybrid
HA/DR options with SQL Server in Azure and hybrid
 

Similaire à Developing with Windows Azure storage & SQL Azure

eZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedeZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedBertrand Dunogier
 
Introduction To Moco
Introduction To MocoIntroduction To Moco
Introduction To MocoNaoya Ito
 
solving little problems
solving little problemssolving little problems
solving little problemsAustin Ziegler
 
Abstracting functionality with centralised content
Abstracting functionality with centralised contentAbstracting functionality with centralised content
Abstracting functionality with centralised contentMichael Peacock
 
Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Kris Wallsmith
 
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentLaying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentTammy Hart
 
Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Kris Wallsmith
 
Caching in WordPress
Caching in WordPressCaching in WordPress
Caching in WordPressTareq Hasan
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AIHiroshi Tanaka
 
Using WordPress as your application stack
Using WordPress as your application stackUsing WordPress as your application stack
Using WordPress as your application stackPaul Bearne
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking Sebastian Marek
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolGordon Forsythe
 
Aura Project for PHP
Aura Project for PHPAura Project for PHP
Aura Project for PHPHari K T
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practicesmarkparolisi
 
Express Presentation
Express PresentationExpress Presentation
Express Presentationaaronheckmann
 
Maintaining your own branch of Drupal core
Maintaining your own branch of Drupal coreMaintaining your own branch of Drupal core
Maintaining your own branch of Drupal coredrumm
 

Similaire à Developing with Windows Azure storage & SQL Azure (20)

eZ Publish Cluster Unleashed
eZ Publish Cluster UnleashedeZ Publish Cluster Unleashed
eZ Publish Cluster Unleashed
 
Introduction To Moco
Introduction To MocoIntroduction To Moco
Introduction To Moco
 
Views notwithstanding
Views notwithstandingViews notwithstanding
Views notwithstanding
 
solving little problems
solving little problemssolving little problems
solving little problems
 
Abstracting functionality with centralised content
Abstracting functionality with centralised contentAbstracting functionality with centralised content
Abstracting functionality with centralised content
 
Separation of concerns - DPC12
Separation of concerns - DPC12Separation of concerns - DPC12
Separation of concerns - DPC12
 
Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3Introducing Assetic: Asset Management for PHP 5.3
Introducing Assetic: Asset Management for PHP 5.3
 
Laying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme developmentLaying the proper foundation for plugin and theme development
Laying the proper foundation for plugin and theme development
 
Assetic (Zendcon)
Assetic (Zendcon)Assetic (Zendcon)
Assetic (Zendcon)
 
Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)
 
Assetic (OSCON)
Assetic (OSCON)Assetic (OSCON)
Assetic (OSCON)
 
Caching in WordPress
Caching in WordPressCaching in WordPress
Caching in WordPress
 
SCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AISCasia 2018 MSFT hands on session for Azure Batch AI
SCasia 2018 MSFT hands on session for Azure Batch AI
 
Using WordPress as your application stack
Using WordPress as your application stackUsing WordPress as your application stack
Using WordPress as your application stack
 
vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking vfsStream - effective filesystem mocking
vfsStream - effective filesystem mocking
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_Tool
 
Aura Project for PHP
Aura Project for PHPAura Project for PHP
Aura Project for PHP
 
WordPress Structure and Best Practices
WordPress Structure and Best PracticesWordPress Structure and Best Practices
WordPress Structure and Best Practices
 
Express Presentation
Express PresentationExpress Presentation
Express Presentation
 
Maintaining your own branch of Drupal core
Maintaining your own branch of Drupal coreMaintaining your own branch of Drupal core
Maintaining your own branch of Drupal core
 

Plus de Maarten Balliauw

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxMaarten Balliauw
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Maarten Balliauw
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceMaarten Balliauw
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Maarten Balliauw
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Maarten Balliauw
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...Maarten Balliauw
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...Maarten Balliauw
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...Maarten Balliauw
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...Maarten Balliauw
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchMaarten Balliauw
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandMaarten Balliauw
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Maarten Balliauw
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneMaarten Balliauw
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneMaarten Balliauw
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...Maarten Balliauw
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingMaarten Balliauw
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Maarten Balliauw
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...Maarten Balliauw
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETMaarten Balliauw
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingMaarten Balliauw
 

Plus de Maarten Balliauw (20)

Bringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptxBringing nullability into existing code - dammit is not the answer.pptx
Bringing nullability into existing code - dammit is not the answer.pptx
 
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
Nerd sniping myself into a rabbit hole... Streaming online audio to a Sonos s...
 
Building a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to SpaceBuilding a friendly .NET SDK to connect to Space
Building a friendly .NET SDK to connect to Space
 
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
Microservices for building an IDE - The innards of JetBrains Rider - NDC Oslo...
 
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
Indexing and searching NuGet.org with Azure Functions and Search - .NET fwday...
 
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
NDC Sydney 2019 - Microservices for building an IDE – The innards of JetBrain...
 
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
JetBrains Australia 2019 - Exploring .NET’s memory management – a trip down m...
 
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se....NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
.NET Conf 2019 - Indexing and searching NuGet.org with Azure Functions and Se...
 
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
CloudBurst 2019 - Indexing and searching NuGet.org with Azure Functions and S...
 
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and SearchNDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
NDC Oslo 2019 - Indexing and searching NuGet.org with Azure Functions and Search
 
Approaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days PolandApproaches for application request throttling - Cloud Developer Days Poland
Approaches for application request throttling - Cloud Developer Days Poland
 
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
Indexing and searching NuGet.org with Azure Functions and Search - Cloud Deve...
 
Approaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologneApproaches for application request throttling - dotNetCologne
Approaches for application request throttling - dotNetCologne
 
CodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory laneCodeStock - Exploring .NET memory management - a trip down memory lane
CodeStock - Exploring .NET memory management - a trip down memory lane
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
ConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttlingConFoo Montreal - Approaches for application request throttling
ConFoo Montreal - Approaches for application request throttling
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
JetBrains Day Seoul - Exploring .NET’s memory management – a trip down memory...
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
VISUG - Approaches for application request throttling
VISUG - Approaches for application request throttlingVISUG - Approaches for application request throttling
VISUG - Approaches for application request throttling
 

Dernier

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Dernier (20)

Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Developing with Windows Azure storage & SQL Azure

  • 1. Windows Azure StorageSQL Azure Developing with Windows Azure storage & SQL Azure Maarten Balliauw http://blog.maartenballiauw.be http://twitter.com/maartenballiauw maarten@maartenballiauw.be
  • 2. Whoam I? Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … Special interest in interop PHPExcel, PHPLinq, PHPMEF, Windows Azure SDK for PHP, ... http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
  • 3.
  • 5.
  • 6. Windows Azure Data Storage Queue Blob Account Tables Drives
  • 7. Azure Platform Data Storage Options Windows Azure Data Storage Blobs Unstructured data storage Tables Semi-structured or tabular data storage Queues Buffered delivery data storage Drives Durable NTFS volumes that Windows Azure applications can use. See: http://microsoftpdc.com/Sessions/SVC14 SQL Azure Relational data storage
  • 8. PHP + Cloud Storage Windows Azure Storage PHP Instance (web/worker) On-Premise VIP Load Balancer PHP App SQL Azure Windows Azure Platform
  • 11. Windows Azure SDK for PHP A PHP porgramming model for Windows Azure Storage
  • 12. PHP with Windows Azure Storage Windows Azure SDK for PHP at http://phpazure.codeplex.com PHP programming model for Windows Azure Storage Features PHP classes for Blobs, Tables & Queues Store PHP sessions in Table Storage File system wrapper for Blob Storage
  • 13. Blob Container Entities Account Table http://<account>.blob.core.windows.net/<container> Messages Windows Azure Storage Concepts http://<account>.table.core.windows.net/<table> Queue http://<account>.queue.core.windows.net/<queue>
  • 14. Windows Azure Blobs Unstructured data Scale massively At least 3 instances, 5 in optimal situation Can be used as CDN Can be mapped using a custom domain
  • 15. Tools for connecting to blob storage CloudBerryLab Explorerhttp://www.cloudberrylab.com Azure Storage Explorerhttp://azurestorageexplorer.codeplex.com/ Onlinehttp://myazurestorage.com / ftp://ftp.cloudapp.net Windows Azure tooling for Eclipse
  • 16. Blobs Sample $blobStorage= new Microsoft_WindowsAzure_Storage_Blob(); // Create if (!$blobStorage->containerExists($containerName)) { $blobStorage->createContainer($containerName); $blobStorage->setContainerAcl($containerName, Microsoft_WindowsAzure_Storage_Blob::ACL_PUBLIC); } // Store $blob = $blobStorage->putBlob($containerName, $blobName, $localFilename, $metadata); /* @var $blob Microsoft_WindowsAzure_Storage_BlobInstance */
  • 17. Blobs Sample Cont… // Copy $result = $blobStorage->copyBlob( $containerName, $blobName, $containerName, $blob2Name); // Retrieve $tempStore= azure_getlocalresourcepath('tempstore'); $tempPath= $tempStore. '' . $imageId; $blobStorage->getBlob($containerName, $blobName, $tempPath); // Delete $result = $blobStorage->deleteBlob($containerName, $blobName); $result = $blobStorage->deleteContainer($containerName); http://phpazurecontrib.codeplex.com
  • 18. Blob Stream Wrapper $blobStorage= new Microsoft_WindowsAzure_Storage_Blob(); // Register: $blobStorage->registerStreamWrapper(); // registers azure:// // or $blobStorage->registerStreamWrapper('blob://'); // use blob:// // Use $fp= fopen('azure://mycontainer/myfile.txt', 'r'); // ... fclose($fp);
  • 19. Windows Azure Drive (a.k.a. Xdrive) Virtual NTFS volume that can be mounted .vhd format Use existing NTFS API’s Easier migration Stored on blob storage provides quick mount/unmount in other VM
  • 20. Queue Workflow Concepts Windows Azure Queue Provides Guarantee delivery (two-step consumption) Worker Dequeues Message and mark it as Invisible Worker Deletes Message when finished processing it If Worker role crashes, message becomes visible for another Worker to process Doesn’t guarantee “only once” delivery Doesn’t guarantee ordering Best effort FIFO Worker Role Web Role Input Queue (Work Items) Worker Role Azure Queue Web Role Worker Role Web Role Worker Role
  • 21. Azure Queues RemoveMessage GetMessage (Timeout) Worker Role PutMessage Queue Msg 1 Msg 2 Msg 2 Msg 1 Web Role Worker Role Worker Role Msg 3 Msg 4 Msg 2
  • 22. Loosely Coupled Work with Queues Worker-Queue Model Load work in a queue Many workers consume the queue Input Queue (Work Items) Azure Queue Worker Role Web Role Worker Role Web Role Worker Role Web Role Worker Role
  • 23. Queues $queueClient= new Microsoft_WindowsAzure_Storage_Queue(); // Create $result = $queueClient->createQueue('imageQueue'); // Delete $queueClient->deleteQueue('imageQueue'); // Add message $queueClient->putMessage('imageQueue', $message, $ttl); // Retrieve Messages $messages = $queueClient->getMessages('imageQueue', 10); foreach($messages as $message) { // Do work here... $queueClient->deleteMessage('imageQueue', $message); }
  • 24. Windows Azure Data Storage – Tables (Terms Part 1) Table Contains a set of entities. Entity (Row) Basic data items stored in a table. Property (Column) Single value in an entity. RowKey Unique ID of the entity within a partition Timestamp Time it was created
  • 25. Windows Azure Data Storage – Tables (Terms Part 2) Partition Entities in a table with the same partition key PartitionKey Segments entities in to partitions to automatically distribute the table’s entities over many storage nodes. Sort Order There is a single index provided, where all entities in a table are sorted by PartitionKey and then RowKey
  • 26. Key Example – Blog Posts Partition 1 Partition 2 Getting all of dunnry’s blog posts is fast Single partition Getting all posts after 2008-03-27 is slow Traverse all partitions
  • 27. Table Sample $tableStorage= new Microsoft_WindowsAzure_Storage_Table( 'table.core.windows.net', 'myaccount', 'myauthkey'); // Create $result = $tableStorage->createTable($tableName); // List $result = $tableStorage->listTables(); foreach($result as $table) { echo 'Table name is: ' . $table->Name . ""; } // Delete $tableStorage->deleteTable($tableName);
  • 28. Tables with Entities // Structured entity class ImageEntityextends Microsoft_WindowsAzure_Storage_TableEntity { /** * @azure filename */ public $filename; /** * @azure size Edm.Int64 */ public $size; } // Unstructured entity // Microsoft_WindowsAzure_Storage_DynamicTableEntity
  • 29. Tables with Entities Cont… // Insert $image = new ImageEntity($partitionKey, $rowKey); $image->filename = $_FILES['imageUpload']['name']; $image->size = $_FILES['imageUpload']['size']; $image = $tableStorageClient->insertEntity($tableName, $image); // Retrieve $image = $tableStorage->retrieveEntityById($tableName, $partitionKey, $rowKey, 'ImageEntity'); // Update $image->filename = 'newname.jpg'; $result = $tableStorage->updateEntity($tableName, $image); // Delete $result = $tableStorage->deleteEntity($tableName, $image);
  • 30. Table Queries // Filter condition $select = "filesizegt 1024 and PartitionKeyeq '$partitionKey'"; // Or fluent interface $select = $tableStorage->select()->from($tableName) ->where('filesizegt 1024') ->andWhere('PartitionKeyeq ?', $partitionKey); // Run query $images = $tableStorage->storageClient->retrieveEntities( 'testtable', $select, 'ImageEntity' ); foreach($images as $image) { echo 'Name: ' . $image->filename . ""; }
  • 31. Batching Operations // Start batch $batch = $tableStorage->startBatch(); // Insert multiple $images = generateEntities(); foreach($images as $image) { $tableStorage->insertEntity($tableName, $image); } // Commit $batch->commit();
  • 32. Table session handler $sessionHandler = new Microsoft_WindowsAzure_SessionHandler($tableStorage); $sessionHandler->register(); session_start(); if (!isset($_SESSION['start'])) { $_SESSION['start'] = time(); }
  • 33. SQL Azure A relational database for the cloud
  • 34. SQL Azure and Windows Azure Table Comparison SQL Azure Tables Windows Azure Tables Fully structured Strongly typed Relational(RDBMS) Highly scalable Semi-structured Loosely typed Non-Relational(Not RDBMS) Massively scalable
  • 35. MySQL: Simple Configuration VIP Load Balancer Web Role MySQL Worker Role
  • 36. MySQL in a Windows Azure Application Running MySQL in a worker role Copy MySQL to the worker role sub-directory Copy to read-write local storage Configure MySQL to listen on the right port Monitor MySQL health Consuming MySQL Discover IP address and port Normal access from then on Handle topology changes
  • 37. Simple Configuration VIP Load Balancer MySQL
  • 38. Replication VIP Load Balancer M S S MySQL MySQL MySQL
  • 39. Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL
  • 40. Windows Azure Drive with Hot Spare VIP Load Balancer MySQL MySQL
  • 41. SQL Azure Features Supported Not supported Tables, Indexes, Views Stored Procedures Triggers Constraints Table Variables Temp Tables (#Name) Physical Server Access Catalog DDL Common Language Runtime Service Broker Reporting Services Analysis Services Distributed Transactions and Queries
  • 42. SQL AzureDeployment Web Portal (API) DB Script SQL Azure TDS
  • 43. SQL AzureAccessing databases Web Portal (API) Your App SQL Azure TDS Change Connection String
  • 44. Database Replicas Single Database Multiple Replicas Replica 1 Single Primary Replica 2 DB Replica 3
  • 45. SQL AzureDatabase Monitoring & Recovery Web Portal (API) ! Your App SQL Azure TDS
  • 46. SQL Azure Server Creation
  • 47.
  • 48.
  • 49. Migrating schema and data SQL Azure Migration Wizardhttp://sqlazuremw.codeplex.com SQL Azure Data Sync Tool for SQL Serverhttp://www.microsoft.com/windowsazure/developers/sqlazure/datasync/ SQL Server Management Studio 2008 R2 November Community Technology Preview
  • 50. PHP with SQL Azure SQL Server Driver for PHP @ http://sqlsrvphp.codeplex.com/ Supports PHP access to SQL Azure Features Choose between SQL Server and SQL Azure by changing connection string Use from on-premises or in Windows Azure
  • 52. Resources Microsoft Windows Azure Interop http://www.microsoft.com/windowsazure/interop/ Interop Bridges http://www.interoperabilitybridges.com/
  • 53. More resources PHP http://www.windowsazure4e.org http://phpazure.codeplex.com/ http://phpazurecontrib.codeplex.com/ MySQL Windows Azure MySQL PHP Solution Accelerator http://code.msdn.microsoft.com/winazuremysqlphp
  • 54. Questions? More information? Contact me http://phpazure.codeplex.com http://blog.maartenballiauw.be maarten@maartenballiauw.be http://twitter.com/maartenballiauw Thankyouforwatching!

Notes de l'éditeur

  1. http://eric.blob.core.windows.net/music/rock/rush/xanadu.mp3Blobs – Provide a simple interface for storing named files along with metadata for the fileTables – Provide structured storage. A Table is a set of entities, which contain a set of propertiesQueues – Provide reliable storage and delivery of messages for an applicationTab
  2. Harvesting!
  3. Use queues as a way of communicating w/ the backend worker rolesWRs call getmessage and pass timeoutTimeout value is importantExpiration time is important; message is marked in the queue as invisible; for duration of timeout it’s invisibleWhen we’re done processing, we call a message to remove the message through a deleteTh reason we do this is imagine we have a second worker role; if something goes wrong, once the timeout expires, the message becomes visible, and the next person to do a get message will get the message
  4. The PartitionKey combined with the RowKey uniquely identifies an entity in a table.
  5. 11:53Getting the all of dunnry’s post it fast because we’re selecting the entities by a partition keyGetting all of the posts after a certain is slow because we may have to traverse across multiple servers because we’re selecting entities that span partition keysA query without the partition key is really a scan
  6. We have included this feature comparison table in anticipation of your likely questions about differences between using a relational database table as you may be currently doing with your SQL Server databases and the new Windows Azure Tables included in Windows Azure.
  7. As I stated earlier, SQL Azure is based on SQL Server 2008. At this time it is only a subset of the features of the server product.My intention here is to convey the high level features that are supported and the ones that are not.SQL Azure will support most of the things we need… Tables, Index, Views, Stored Procedures, Triggers, and Constraints… in my book… that’s all the functionality that I need for most of my applications.There are some other adjunct technologies that ship as part of SQL Server 2008 such as SQL Reporting Services and Analysis Services which are not supported. The Service Broker is also not supported.
  8. So let’s assume that we have designed our relational database with local developer and data modeling tools.We can begin our story then by assuming that we want to get our database deployed to the cloud.There are some tools that will expedite this process which I will show you later, but for now lets assume that we have scripted our database schema. We apply this script to SQL Azure which speaks native TDS.If you created your database through the SQL Azure Portal, then SQL Azure will have created one master database and three replicas of that database. If you create your database with the script the same will be true.These replicas are stored in different database centers from the master to provide redundancy and protection against geographical catastrophe.
  9. Configuring our application to use SQL Azure storage instead of SQL Server is simply a matter of modifying the connection string in our application’s configuration file.When our application requests data, ADO.NET speaks to the TDS which directs our queries to the master database server. The master database server performs our query and returns the results to our application.
  10. From our application’s point of view, there is only one SQL Azure database.As we make updates to our database, those updates are replicated to other copies stored in other data centers so that in the event that our database fails for any reason, the other databases will be standing by ready to take its place.
  11. But what if that master database server fails for some reason?TDS is receives notification of the database failure and automatically redirects the call to the replica!The Azure Cloud Fabric is self-healing… and the details are outside the scope of this presentation; however, the fabric will get busy repairing itself like drones on a Borg mother ship… essentially with the objective of keeping three replicas online at a time.
  12. I will demonstrate creating a SQL Azure account in session 3 where I will walk you through the entire process.For now I simply want to give you some background information to prepare you for our first demonstration.When we create our SQL Azure database server, we’ll be prompted for an Administrator’s name and a password.This username and password will be the granted a system administrator role that is similar to the “sa” account on a local SQL Server 2008 box. The account has permission to create and drop databases and database ownership authority in any databases that you create with this account.
  13. After creating your SQL Azure database server, you will want to grant appropriate access through the SQL Azure firewall.SQL Azure provides a very simple and easy to maintain firewall. The firewall is so easy to use that it’s only going to get one slide in my deck!The firewall allows us to expose our database to Windows Azure services via a checkbox and to add ranges of IP addresses such as your home office and your business… or possibly the address of a 3rd party server hosting some application that needs data access.I’ll do a thorough demo of this feature in session 3…
  14. When you created your SQL Azure database server, you supplied an administrator’s user name and password. I have named my user accordingly… to remind me of its power.The SQL Portal will offer you the ability to copy these credentials in connection string format to your clip board… tempting you into believing that you should just paste this into your configuration file.This is terrific for demos like mine… BUT you should NEVER, EVER do this…A database server system administrator password placed in a configuration file in clear text format… there has got to be something naive in the extreme going on here… and worse… no way to create non-sa-like users through the UI… you must script your database users and then apply the script to the database. And to anticipate your question… no… you can’t use SQL Server Management Studio to do this either.I will demo this as well in session 3… so hang tight…