SlideShare a Scribd company logo
Работа с
Windows Azure Drive




                                25/07/2012

                            Ревенков Павел
     EPAM Cloud Computing Competence Center

                  pavlo_revenkov@epam.com
Data Management Services
• SQL Azure – реляционная база данных;

• Tables – не реляционные таблицы;

• Queue - очереди;

• Blob - двоичные данные;

• Drive - подключаемые облачные NTFS-тома (VHD).

                                              2
Пример: CMS-система
Publishers                                                    Author




        Instance 1   Instance 2           Instance 3   Instance 4




                                  Mount

        30 minutes


      Snapshot                Repository


                                                                       3
Windows Azure Drive
   Azure
Subscription


   Storage Account
       (100 ТВ)
                     Container
                                 Block Blob (200 GB)
   Storage Account
       (100 ТВ)      Container
                                  Page Blob (1 ТВ)
   Storage Account   Container

                      …
       (100 ТВ)                  Azure Drive (1 ТВ)

   Storage Account
       (100 ТВ)
                                       …
   Storage Account
       (100 ТВ)                                        4
Загрузка данных в Blob Storage
var storageAccount = CloudStorageAccount.Parse(
    ConfigurationManager
        .ConnectionStrings[ConnectionStringSetting]
        .ConnectionString);

var blobClient = storageAccount.CreateCloudBlobClient();
var container = blobClient.GetContainerReference(containerName);
var pageBlob = container.GetPageBlobReference(blobName);
using (var fileStream = new FileStream(filePath, FileMode.Open)) {
    pageBlob.Create(fileStream.Length);

    var buffer = new byte[partSize];
    while (offset < fileStream.Length) {
        var bytesRead = fileStream.Read(buffer, 0, partSize);

         pageBlob.WritePages(new MemoryStream(buffer, 0, bytesRead), offset);

         offset += bytesRead;
    }
}
                                                                            5
1. public static void UploadVHDFile(string filePath, string containerName, string blobName)
2. {
3.       const int partSize = 1024 * 1024;
4.
5.       var storageAccount = CloudStorageAccount.Parse(
6.           ConfigurationManager.ConnectionStrings[ConnectionStringSetting].ConnectionString);
7.
8.       var blobClient = storageAccount.CreateCloudBlobClient();
9.       var container = blobClient.GetContainerReference(containerName);
10.          container.CreateIfNotExist();
11.
12.      var pageBlob = container.GetPageBlobReference(blobName);
13.          pageBlob.DeleteIfExists();
14.          pageBlob.Properties.ContentType = "binary/octet-stream";
15.
16.      using (var fileStream = new FileStream(filePath, FileMode.Open))
17.      {
18.          int offset = 0;
19.
20.          pageBlob.Create(fileStream.Length);
21.
22.          var buffer = new byte[partSize];
23.          while (offset < fileStream.Length)
24.          {
25.               var bytesRead = fileStream.Read(buffer, 0, partSize);
26.
27.               pageBlob.WritePages(new MemoryStream(buffer, 0, bytesRead), offset);
28.
29.               offset += bytesRead;
30.
31.               Console.Write('.');
32.          }
33.      }
34. }
                                                                                                  6
Режимы работы Azure Drive
             CloudDrive
                                                Snapshot
                client




                       URL
                                Exception
                  Mount                          Mount

                  Да

Author       Lease режим                    Snapshot режим   Publisher




                                                    чтение
              чтение

                       запись




                                Windows Azure
                                    Drive
                                                                         7
Работа с Windows Azure Drive
var account = CloudStorageAccount.Parse(
    RoleEnvironment.GetConfigurationSettingValue("ConnectionString"));

var drive = account.CreateCloudDrive("drives/vhd");

try
{
      drive.Mount(0, DriveMountOptions.None);
      ...
}
catch (CloudDriveException e)
{
    drive = account.CreateCloudDrive(drive.Snapshot().AbsoluteUri);
    drive.Mount(0, DriveMountOptions.None);
}
finally
{
    drive.Unmount();
}


                                                                         8
