SlideShare ist ein Scribd-Unternehmen logo
1 von 32
How to get the most with Windows and Windows Azure Kanwaljeet Singla & Sumit Chawla Microsoft Corporation
Agenda PHP on Windows How to make PHP fly on IIS SQL Server Driver for PHP Web Platform Installer Community PHP on Windows Azure What is the Microsoft Cloud? Deploying a PHP application to the cloud Windows Azure SDKs and Tools for PHP Questions / Open Discussion
FastCGI Fast and Reliable. v1.0 released in Oct 2007 v1.5 released in Nov 2009 Consistent set of features across all IIS versions: FastCGI in IIS 7.5 – new features included in OS FastCGI in IIS 7.0 – install the FastCGI update (http://www.iis.net/expand/FastCGI) FastCGI in IIS 5.1/IIS 6.0 – install FastCGI 1.5 extension Recommended way of running PHP on Windows
FastCGI (cont.) New features: Auto-tuning of maxInstances Automatic recycling of PHP processes when php.ini changes Useful tips Use latest version of FastCGI and turn on dynamic maxInstances and monitorChangesTo features Increase InstanceMaxRequests value and match the value to PHP_FCGI_MAX_REQUESTS environment variable
PHP 5.3 PHP 5.3 improvements: Using VC9 compiler (PHP 5.2 used VC6) Optimized API calls (using Win32 instead of POSIX) All PHP libraries built from the source code Compatibility fixes Windows builds are available at: http://windows.php.net/ From: http://ilia.ws/files/Confoo2010_PHP53.pdf  “Substantial performance improvements on Windows (40% +)”
WinCache 1.0   PHP Accelerator optimized for Windows Opcode cache File cache Resolve path cache Download from: http://www.iis.net/expand/WinCacheForPhp Contributed by MS to PECL: Source code on http://pecl.php.net/wincache/ Documentation on http://www.php.net/wincache/ BSD license Contributions are welcome!
Why use opcode cache? To serve index.php in WordPress, PHP has to read, parse, compileand execute more than 100 php files!
WinCache 1.0 Useful Tips: Increase maxInstances or use dynamic maxInstances Adjust file cache and opcode cache sizes. Use wincache.php to study cache usage Keep wincache.chkinterval value high on production servers and low on development machines Restrict access to wincache.php by using built-inauthentication or web server authentication
WinCache 1.1 Beta2 released in April 2010 Object cache – Compatible with APC APIs WinCache session handler File change notification support Function hooks Useful Tips: Turn on user cache if application supports it Port from existing code which uses APC’s object cache Keep file change notification turned on Turn on session handler if not running a web farm
SQL Server Driver for PHP Thin layer over SNAC (ODBC) Single functional layer with thin API layer on top SQL Server Driver for PHP 1.1 SQL Server Driver for PHP 2.0 php_sqlsrv.dll php_pdo_sqlsrv.dll php_sqlsrv.dll PDO API SQLSRV Native API SQLSRV Native API Core Functional Layer SQL Server Native Client (ODBC)
SQL Server Driver for PHP Tips Scrollable Cursor: scrollable but slower Use sqlsrv_has_rows() w/ CURSOR_FORWARD if you only need to check if there’s data in the resultset, it’s faster and doesn’t move the cursor If scrollable required, consider CURSOR_STATIC first WarningsReturnAsErrors: ON by default Remember to turn it OFF in deployment Should we change default to OFF? UTF-8 encoding The default for PDO, available per col/param Should we make this the default for sqlsrv_xxx? Use transactions for DDL to improve performance
SQL Server Query Tips Range query: SELECT * FROM table ORDER BY date LIMIT 20,10 Use TOP & ROW_NUMBER SELECT sub2.*,ROW_NUMBER() OVER(ORDER BY sub2._l2) AS _lFROM (  SELECT 1 AS _l2, sub1.* FROM (    SELECT TOP(30) * FROM table ORDER BY date  ) AS sub1) as sub2WHERE _l BETWEEN 20 AND 30; SELECT * FROM ( 	SELECT *, ROW_NUMBER() OVER(ORDER BY date) AS _l FROM table ) AS t WHERE _l BETWEEN 20 AND 30 ORDER BY _l;
Web Platform Installer Easy way to install IIS components, PHP 5.2, PHP and Asp.Net web applications etc. Demo PHP 5.3 will be offered through WebPI soon
Community participation WinCache is on PECL and SQL driver for PHP is on codeplex IIS and WinCache documentation on php.net Participating on PHP newsgroups Working with PHP developers to improve PHP and PHP installer Working with PHP application developers to integrate URLRewrite, WinCache
Miscellaneous tips Set IP address of MySql machine in hosts file Build PHP yourself and statically link WinCache Compile and optimize using PGO for maximum performance URLRewrite Includes htaccess importer Use IIS warm-up module to fill opcode cache before first request arrives
What is Windows Azure? It’s an Operating System  In the Cloud. Simple Answer? Windows Azure: operating system as an online serviceMicrosoft SQL Azure: fully relational cloud database solutionWindows Azure platform AppFabric: connects cloud services and on-premises applicationsMicrosoft Codename “Dallas”: information marketplace for data and web services
Microsoft Data Centers Vision Go Inside Energy Efficient Containers North American Data Centers European Data Centers Asian Data Centers Dublin Chicago Washington Amsterdam San Antonio Hong Kong Singapore
The Windows Azure Model http://www.microsoft.com/windowsazure/windowsazure
Windows Azure RolesThis is how your code runs in the cloud Worker Role Web Role Public Internet Public Internet [1..n] Web Role Worker Role [1..m] Load  Balancer Load balanced Web Farm IIS7  web server Serves HTTP/HTTPS requests No inbound connections by default Typically  used to process background tasks by reading requests from storage queue Storage Services Storage Service
SQL AzureRelational Database in the cloud Based on SQL Server technologies Scale databases up or down based on business needs  No need to install or patch software or other physical administration  Automatic high availability and fault tolerance  Simple provisioning and deployment of multiple databases  http://www.microsoft.com/windowsazure/sqlazure
What about hosting my PHP + MySQL on Windows Azure? ,[object Object]
If you do, you are using Windows Azure only as an infrastructure service
This means you are responsible for managing the infrastructureSolutions MySQL PHP Web App Hosted Web Core Worker Role [1 VM Instance] http://code.msdn.microsoft.com/hwcworker MySQL Solution Accelerator [>=2 VM Instances] http://code.msdn.microsoft.com/winazuremysqlphp http://microsoftpdc.com/Sessions/SVC51 http://live.visitmix.com/MIX10/Sessions/SVC12
Deploying PHP Apps to Windows Azure PHP Application PHP Core Windows Azure Deployment Package (cspkg + configuration) PHP Extensions Windows Azure Command-line Tool for PHP http://azurephptools.codeplex.com/ Download at
Windows Azure Command-line Tool for PHP Create new applications or convert existing PHP applications to Windows Azure applications Deploy to Local Development Fabric or the Windows Azure Cloud No IDE required http://azurephptools.codeplex.com/ Download at
Demo Deploy WordPress to Windows Azure http://wordpress.visitmix.com
Windows Azure Command-line Tool for PHP What’s new Worker Role Support Ability to attach an external drive to your Windows Azure Instance [aka X-Drive] http://azurephptools.codeplex.com/ Download at
Browser Web Role 1 2 3 LB Queue 7 4 6 5 Worker Role Blob Store Running background tasks with PHP on Windows Azurehttp://phpworkerdemo.cloudapp.net/
Other Windows Azure SDKs and ToolsWindows Azure SDK for PHP Overview Enables PHP developers to take advantage of the Microsoft Cloud Services Platform  – Windows Azure.   Features PHP classes for Windows Azure Blobs, Tables & Queues (for CRUD operations) Helper Classes for HTTP transport, AuhN/AuthZ, REST & Error Management Manageability, Instrumentation & Logging support Also Distributed via Zend Framework  Project Site http://www.codeplex.com/PHPAzure Logical architecture  Your PHP application XML REST Compute Storage Manage Deployment scenarios PHP Runtime Any internet connected Server PHP Runtime REST REST
Other Windows Azure SDKS and Tools Windows Azure Eclipse Tools + Fast CGI +  Eclipse IDE + PHP SDK for Windows Azure  1 2 4 3
Summary Recap PHP on Windows has come a long way in the last few years We are committed to improving the PHP experience on Windows Windows Azure Platform offers scalable operating system as service and relational database services in the cloud Windows Azure is more than a hosting infrastructure There are several SDKs and Tools available for developing and deploying PHP Apps to the Microsoft Cloud Call to Action What scenarios are important to you? What would make Windows Azure more interesting for you?
Additional Resources PHP on Windows http://windows.php.net/ http://php.iis.net/ http://www.microsoft.com/web/php/ http://forums.iis.net/ http://www.ksingla.net php.windows mailing list PHP Interoperability http://www.interoperabilitybridges.com http://www.azure.com/interoperability http://blogs.msdn.com/interoperability

Weitere ähnliche Inhalte

Kürzlich hochgeladen

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 

Kürzlich hochgeladen (20)

The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 

Empfohlen

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

How to get the most with Windows and Windows Azure

  • 1. How to get the most with Windows and Windows Azure Kanwaljeet Singla & Sumit Chawla Microsoft Corporation
  • 2. Agenda PHP on Windows How to make PHP fly on IIS SQL Server Driver for PHP Web Platform Installer Community PHP on Windows Azure What is the Microsoft Cloud? Deploying a PHP application to the cloud Windows Azure SDKs and Tools for PHP Questions / Open Discussion
  • 3. FastCGI Fast and Reliable. v1.0 released in Oct 2007 v1.5 released in Nov 2009 Consistent set of features across all IIS versions: FastCGI in IIS 7.5 – new features included in OS FastCGI in IIS 7.0 – install the FastCGI update (http://www.iis.net/expand/FastCGI) FastCGI in IIS 5.1/IIS 6.0 – install FastCGI 1.5 extension Recommended way of running PHP on Windows
  • 4. FastCGI (cont.) New features: Auto-tuning of maxInstances Automatic recycling of PHP processes when php.ini changes Useful tips Use latest version of FastCGI and turn on dynamic maxInstances and monitorChangesTo features Increase InstanceMaxRequests value and match the value to PHP_FCGI_MAX_REQUESTS environment variable
  • 5. PHP 5.3 PHP 5.3 improvements: Using VC9 compiler (PHP 5.2 used VC6) Optimized API calls (using Win32 instead of POSIX) All PHP libraries built from the source code Compatibility fixes Windows builds are available at: http://windows.php.net/ From: http://ilia.ws/files/Confoo2010_PHP53.pdf “Substantial performance improvements on Windows (40% +)”
  • 6. WinCache 1.0 PHP Accelerator optimized for Windows Opcode cache File cache Resolve path cache Download from: http://www.iis.net/expand/WinCacheForPhp Contributed by MS to PECL: Source code on http://pecl.php.net/wincache/ Documentation on http://www.php.net/wincache/ BSD license Contributions are welcome!
  • 7. Why use opcode cache? To serve index.php in WordPress, PHP has to read, parse, compileand execute more than 100 php files!
  • 8. WinCache 1.0 Useful Tips: Increase maxInstances or use dynamic maxInstances Adjust file cache and opcode cache sizes. Use wincache.php to study cache usage Keep wincache.chkinterval value high on production servers and low on development machines Restrict access to wincache.php by using built-inauthentication or web server authentication
  • 9. WinCache 1.1 Beta2 released in April 2010 Object cache – Compatible with APC APIs WinCache session handler File change notification support Function hooks Useful Tips: Turn on user cache if application supports it Port from existing code which uses APC’s object cache Keep file change notification turned on Turn on session handler if not running a web farm
  • 10. SQL Server Driver for PHP Thin layer over SNAC (ODBC) Single functional layer with thin API layer on top SQL Server Driver for PHP 1.1 SQL Server Driver for PHP 2.0 php_sqlsrv.dll php_pdo_sqlsrv.dll php_sqlsrv.dll PDO API SQLSRV Native API SQLSRV Native API Core Functional Layer SQL Server Native Client (ODBC)
  • 11. SQL Server Driver for PHP Tips Scrollable Cursor: scrollable but slower Use sqlsrv_has_rows() w/ CURSOR_FORWARD if you only need to check if there’s data in the resultset, it’s faster and doesn’t move the cursor If scrollable required, consider CURSOR_STATIC first WarningsReturnAsErrors: ON by default Remember to turn it OFF in deployment Should we change default to OFF? UTF-8 encoding The default for PDO, available per col/param Should we make this the default for sqlsrv_xxx? Use transactions for DDL to improve performance
  • 12. SQL Server Query Tips Range query: SELECT * FROM table ORDER BY date LIMIT 20,10 Use TOP & ROW_NUMBER SELECT sub2.*,ROW_NUMBER() OVER(ORDER BY sub2._l2) AS _lFROM ( SELECT 1 AS _l2, sub1.* FROM ( SELECT TOP(30) * FROM table ORDER BY date ) AS sub1) as sub2WHERE _l BETWEEN 20 AND 30; SELECT * FROM ( SELECT *, ROW_NUMBER() OVER(ORDER BY date) AS _l FROM table ) AS t WHERE _l BETWEEN 20 AND 30 ORDER BY _l;
  • 13. Web Platform Installer Easy way to install IIS components, PHP 5.2, PHP and Asp.Net web applications etc. Demo PHP 5.3 will be offered through WebPI soon
  • 14. Community participation WinCache is on PECL and SQL driver for PHP is on codeplex IIS and WinCache documentation on php.net Participating on PHP newsgroups Working with PHP developers to improve PHP and PHP installer Working with PHP application developers to integrate URLRewrite, WinCache
  • 15. Miscellaneous tips Set IP address of MySql machine in hosts file Build PHP yourself and statically link WinCache Compile and optimize using PGO for maximum performance URLRewrite Includes htaccess importer Use IIS warm-up module to fill opcode cache before first request arrives
  • 16. What is Windows Azure? It’s an Operating System In the Cloud. Simple Answer? Windows Azure: operating system as an online serviceMicrosoft SQL Azure: fully relational cloud database solutionWindows Azure platform AppFabric: connects cloud services and on-premises applicationsMicrosoft Codename “Dallas”: information marketplace for data and web services
  • 17. Microsoft Data Centers Vision Go Inside Energy Efficient Containers North American Data Centers European Data Centers Asian Data Centers Dublin Chicago Washington Amsterdam San Antonio Hong Kong Singapore
  • 18. The Windows Azure Model http://www.microsoft.com/windowsazure/windowsazure
  • 19. Windows Azure RolesThis is how your code runs in the cloud Worker Role Web Role Public Internet Public Internet [1..n] Web Role Worker Role [1..m] Load Balancer Load balanced Web Farm IIS7 web server Serves HTTP/HTTPS requests No inbound connections by default Typically used to process background tasks by reading requests from storage queue Storage Services Storage Service
  • 20. SQL AzureRelational Database in the cloud Based on SQL Server technologies Scale databases up or down based on business needs No need to install or patch software or other physical administration Automatic high availability and fault tolerance Simple provisioning and deployment of multiple databases http://www.microsoft.com/windowsazure/sqlazure
  • 21.
  • 22. If you do, you are using Windows Azure only as an infrastructure service
  • 23. This means you are responsible for managing the infrastructureSolutions MySQL PHP Web App Hosted Web Core Worker Role [1 VM Instance] http://code.msdn.microsoft.com/hwcworker MySQL Solution Accelerator [>=2 VM Instances] http://code.msdn.microsoft.com/winazuremysqlphp http://microsoftpdc.com/Sessions/SVC51 http://live.visitmix.com/MIX10/Sessions/SVC12
  • 24. Deploying PHP Apps to Windows Azure PHP Application PHP Core Windows Azure Deployment Package (cspkg + configuration) PHP Extensions Windows Azure Command-line Tool for PHP http://azurephptools.codeplex.com/ Download at
  • 25. Windows Azure Command-line Tool for PHP Create new applications or convert existing PHP applications to Windows Azure applications Deploy to Local Development Fabric or the Windows Azure Cloud No IDE required http://azurephptools.codeplex.com/ Download at
  • 26. Demo Deploy WordPress to Windows Azure http://wordpress.visitmix.com
  • 27. Windows Azure Command-line Tool for PHP What’s new Worker Role Support Ability to attach an external drive to your Windows Azure Instance [aka X-Drive] http://azurephptools.codeplex.com/ Download at
  • 28. Browser Web Role 1 2 3 LB Queue 7 4 6 5 Worker Role Blob Store Running background tasks with PHP on Windows Azurehttp://phpworkerdemo.cloudapp.net/
  • 29. Other Windows Azure SDKs and ToolsWindows Azure SDK for PHP Overview Enables PHP developers to take advantage of the Microsoft Cloud Services Platform  – Windows Azure.   Features PHP classes for Windows Azure Blobs, Tables & Queues (for CRUD operations) Helper Classes for HTTP transport, AuhN/AuthZ, REST & Error Management Manageability, Instrumentation & Logging support Also Distributed via Zend Framework Project Site http://www.codeplex.com/PHPAzure Logical architecture Your PHP application XML REST Compute Storage Manage Deployment scenarios PHP Runtime Any internet connected Server PHP Runtime REST REST
  • 30. Other Windows Azure SDKS and Tools Windows Azure Eclipse Tools + Fast CGI + Eclipse IDE + PHP SDK for Windows Azure 1 2 4 3
  • 31. Summary Recap PHP on Windows has come a long way in the last few years We are committed to improving the PHP experience on Windows Windows Azure Platform offers scalable operating system as service and relational database services in the cloud Windows Azure is more than a hosting infrastructure There are several SDKs and Tools available for developing and deploying PHP Apps to the Microsoft Cloud Call to Action What scenarios are important to you? What would make Windows Azure more interesting for you?
  • 32. Additional Resources PHP on Windows http://windows.php.net/ http://php.iis.net/ http://www.microsoft.com/web/php/ http://forums.iis.net/ http://www.ksingla.net php.windows mailing list PHP Interoperability http://www.interoperabilitybridges.com http://www.azure.com/interoperability http://blogs.msdn.com/interoperability
  • 33. Contact Information PHP on Windows PHP Interoperability Kanwaljeet Singla (IIS and WinCache Developer) ksingla@microsoft.com http://twitter.com/kjsingla http://blogs.iis.net/ksingla/ Ruslan Yakushev (IIS Program Manager) ruslany@microsoft.com http://twitter.com/ruslany http://ruslany.net/ Venkat Raman Don (IIS and WinCache Tester) donraman@microsoft.com http://blogs.iis.net/donraman Pierre Joye (PHP Core Developer) pajoye@php.net http://twitter.com/PierreJoye Mark Brown (IIS Product Manager) http://twitter.com/markjbrown http://blogs.msdn.com/markbrown/ Sumit Chawla sumit.chawla@microsoft.com Jean-Christophe jccim@microsoft.com Vijay Rajagopalan vijayr@microsoft.com Karri Dunn Karri.dunn@microsoft.com Jas Sandhu Jassand@microsoft.co Interoperability Team Blog http://blogss.msdn.com/interoperability