SlideShare a Scribd company logo
1 of 74
@stratospher_es http://stratospher.es
Memcached
Microsoft.ApplicationServer.Caching.DataCache
     cache = new
Microsoft.ApplicationServer.Caching.DataCache
     ("default");


ObjectType myCachedObject =
     (ObjectType)cache.Get("cacheKey");


cache.Add("cacheKey", myObjectRequiringCaching);
<caching>
      <outputCache defaultProvider="DistributedCache">
            <providers>
                   <add name="DistributedCache"
type="Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider,
                   Microsoft.Web.DistributedCache"
      cacheName="default"
      dataCacheClientName="default" />
            </providers>
      </outputCache>
</caching>


<%@ OutputCache Duration="60" VaryByParam="*" %>
Memcached Shim                Memcached Shim




                 Memcached Client              Memcached Server


Nuget: Microsoft.WindowsAzure.Caching.MemcacheShim
// the endpoint that is projected back through the service bus (note: NetTcpRelayBinding)
// This DNS name will be "sb://[serviceNamespace].servicebus.windows.net/solver"
host.AddServiceEndpoint(
       typeof(IProblemSolver),
       new NetTcpRelayBinding(),
       ServiceBusEnvironment.CreateServiceUri("sb", ‚metrobus", "solver"))
.Behaviors.Add(new TransportClientEndpointBehavior
{
TokenProvider =
TokenProvider.CreateSharedSecretTokenProvider("owner", Microsoft.WindowsAzure.CloudConfigurat
Manager.GetSetting("ServiceBusSecret"))
});
.Behaviors.Add(
     new TransportClientEndpointBehavior
     {
     TokenProvider =
TokenProvider.CreateSharedSecretTokenProvider(
"owner",
Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting("Ser
viceBusSecret")
)
     });
.Behaviors.Add(
     new TransportClientEndpointBehavior
     {
     TokenProvider =
     TokenProvider.CreateSharedSecretTokenProvider(
     "owner",
     Microsoft.WindowsAzure.CloudConfigurationManager
           .GetSetting("ServiceBusSecret"))
     });
http://aka.ms/q-vs-q
http://aka.ms/q-vs-q
http://aka.ms/q-vs-q
Comparison Criteria   Windows Azure Queues   Service Bus Queues
                                             Yes - First-In-First-Out (FIFO)
Ordering guarantee    No                     (through the use of messaging
                                             sessions)
                                             At-Least-Once
Delivery guarantee    At-Least-Once
                                             At-Most-Once
                                             Yes
Transaction support   No                     (through the use of local
                                             transactions)
                      30 seconds (default)   60 seconds (default)
Lease/Lock duration
                      7 days (maximum)       5 minutes (maximum)
                                             Yes
Batched send          No                     (through the use of transactions
                                             or client-side batching)



                                                          http://aka.ms/q-vs-q
namespaceManager =
     Microsoft.ServiceBus.NamespaceManager
     .CreateFromConnectionString(‚…‛);



if (!namespaceManager.QueueExists(queueName))
   namespaceManager.CreateQueue(queueName);
Endpoint=
    sb://<namespace>.servicebus.windows.net/;
    SharedSecretIssuer=<issuer>;
    SharedSecretValue=<sharedSecret>
if (messagingFactory == null)
     messagingFactory =
     MessagingFactory.CreateFromConnectionString(‚…‛);
if (messageSender == null)
     messageSender =
     messagingFactory.CreateMessageSender(queueName);
BrokeredMessage message = new BrokeredMessage();
message.Label = ‚Hello from your new message.‛
message.Properties.Add(
  new KeyValuePair<string,object>(‚FirstName", ‚Adam"));
message.Properties.Add(
  new KeyValuePair<string,object>(‚LastName", ‚Hoffman"));

messageSender.Send(message);
if (messagingFactory == null)
     messagingFactory =
     MessagingFactory.CreateFromConnectionString(‚…‛);
if (messageReceiver == null)
     messageReceiver =
messagingFactory.CreateMessageReceiver(queueName);
BrokeredMessage message = new BrokeredMessage();
// wait only 5 seconds...
message = messageReceiver.Receive(new TimeSpan(0, 0, 5));
if (message != null){
     try{
           …
           // Remove message from queue
           message.Complete();
     }
     catch (Exception){
           // Indicate a problem, unlock message in queue
           message.Abandon();
     }
}
namespaceManager =
Microsoft.ServiceBus.NamespaceManager
    .CreateFromConnectionString(‚…‛);


if (!namespaceManager.TopicExists(topicName))
   namespaceManager.CreateTopic(topicName);
TopicClient topicClient =
TopicClient.CreateFromConnectionString(‚…‛, topic);

BrokeredMessage message = new BrokeredMessage();
message.Label = ‚Hello from your new message.‛
message.Properties.Add(
     new KeyValuePair<string,object>(‚FirstName", ‚Adam"));
message.Properties.Add(
     new KeyValuePair<string,object>(‚LastName", ‚Hoffman"));

topicClient.Send(message);
if (!NamespaceManager
     .SubscriptionExists(topicName, "AllMessages"))
     {
     NamespaceManager.CreateSubscription(
          topicName, "AllMessages");

    ListenForMessages(topicName);
    }
MessagingFactory mf =
     MessagingFactory.CreateFromConnectionString(‚…‛);
MessageReceiver mr = mf.CreateMessageReceiver(
     topicName + "/subscriptions/" + "AllMessages");

BrokeredMessage message = mr.Receive();
…
// Remove message from subscription
message.Complete();
Or…
// Indicate a problem, unlock message in subscription
message.Abandon();
SqlFilter highMessagesFilter = new SqlFilter("MessageNumber > 3");
NamespaceManager.CreateSubscription("TestTopic", "HighMessages",
highMessagesFilter);
SqlFilter highMessagesFilter = new SqlFilter(‚FirstName = ‘Adam’");
NamespaceManager.CreateSubscription("TestTopic", ‚GuysNamedAdam",
adamMessageFilter);



MessageReceiver mr = mf.CreateMessageReceiver(
     topicName + "/subscriptions/" + ‚GuysNamedAdam");
Customer
           support                                                Data
                                    Management                 protection
                                        UI

                       Forget
                     password?
                                                  User store
                                                                    User mapping
      More                                                                                LDAP
  User mapping
                                 Authentication
                                 Authorization
                                                                            Integration          Synchronization
                  Facebook
                                                                              with AD
                  Auth API

    More
                                  Integration
Synchronization                      With
                                   Facebook
IdP



WIF   ACS


            IdP
public class RoleSetter : ClaimsAuthenticationManager
{
       public override ClaimsPrincipal Authenticate(string resourceName,
       ClaimsPrincipal incomingPrincipal)
       {
               if (incomingPrincipal != null &&
                      incomingPrincipal.Identity.IsAuthenticated == true)
               {
                      //DECIDE ON SOME CRITERIA IF CURRENT USER DESERVES THE ROLE
                      ClaimsIdentity identity =
                              (ClaimsIdentity)incomingPrincipal.Identity;
                      IEnumerable<Claim> claims = identity.Claims;

                     if (DoYourCheckHere())
                            ((ClaimsIdentity)incomingPrincipal.Identity).AddClaim(
                            new Claim(ClaimTypes.Role, "Admin"));
              }
              return incomingPrincipal;
       }
<system.identityModel>
    <identityConfiguration>
      <claimsAuthenticationManager
        type="ClaimsTransformer.RoleSetter,
    ClaimsTransformer"/>
…
if (User.IsInRole("Admin"))
     Response.Write("The code is 42...<br/>");
else
     Response.Write(‚No soup for you.");
http://aka.ms/Azure90DayTrial   http://aka.ms/MSDNAzure
Final   microsoft cloud summit - windows azure building block services
Final   microsoft cloud summit - windows azure building block services
Final   microsoft cloud summit - windows azure building block services
Final   microsoft cloud summit - windows azure building block services

More Related Content

What's hot

TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
Денис Резник
 
01 session tracking
01   session tracking01   session tracking
01 session tracking
dhrubo kayal
 
Aspnet auth advanced_cs
Aspnet auth advanced_csAspnet auth advanced_cs
Aspnet auth advanced_cs
shagilani
 

What's hot (20)

TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
 
User Authentication and Cloud Authorization in the Galaxy project: https://do...
User Authentication and Cloud Authorization in the Galaxy project: https://do...User Authentication and Cloud Authorization in the Galaxy project: https://do...
User Authentication and Cloud Authorization in the Galaxy project: https://do...
 
Security in Node.JS and Express:
Security in Node.JS and Express:Security in Node.JS and Express:
Security in Node.JS and Express:
 
JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5JavaEE 8 on a diet with Payara Micro 5
JavaEE 8 on a diet with Payara Micro 5
 
Managing a shared mysql farm dpc11
Managing a shared mysql farm dpc11Managing a shared mysql farm dpc11
Managing a shared mysql farm dpc11
 
01 session tracking
01   session tracking01   session tracking
01 session tracking
 
Java EE 8 security and JSON binding API
Java EE 8 security and JSON binding APIJava EE 8 security and JSON binding API
Java EE 8 security and JSON binding API
 
Capture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninjaCapture, record, clip, embed and play, search: video from newbie to ninja
Capture, record, clip, embed and play, search: video from newbie to ninja
 
Spring4 security
Spring4 securitySpring4 security
Spring4 security
 
Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe FriedrichsenOAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
OAuth 2.0 – A standard is coming of age by Uwe Friedrichsen
 
Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]Rapid Development Tools for Java EE 8 [TUT2998]
Rapid Development Tools for Java EE 8 [TUT2998]
 
"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin"Auth for React.js APP", Nikita Galkin
"Auth for React.js APP", Nikita Galkin
 
State of the art authentication mit Java EE 8
State of the art authentication mit Java EE 8State of the art authentication mit Java EE 8
State of the art authentication mit Java EE 8
 
Hibernate
HibernateHibernate
Hibernate
 
STATE OF THE ART AUTHENTICATION MIT JAVA EE 8
STATE OF THE ART AUTHENTICATION MIT JAVA EE 8STATE OF THE ART AUTHENTICATION MIT JAVA EE 8
STATE OF THE ART AUTHENTICATION MIT JAVA EE 8
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud Foundry
 
Functions
FunctionsFunctions
Functions
 
From 0 to Spring Security 4.0
From 0 to Spring Security 4.0From 0 to Spring Security 4.0
From 0 to Spring Security 4.0
 
Aspnet auth advanced_cs
Aspnet auth advanced_csAspnet auth advanced_cs
Aspnet auth advanced_cs
 

Viewers also liked

Introduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay ServiceIntroduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay Service
Tamir Dresher
 
Presentation11
Presentation11Presentation11
Presentation11
slosment
 
Chisato Mizuta(R2-13) Don't regret regret
Chisato Mizuta(R2-13) Don't regret regretChisato Mizuta(R2-13) Don't regret regret
Chisato Mizuta(R2-13) Don't regret regret
MChisato
 
Chisato mizuta(r2 13) don't regret regret
Chisato mizuta(r2 13) don't regret regretChisato mizuta(r2 13) don't regret regret
Chisato mizuta(r2 13) don't regret regret
MChisato
 

Viewers also liked (16)

Introduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay ServiceIntroduction to Windows Azure Service Bus Relay Service
Introduction to Windows Azure Service Bus Relay Service
 
Presentation11
Presentation11Presentation11
Presentation11
 
Chisato Mizuta(R2-13) Don't regret regret
Chisato Mizuta(R2-13) Don't regret regretChisato Mizuta(R2-13) Don't regret regret
Chisato Mizuta(R2-13) Don't regret regret
 
Best way to lose belly fat - secrets for a lean body
Best way to lose belly fat - secrets for a lean bodyBest way to lose belly fat - secrets for a lean body
Best way to lose belly fat - secrets for a lean body
 
MyrianSumbaportfolio
MyrianSumbaportfolioMyrianSumbaportfolio
MyrianSumbaportfolio
 
Presentation1
Presentation1Presentation1
Presentation1
 
Chisato mizuta(r2 13) don't regret regret
Chisato mizuta(r2 13) don't regret regretChisato mizuta(r2 13) don't regret regret
Chisato mizuta(r2 13) don't regret regret
 
Report on funding education
Report on funding educationReport on funding education
Report on funding education
 
Relief India Trust Profile
Relief India Trust ProfileRelief India Trust Profile
Relief India Trust Profile
 
Des Ondes aux Image
Des Ondes aux ImageDes Ondes aux Image
Des Ondes aux Image
 
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job? Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
Succession “Losers”: What Happens to Executives Passed Over for the CEO Job?
 
The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...
 
Open Source Creativity
Open Source CreativityOpen Source Creativity
Open Source Creativity
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
 

Similar to Final microsoft cloud summit - windows azure building block services

Unit test candidate solutions
Unit test candidate solutionsUnit test candidate solutions
Unit test candidate solutions
benewu
 
Windows Azure Kick Start - Explore Storage and SQL Azure
Windows Azure Kick Start - Explore Storage and SQL AzureWindows Azure Kick Start - Explore Storage and SQL Azure
Windows Azure Kick Start - Explore Storage and SQL Azure
Eric D. Boyd
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
Ted Pennings
 
Jug Guice Presentation
Jug Guice PresentationJug Guice Presentation
Jug Guice Presentation
Dmitry Buzdin
 

Similar to Final microsoft cloud summit - windows azure building block services (20)

Multi Client Development with Spring
Multi Client Development with SpringMulti Client Development with Spring
Multi Client Development with Spring
 
State management in ASP.NET
State management in ASP.NETState management in ASP.NET
State management in ASP.NET
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the Trenches
 
Rhino Mocks
Rhino MocksRhino Mocks
Rhino Mocks
 
Securing your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris KelloggSecuring your Pulsar Cluster with Vault_Chris Kellogg
Securing your Pulsar Cluster with Vault_Chris Kellogg
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 
Unit test candidate solutions
Unit test candidate solutionsUnit test candidate solutions
Unit test candidate solutions
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in Heaven
 
Windows 8 metro applications
Windows 8 metro applicationsWindows 8 metro applications
Windows 8 metro applications
 
Make legacy code great
Make legacy code greatMake legacy code great
Make legacy code great
 
Asp.net state management
Asp.net state managementAsp.net state management
Asp.net state management
 
Tutorial asp.net
Tutorial  asp.netTutorial  asp.net
Tutorial asp.net
 
Windows Azure Kick Start - Explore Storage and SQL Azure
Windows Azure Kick Start - Explore Storage and SQL AzureWindows Azure Kick Start - Explore Storage and SQL Azure
Windows Azure Kick Start - Explore Storage and SQL Azure
 
Backendless apps
Backendless appsBackendless apps
Backendless apps
 
Spring 3: What's New
Spring 3: What's NewSpring 3: What's New
Spring 3: What's New
 
Strata London 2018: Multi-everything with Apache Pulsar
Strata London 2018:  Multi-everything with Apache PulsarStrata London 2018:  Multi-everything with Apache Pulsar
Strata London 2018: Multi-everything with Apache Pulsar
 
Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
 
Jug Guice Presentation
Jug Guice PresentationJug Guice Presentation
Jug Guice Presentation
 
Behavioral pattern 4
Behavioral pattern 4Behavioral pattern 4
Behavioral pattern 4
 
Jasig Cas High Availability - Yale University
Jasig Cas High Availability -  Yale UniversityJasig Cas High Availability -  Yale University
Jasig Cas High Availability - Yale University
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Final microsoft cloud summit - windows azure building block services

  • 2.
  • 3.
  • 4.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10. Microsoft.ApplicationServer.Caching.DataCache cache = new Microsoft.ApplicationServer.Caching.DataCache ("default"); ObjectType myCachedObject = (ObjectType)cache.Get("cacheKey"); cache.Add("cacheKey", myObjectRequiringCaching);
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. <caching> <outputCache defaultProvider="DistributedCache"> <providers> <add name="DistributedCache" type="Microsoft.Web.DistributedCache.DistributedCacheOutputCacheProvider, Microsoft.Web.DistributedCache" cacheName="default" dataCacheClientName="default" /> </providers> </outputCache> </caching> <%@ OutputCache Duration="60" VaryByParam="*" %>
  • 22. Memcached Shim Memcached Shim Memcached Client Memcached Server Nuget: Microsoft.WindowsAzure.Caching.MemcacheShim
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. // the endpoint that is projected back through the service bus (note: NetTcpRelayBinding) // This DNS name will be "sb://[serviceNamespace].servicebus.windows.net/solver" host.AddServiceEndpoint( typeof(IProblemSolver), new NetTcpRelayBinding(), ServiceBusEnvironment.CreateServiceUri("sb", ‚metrobus", "solver")) .Behaviors.Add(new TransportClientEndpointBehavior { TokenProvider = TokenProvider.CreateSharedSecretTokenProvider("owner", Microsoft.WindowsAzure.CloudConfigurat Manager.GetSetting("ServiceBusSecret")) });
  • 30. .Behaviors.Add( new TransportClientEndpointBehavior { TokenProvider = TokenProvider.CreateSharedSecretTokenProvider( "owner", Microsoft.WindowsAzure.CloudConfigurationManager.GetSetting("Ser viceBusSecret") ) });
  • 31. .Behaviors.Add( new TransportClientEndpointBehavior { TokenProvider = TokenProvider.CreateSharedSecretTokenProvider( "owner", Microsoft.WindowsAzure.CloudConfigurationManager .GetSetting("ServiceBusSecret")) });
  • 32.
  • 33.
  • 34.
  • 38. Comparison Criteria Windows Azure Queues Service Bus Queues Yes - First-In-First-Out (FIFO) Ordering guarantee No (through the use of messaging sessions) At-Least-Once Delivery guarantee At-Least-Once At-Most-Once Yes Transaction support No (through the use of local transactions) 30 seconds (default) 60 seconds (default) Lease/Lock duration 7 days (maximum) 5 minutes (maximum) Yes Batched send No (through the use of transactions or client-side batching) http://aka.ms/q-vs-q
  • 39.
  • 40. namespaceManager = Microsoft.ServiceBus.NamespaceManager .CreateFromConnectionString(‚…‛); if (!namespaceManager.QueueExists(queueName)) namespaceManager.CreateQueue(queueName);
  • 41. Endpoint= sb://<namespace>.servicebus.windows.net/; SharedSecretIssuer=<issuer>; SharedSecretValue=<sharedSecret>
  • 42. if (messagingFactory == null) messagingFactory = MessagingFactory.CreateFromConnectionString(‚…‛); if (messageSender == null) messageSender = messagingFactory.CreateMessageSender(queueName);
  • 43. BrokeredMessage message = new BrokeredMessage(); message.Label = ‚Hello from your new message.‛ message.Properties.Add( new KeyValuePair<string,object>(‚FirstName", ‚Adam")); message.Properties.Add( new KeyValuePair<string,object>(‚LastName", ‚Hoffman")); messageSender.Send(message);
  • 44. if (messagingFactory == null) messagingFactory = MessagingFactory.CreateFromConnectionString(‚…‛); if (messageReceiver == null) messageReceiver = messagingFactory.CreateMessageReceiver(queueName);
  • 45. BrokeredMessage message = new BrokeredMessage(); // wait only 5 seconds... message = messageReceiver.Receive(new TimeSpan(0, 0, 5)); if (message != null){ try{ … // Remove message from queue message.Complete(); } catch (Exception){ // Indicate a problem, unlock message in queue message.Abandon(); } }
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. namespaceManager = Microsoft.ServiceBus.NamespaceManager .CreateFromConnectionString(‚…‛); if (!namespaceManager.TopicExists(topicName)) namespaceManager.CreateTopic(topicName);
  • 52. TopicClient topicClient = TopicClient.CreateFromConnectionString(‚…‛, topic); BrokeredMessage message = new BrokeredMessage(); message.Label = ‚Hello from your new message.‛ message.Properties.Add( new KeyValuePair<string,object>(‚FirstName", ‚Adam")); message.Properties.Add( new KeyValuePair<string,object>(‚LastName", ‚Hoffman")); topicClient.Send(message);
  • 53. if (!NamespaceManager .SubscriptionExists(topicName, "AllMessages")) { NamespaceManager.CreateSubscription( topicName, "AllMessages"); ListenForMessages(topicName); }
  • 54. MessagingFactory mf = MessagingFactory.CreateFromConnectionString(‚…‛); MessageReceiver mr = mf.CreateMessageReceiver( topicName + "/subscriptions/" + "AllMessages"); BrokeredMessage message = mr.Receive(); … // Remove message from subscription message.Complete(); Or… // Indicate a problem, unlock message in subscription message.Abandon();
  • 55. SqlFilter highMessagesFilter = new SqlFilter("MessageNumber > 3"); NamespaceManager.CreateSubscription("TestTopic", "HighMessages", highMessagesFilter); SqlFilter highMessagesFilter = new SqlFilter(‚FirstName = ‘Adam’"); NamespaceManager.CreateSubscription("TestTopic", ‚GuysNamedAdam", adamMessageFilter); MessageReceiver mr = mf.CreateMessageReceiver( topicName + "/subscriptions/" + ‚GuysNamedAdam");
  • 56.
  • 57. Customer support Data Management protection UI Forget password? User store User mapping More LDAP User mapping Authentication Authorization Integration Synchronization Facebook with AD Auth API More Integration Synchronization With Facebook
  • 58.
  • 59.
  • 60. IdP WIF ACS IdP
  • 61.
  • 62.
  • 63. public class RoleSetter : ClaimsAuthenticationManager { public override ClaimsPrincipal Authenticate(string resourceName, ClaimsPrincipal incomingPrincipal) { if (incomingPrincipal != null && incomingPrincipal.Identity.IsAuthenticated == true) { //DECIDE ON SOME CRITERIA IF CURRENT USER DESERVES THE ROLE ClaimsIdentity identity = (ClaimsIdentity)incomingPrincipal.Identity; IEnumerable<Claim> claims = identity.Claims; if (DoYourCheckHere()) ((ClaimsIdentity)incomingPrincipal.Identity).AddClaim( new Claim(ClaimTypes.Role, "Admin")); } return incomingPrincipal; }
  • 64. <system.identityModel> <identityConfiguration> <claimsAuthenticationManager type="ClaimsTransformer.RoleSetter, ClaimsTransformer"/> …
  • 65. if (User.IsInRole("Admin")) Response.Write("The code is 42...<br/>"); else Response.Write(‚No soup for you.");
  • 66.
  • 67.
  • 68.
  • 69.
  • 70. http://aka.ms/Azure90DayTrial http://aka.ms/MSDNAzure

Editor's Notes

  1. Take some time here.
  2. By definition, the use of high availability multiplies the amount of required memory for each cached item by the number of copies. Consider this memory impact during capacity planning tasks.
  3. Windows Azure offers cache notifications that allow your applications to receive asynchronous notifications when a variety of cache operations occur on the cache cluster. Cache notifications also provide automatic invalidation of locally cached objects.To receive asynchronous cache notifications, add a cache notification callback to your application. When you add the callback, you define the types of cache operations that trigger a cache notification and which method in your application should be called when the specified operations occur. A named cache needs to opt-in and enable cache notifications.
  4. Dedicated Demo: /Cache/Dedicated/TwitterDemoCoLocated Demo: /Cache/CoLocated/CoLocatedCacheDemoNuget: Windows Azure Cache Preview (make sure that nuget packages includes “include prerelease”)Nuget Search (ID): Microsoft.WindowsAzure.Caching
  5. MVC TempData - http://rachelappel.com/when-to-use-viewbag-viewdata-or-tempdata-in-asp.net-mvc-3-applications
  6. Use dedicated cache as ASP.Net session state provider (in CacheWorkerRole2).Demo: /Cache/Dedicated/SessionStateInCacheDemoShow the sections of web.config that wire up the SessionState provider, and hook it to the CacheClient.
  7. Use Service Bus Relay to expose a on-premises WCF service to cloudDemo: /ServiceBus/Relay Projects/NetTcpRelayBinding/RelayDemoServer and /RelayDemoClient projects).
  8. Demo: (/ServiceBus/Queue Projects/PreWin8/MultipleWorkersDemo/QueueItemCreator and /QueueItemConsumer)Demo: Wasn’t going to show this one, but you can play with it - (/ServiceBus/Queue Projects/PreWin8/QueuesOldSchool)Demo: (If you want to play with Win8, this is the equivalent in Win8/Metro) – (/ServiceBus/Queue Projects/Win8/Queues)
  9. Demo: /ServiceBus/Topic Projects/PreWin8/TopicPublisher and /TopicSubscriber
  10. Slide Objectives:Security is a common request of applications. However implementing **proper** security is hard. Also, additional security-related code increases complexity and attacking service to your applications. We need authentication and authorization abstracted away so we can focus on business logics.
  11. Slide Objectives:Wouldn’t it be nice if “someone” can hide all complexities and just provides simple assertions to us? On Windows Azure, this “someone” is ACS + WIF.
  12. Slide Objectives:Wouldn’t it be nice if “someone” can hide all complexities and just provides simple assertions to us? On Windows Azure, this “someone” is ACS + WIF.
  13. The Orange Desk is a Gate Agent (Gate 35A, for example).The Green Desk is the Ticketing Counter, who the Gate Agent will send you back to if you don’t have a valid boarding pass.The Pink Desk is the US Passport Agency, and the Blue Desk is the Drivers’ License Bureau.
  14. Use ACS to manage accesses using Live ID and Google ID – after this demo, add Yahoo to visualize the interface.