1. public ActionResult Index()
2. {
3.       var account = CloudStorageAccount.Parse(
4.           RoleEnvironment.GetConfigurationSettingValue("ConnectionString"));
5.
6.       var drive = account.CreateCloudDrive("drives/vhd");
7.       var letter = string.Empty;
8.
9.       FileInfo[] files;
10.      try
11.      {
12.          letter = drive.Mount(0, DriveMountOptions.None);
13.      }
14.      catch (CloudDriveException e)
15.      {
16.          drive = account.CreateCloudDrive(drive.Snapshot().AbsoluteUri);
17.          letter = drive.Mount(0, DriveMountOptions.None);
18.      }
19.      finally
20.      {
21.          files = new DirectoryInfo(drive.LocalPath).GetFiles();
22.          drive.Unmount();
23.      }
24.      ViewBag.Message = String.Format("Azure Drive mounted on: {0}", letter);
25.
26.      return View(files);
27. }

                                                                                   9
Questions?




             10
Ссылки и материалы

Differences Between the Storage Emulator and
Windows Azure Storage Services:
     http://msdn.microsoft.com/en-us/gg433135



Windows Azure Drive whitepaper:
     http://go.microsoft.com/?linkid=9710117




                                                11

More Related Content

What's hot

Windows Azure Drive
Windows Azure DriveWindows Azure Drive
Windows Azure Drive
Pavel Revenkov
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
Neil Mackenzie
 
caching2012.pdf
caching2012.pdfcaching2012.pdf
caching2012.pdf
KarthikS573262
 
Windows Azure Virtual Machines And Virtual Networks
Windows Azure Virtual Machines And Virtual NetworksWindows Azure Virtual Machines And Virtual Networks
Windows Azure Virtual Machines And Virtual Networks
Kristof Rennen
 
Windows Azure Storage – Architecture View
Windows Azure Storage – Architecture ViewWindows Azure Storage – Architecture View
Windows Azure Storage – Architecture View
Chaowlert Chaisrichalermpol
 
SQL Azure
SQL AzureSQL Azure
SQL Azure
Pavel Revenkov
 
Azure storage
Azure storageAzure storage
Azure storage
Adam Skibicki
 
Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...
Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...
Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...
Sriram Krishnan
 
A complete guide to azure storage
A complete guide to azure storageA complete guide to azure storage
A complete guide to azure storage
Himanshu Sahu
 
Mongo db world 2014 nyc mongodb on azure - tips tricks and examples
Mongo db world 2014 nyc   mongodb on azure - tips tricks and examplesMongo db world 2014 nyc   mongodb on azure - tips tricks and examples
Mongo db world 2014 nyc mongodb on azure - tips tricks and examples
Brian Benz
 
Azure IaaS
Azure IaaSAzure IaaS
Azure IaaS
Guy Barrette
 
Azure storage
Azure storageAzure storage
Azure storage
Raju Kumar
 
Azure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment ScenariosAzure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment Scenarios
Brian Benz
 
Microsoft Azure, door Rob Brommer op de 4DotNet Developers Day
Microsoft Azure, door Rob Brommer op de 4DotNet Developers DayMicrosoft Azure, door Rob Brommer op de 4DotNet Developers Day
Microsoft Azure, door Rob Brommer op de 4DotNet Developers Day
Hanneke Dotnet
 
SQL Server 2014 Hybrid Cloud Features
SQL Server 2014 Hybrid Cloud FeaturesSQL Server 2014 Hybrid Cloud Features
SQL Server 2014 Hybrid Cloud Features
Guillermo Caicedo
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
Karthikeyan Anbarasan (AK)
 
Windows Azure platform
Windows Azure platformWindows Azure platform
Windows Azure platform
GetDev.NET
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
Norberto Leite
 
13 deploying cloud applications
13   deploying cloud applications13   deploying cloud applications
13 deploying cloud applications
darwinodb
 
Tech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on AzureTech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on Azure
Brian Benz
 

What's hot (20)

Windows Azure Drive
Windows Azure DriveWindows Azure Drive
Windows Azure Drive
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
caching2012.pdf
caching2012.pdfcaching2012.pdf
caching2012.pdf
 
