About Me

My photo
Rohit is an investor, startup advisor and an Application Modernization Scale Specialist working at Google.

Wednesday, February 3, 2016

13 Factor apps for .NET - Cloud Foundry on Azure


Why bother with Cloud Foundry on Azure
Quick Answer: To optimize for the cloud programming model and build apps that can scale agnostically across cloud platforms. Microsoft haas published 13 recommended patterns from MS for cloud development in BuildingCloudAppsMsAzure. Cloud Foundry through it platform contracts, partner tiles and programming model constraints enables the best way to develop, design and code cloud apps on Azure.

• Automate everything
   • Use scripts to maximize efficiency and minimize errors in repetitive processes. aka Use Cloud Foundry

• Source control
   • Set up branching structures in source control to facilitate a DevOps workflow.
   • Example: add scripts to source control.
   • Example: keep sensitive data out of source control.
   • Example: use Git in Visual Studio.

• Continuous integration and delivery
   • Automate build and deployment with each source control check-in.

• Web development best practices
   • Keep web tier stateless
   • Example: scaling and autoscaling in Cloud Foundry.
   • Avoid session state.
   • Use a Content Delivery Network (CDN).
   • Use an asynchronous programming model.
   • Example: async in ASP.NET MVC and Entity Framework.

• Single sign-on
   • Introduction to Azure Active Directory.
   • Example: create an ASP.NET app that uses Azure Active Directory.

• Data storage options
   • Types of data stores.
   • How to choose the right data store.
   • Example: Azure SQL Database.

• Data partitioning strategies
   • Partition data vertically, horizontally, or both to facilitate scaling a relational database.

• Unstructured blob storage
   • Store files in the cloud by using the Blob service.
   • Example: using blob storage

• Design to survive failures
   • Types of failures.
   • Failure scope.
   • Understanding SLAs.

• Monitoring and telemetry
   • Why you should both buy a telemetry app and write your own code to instrument your app.
   • Example: New Relic for Azure
   • Example: logging code in the Fix It app.
   • Example: built-in logging support in Cloud Foundry.
   • Example: built-in Telemetry for websites and systems in Cloud Foundry

• Transient fault handling
   • Use smart retry/back-off logic to mitigate the effect of transient failures.
   • Example retry/back-off in Entity Framework 6.

• Distributed caching
   • Improve scalability and reduce database transaction costs by using distributed caching.
   • Example: Using Gemfire in ASP.NET app

• Queue-centric work pattern
   • Enable high availability and improve scalability by loosely coupling web and worker tiers.
   • Example: Using RabbitMQ 

Write sample Java apps using the User Authentication Authorization (UAA) API on Cloud Foundry


Do you want to use UAA as an OAuth2 authorization server (eg SSO, token creation / verification)? 

Take a look at github.com/pivo...ity-sample-apps for basic examples of integrating with Pivotal SSO which is UAA with subdomain multi-tenancy, and comes free with PCF 1.5, or look at github.com/will...ervice-security and spring.io/blog/...-cloud-security for a more involved example of using straight UAA to secure microservices.

For PCF customers and interested in using Pivotal SSO and Spring Cloud Services to manage a secure microservice architecture, github.com/will...ran/freddys-bbq is the the microservice-security example and goes the extra mile and integrates with all those products.

Do you want use UAA APIs to dynamically create OAuth2 clients and manage user roles?

There aren't many examples in the OSS world for that, but we do some of that in both Pivotal SSO and Spring Cloud Services. There are API docs however: github.com/clou...cs/UAA-APIs.rst

THANK YOU Will Tran