Windows Azure Virtual Machines And Virtual Networks
Windows Azure Virtual Machines And Virtual NetworksWindows Azure Virtual Machines And Virtual Networks
Windows Azure Virtual Machines And Virtual Networks
 
Windows Azure Storage – Architecture View
Windows Azure Storage – Architecture ViewWindows Azure Storage – Architecture View
Windows Azure Storage – Architecture View
 
SQL Azure
SQL AzureSQL Azure
SQL Azure
 
Azure storage
Azure storageAzure storage
Azure storage
 
Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...
Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...
Keynote - Silicon Valley Cloud Computing User Group Meet - April 2011 - Srira...
 
A complete guide to azure storage
A complete guide to azure storageA complete guide to azure storage
A complete guide to azure storage
 
Mongo db world 2014 nyc mongodb on azure - tips tricks and examples
Mongo db world 2014 nyc   mongodb on azure - tips tricks and examplesMongo db world 2014 nyc   mongodb on azure - tips tricks and examples
Mongo db world 2014 nyc mongodb on azure - tips tricks and examples
 
Azure IaaS
Azure IaaSAzure IaaS
Azure IaaS
 
Azure storage
Azure storageAzure storage
Azure storage
 
Azure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment ScenariosAzure Virtual Machines Deployment Scenarios
Azure Virtual Machines Deployment Scenarios
 
Microsoft Azure, door Rob Brommer op de 4DotNet Developers Day
Microsoft Azure, door Rob Brommer op de 4DotNet Developers DayMicrosoft Azure, door Rob Brommer op de 4DotNet Developers Day
Microsoft Azure, door Rob Brommer op de 4DotNet Developers Day
 
SQL Server 2014 Hybrid Cloud Features
SQL Server 2014 Hybrid Cloud FeaturesSQL Server 2014 Hybrid Cloud Features
SQL Server 2014 Hybrid Cloud Features
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
Windows Azure platform
Windows Azure platformWindows Azure platform
Windows Azure platform
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
 
13 deploying cloud applications
13   deploying cloud applications13   deploying cloud applications
13 deploying cloud applications
 
Tech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on AzureTech Ed North America 2014 - Java on Azure
Tech Ed North America 2014 - Java on Azure
 

Similar to Windows Azure Drive

C fowler azure-dojo
C fowler azure-dojoC fowler azure-dojo
C fowler azure-dojo
sdeconf
 
Azure Table Storage: The Good, the Bad, the Ugly (full talk)
Azure Table Storage: The Good, the Bad, the Ugly (full talk)Azure Table Storage: The Good, the Bad, the Ugly (full talk)
Azure Table Storage: The Good, the Bad, the Ugly (full talk)
Sirar Salih
 
Windows Azure Storage
Windows Azure StorageWindows Azure Storage
Windows Azure Storage
Mihai Dan Nadas
 
Java and windows azure cloud service
Java and windows azure cloud serviceJava and windows azure cloud service
Java and windows azure cloud service
Jeffray Huang
 
Windows azure camp - Kolkata
Windows azure camp - KolkataWindows azure camp - Kolkata
Windows azure camp - Kolkata
Abhijit Jana
 
Escalabilidad horizontal y arquitecturas elásticas en Microsoft azure
Escalabilidad horizontal y arquitecturas elásticas en Microsoft azureEscalabilidad horizontal y arquitecturas elásticas en Microsoft azure
Escalabilidad horizontal y arquitecturas elásticas en Microsoft azure
Enrique Catala Bañuls
 
Azure Storage Account ve Microsoft Azure Data Lake Storage.pptx
Azure Storage Account ve Microsoft Azure Data Lake Storage.pptxAzure Storage Account ve Microsoft Azure Data Lake Storage.pptx
Azure Storage Account ve Microsoft Azure Data Lake Storage.pptx
Mustafa Özdemir
 
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
Денис Резник
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
Michael Collier
 
Windows azure camp
Windows azure campWindows azure camp
Windows azure camp
Abhishek Sur
 
AWS CSA Associate 06-07
AWS CSA Associate 06-07AWS CSA Associate 06-07
AWS CSA Associate 06-07
Heitor Vital
 
NoSQL on microsoft azure april 2014
NoSQL on microsoft azure   april 2014NoSQL on microsoft azure   april 2014
NoSQL on microsoft azure april 2014
Brian Benz
 
Gaming across multiple devices
Gaming across multiple devicesGaming across multiple devices
Gaming across multiple devices
Patric Boscolo
 
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
Hiroshi Tanaka
 
MongoDB and Windows Azure
MongoDB and Windows AzureMongoDB and Windows Azure
MongoDB and Windows Azure
Doug Mahugh
 
Azure Cloud Dev Camp - App Platform
Azure Cloud Dev Camp - App PlatformAzure Cloud Dev Camp - App Platform
Azure Cloud Dev Camp - App Platform
giventocode
 
MongoDB and Windows Azure
MongoDB and Windows AzureMongoDB and Windows Azure
MongoDB and Windows Azure
MongoDB
 
Windows 8 and the Cloud
Windows 8 and the CloudWindows 8 and the Cloud
Windows 8 and the Cloud
David Pallmann
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
Amazon Web Services
 
London .NET Developers Azure Websites
London .NET Developers Azure WebsitesLondon .NET Developers Azure Websites
London .NET Developers Azure Websites
Tom Walker
 

Similar to Windows Azure Drive (20)

C fowler azure-dojo
C fowler azure-dojoC fowler azure-dojo
C fowler azure-dojo
 
Azure Table Storage: The Good, the Bad, the Ugly (full talk)
Azure Table Storage: The Good, the Bad, the Ugly (full talk)Azure Table Storage: The Good, the Bad, the Ugly (full talk)
Azure Table Storage: The Good, the Bad, the Ugly (full talk)
 
Windows Azure Storage
Windows Azure StorageWindows Azure Storage
Windows Azure Storage
 
Java and windows azure cloud service
Java and windows azure cloud serviceJava and windows azure cloud service
Java and windows azure cloud service
 
Windows azure camp - Kolkata
Windows azure camp - KolkataWindows azure camp - Kolkata
Windows azure camp - Kolkata
 
Escalabilidad horizontal y arquitecturas elásticas en Microsoft azure
Escalabilidad horizontal y arquitecturas elásticas en Microsoft azureEscalabilidad horizontal y arquitecturas elásticas en Microsoft azure
Escalabilidad horizontal y arquitecturas elásticas en Microsoft azure
 
Azure Storage Account ve Microsoft Azure Data Lake Storage.pptx
Azure Storage Account ve Microsoft Azure Data Lake Storage.pptxAzure Storage Account ve Microsoft Azure Data Lake Storage.pptx
Azure Storage Account ve Microsoft Azure Data Lake Storage.pptx
 
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
 
More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)More Cache for Less Cash (DevLink 2014)
More Cache for Less Cash (DevLink 2014)
 
Windows azure camp
Windows azure campWindows azure camp
Windows azure camp
 
AWS CSA Associate 06-07
AWS CSA Associate 06-07AWS CSA Associate 06-07
AWS CSA Associate 06-07
 
NoSQL on microsoft azure april 2014
NoSQL on microsoft azure   april 2014NoSQL on microsoft azure   april 2014
NoSQL on microsoft azure april 2014
 
Gaming across multiple devices
Gaming across multiple devicesGaming across multiple devices
Gaming across multiple devices
 
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
 
MongoDB and Windows Azure
MongoDB and Windows AzureMongoDB and Windows Azure
MongoDB and Windows Azure
 
Azure Cloud Dev Camp - App Platform
Azure Cloud Dev Camp - App PlatformAzure Cloud Dev Camp - App Platform
Azure Cloud Dev Camp - App Platform
 
MongoDB and Windows Azure
MongoDB and Windows AzureMongoDB and Windows Azure
MongoDB and Windows Azure
 
Windows 8 and the Cloud
Windows 8 and the CloudWindows 8 and the Cloud
Windows 8 and the Cloud
 
Monitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar SeriesMonitoring Containers at Scale - September Webinar Series
Monitoring Containers at Scale - September Webinar Series
 
London .NET Developers Azure Websites
London .NET Developers Azure WebsitesLondon .NET Developers Azure Websites
London .NET Developers Azure Websites
 

More from Pavel Revenkov

Windows Azure PowerShell CmdLets
Windows Azure PowerShell CmdLetsWindows Azure PowerShell CmdLets
Windows Azure PowerShell CmdLets
Pavel Revenkov
 
Windows Azure Active Directory
Windows Azure Active DirectoryWindows Azure Active Directory
Windows Azure Active Directory
Pavel Revenkov
 
Windows Azure Versioning Strategies
Windows Azure Versioning StrategiesWindows Azure Versioning Strategies
Windows Azure Versioning Strategies
Pavel Revenkov
 
Windows Azure Zero Downtime Upgrade
Windows Azure Zero Downtime UpgradeWindows Azure Zero Downtime Upgrade
Windows Azure Zero Downtime Upgrade
Pavel Revenkov
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service Bus
Pavel Revenkov
 
Windows azure start
Windows azure startWindows azure start
Windows azure start
Pavel Revenkov
 
SQL Azure Federations
SQL Azure FederationsSQL Azure Federations
SQL Azure Federations
Pavel Revenkov
 
Windows Azure PowerShell Cmdlets
Windows Azure PowerShell CmdletsWindows Azure PowerShell Cmdlets
Windows Azure PowerShell Cmdlets
Pavel Revenkov
 
Starting with windows azure
Starting with windows azureStarting with windows azure
Starting with windows azure
Pavel Revenkov
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service Bus
Pavel Revenkov
 
Windows Azure Storage services
Windows Azure Storage servicesWindows Azure Storage services
Windows Azure Storage services
Pavel Revenkov
 

More from Pavel Revenkov (11)

Windows Azure PowerShell CmdLets
Windows Azure PowerShell CmdLetsWindows Azure PowerShell CmdLets
Windows Azure PowerShell CmdLets
 
Windows Azure Active Directory
Windows Azure Active DirectoryWindows Azure Active Directory
Windows Azure Active Directory
 
Windows Azure Versioning Strategies
Windows Azure Versioning StrategiesWindows Azure Versioning Strategies
Windows Azure Versioning Strategies
 
Windows Azure Zero Downtime Upgrade
Windows Azure Zero Downtime UpgradeWindows Azure Zero Downtime Upgrade
Windows Azure Zero Downtime Upgrade
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service Bus
 
Windows azure start
Windows azure startWindows azure start
Windows azure start
 
SQL Azure Federations
SQL Azure FederationsSQL Azure Federations
SQL Azure Federations
 
Windows Azure PowerShell Cmdlets
Windows Azure PowerShell CmdletsWindows Azure PowerShell Cmdlets
Windows Azure PowerShell Cmdlets
 
Starting with windows azure
Starting with windows azureStarting with windows azure
Starting with windows azure
 
Windows Azure Service Bus
Windows Azure Service BusWindows Azure Service Bus
Windows Azure Service Bus
 
Windows Azure Storage services
Windows Azure Storage servicesWindows Azure Storage services
Windows Azure Storage services
 

Recently uploaded

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
FODUU
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
Claudio Di Ciccio
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Things to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUUThings to Consider When Choosing a Website Developer for your Website | FODUU
Things to Consider When Choosing a Website Developer for your Website | FODUU
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
CAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on BlockchainCAKE: Sharing Slices of Confidential Data on Blockchain
CAKE: Sharing Slices of Confidential Data on Blockchain
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

Windows Azure Drive

  • 1. Работа с Windows Azure Drive 25/07/2012 Ревенков Павел EPAM Cloud Computing Competence Center pavlo_revenkov@epam.com
  • 2. Data Management Services • SQL Azure – реляционная база данных; • Tables – не реляционные таблицы; • Queue - очереди; • Blob - двоичные данные; • Drive - подключаемые облачные NTFS-тома (VHD). 2
  • 3. Пример: CMS-система Publishers Author Instance 1 Instance 2 Instance 3 Instance 4 Mount 30 minutes Snapshot Repository 3
  • 4. Windows Azure Drive Azure Subscription Storage Account (100 ТВ) Container Block Blob (200 GB) Storage Account (100 ТВ) Container Page Blob (1 ТВ) Storage Account Container … (100 ТВ) Azure Drive (1 ТВ) Storage Account (100 ТВ) … Storage Account (100 ТВ) 4
  • 5. Загрузка данных в Blob Storage var storageAccount = CloudStorageAccount.Parse( ConfigurationManager .ConnectionStrings[ConnectionStringSetting] .ConnectionString); var blobClient = storageAccount.CreateCloudBlobClient(); var container = blobClient.GetContainerReference(containerName); var pageBlob = container.GetPageBlobReference(blobName); using (var fileStream = new FileStream(filePath, FileMode.Open)) { pageBlob.Create(fileStream.Length); var buffer = new byte[partSize]; while (offset < fileStream.Length) { var bytesRead = fileStream.Read(buffer, 0, partSize); pageBlob.WritePages(new MemoryStream(buffer, 0, bytesRead), offset); offset += bytesRead; } } 5
  • 6. 1. public static void UploadVHDFile(string filePath, string containerName, string blobName) 2. { 3. const int partSize = 1024 * 1024; 4. 5. var storageAccount = CloudStorageAccount.Parse( 6. ConfigurationManager.ConnectionStrings[ConnectionStringSetting].ConnectionString); 7. 8. var blobClient = storageAccount.CreateCloudBlobClient(); 9. var container = blobClient.GetContainerReference(containerName); 10. container.CreateIfNotExist(); 11. 12. var pageBlob = container.GetPageBlobReference(blobName); 13. pageBlob.DeleteIfExists(); 14. pageBlob.Properties.ContentType = "binary/octet-stream"; 15. 16. using (var fileStream = new FileStream(filePath, FileMode.Open)) 17. { 18. int offset = 0; 19. 20. pageBlob.Create(fileStream.Length); 21. 22. var buffer = new byte[partSize]; 23. while (offset < fileStream.Length) 24. { 25. var bytesRead = fileStream.Read(buffer, 0, partSize); 26. 27. pageBlob.WritePages(new MemoryStream(buffer, 0, bytesRead), offset); 28. 29. offset += bytesRead; 30. 31. Console.Write('.'); 32. } 33. } 34. } 6
  • 7. Режимы работы Azure Drive CloudDrive Snapshot client URL Exception Mount Mount Да Author Lease режим Snapshot режим Publisher чтение чтение запись Windows Azure Drive 7
  • 8. Работа с Windows Azure Drive var account = CloudStorageAccount.Parse( RoleEnvironment.GetConfigurationSettingValue("ConnectionString")); var drive = account.CreateCloudDrive("drives/vhd"); try { drive.Mount(0, DriveMountOptions.None); ... } catch (CloudDriveException e) { drive = account.CreateCloudDrive(drive.Snapshot().AbsoluteUri); drive.Mount(0, DriveMountOptions.None); } finally { drive.Unmount(); } 8
  • 9. 1. public ActionResult Index() 2. { 3. var account = CloudStorageAccount.Parse( 4. RoleEnvironment.GetConfigurationSettingValue("ConnectionString")); 5. 6. var drive = account.CreateCloudDrive("drives/vhd"); 7. var letter = string.Empty; 8. 9. FileInfo[] files; 10. try 11. { 12. letter = drive.Mount(0, DriveMountOptions.None); 13. } 14. catch (CloudDriveException e) 15. { 16. drive = account.CreateCloudDrive(drive.Snapshot().AbsoluteUri); 17. letter = drive.Mount(0, DriveMountOptions.None); 18. } 19. finally 20. { 21. files = new DirectoryInfo(drive.LocalPath).GetFiles(); 22. drive.Unmount(); 23. } 24. ViewBag.Message = String.Format("Azure Drive mounted on: {0}", letter); 25. 26. return View(files); 27. } 9
  • 11. Ссылки и материалы Differences Between the Storage Emulator and Windows Azure Storage Services: http://msdn.microsoft.com/en-us/gg433135 Windows Azure Drive whitepaper: http://go.microsoft.com/?linkid=9710117 11