PDC09 – Day Two – Developing Advanced Applications with Windows Azure

Steve Marx – Technology Strategist

Now we can have the ability to have more than a Web and a Work Role, since we have several different types of Roles.

Example:

  • IIS Role
  • SMTP Role

Now the there is the new Storage API that is currently being shipped with the SDK and not only a sample.

Some new features:

  • Inter-role communication
  • Non-Http endpoints
  • Role instance lifecycle
  • VM Sizes
  • Full-trust in the Cloud
  • Local Storage
    • Upgrading the local storage

How to model you application

  • Draw the boxes and arrows
  • Each box is a role
    • Which receive traffic from the internet
    • Which need IIS?

Receive Traffic: Input Endpoints

  • Different ports on same domain
  • There’s always load balancing
  • Declared in ServiceDefinition.csdef
  • Handled by IIS

InputEndpoint

  • Defined the protocol, port and name of the endpoint that will opened in order to listen for the requests
  • Protocols supported
    • Http
    • Https
    • Tcp

RoleEnvironment is the class that allow us to communicate with the Windows Azure fabric, for example in order to know the Configurations

Aside about Email

  • Spammers will use Windows Azure then the IP ranges can get blacklisted
    • Best Practices: Use a relay service in order not to have your mails marked as SPAM
  • Send mail via a rely mail
  • Receive mail is fine

Searching

  • Lucene.NET
    • Popular search API
    • .NET port of original Java implementation
  • Index data
    • Bring index up to speed on startup
    • Continually update index
  • Serve searched (via WCF)

Asynchronous Work without a Queue

  • Queues deliver messages to one worker only
  • We need every worker to see the message
    • Solution
      • use Table instead
        • Build your own secondary index
        • Order references

Initialization of Roles

  • Now we have:
    • OnStart() – “busy” state, initialization
    • Run() – do work
    • OnStop() – traffic stops, graceful shutdown

Internal Endpoints

  • Declare endpoints in ServiceDefinition.csdef
  • API to find out what port to listen on RoleEnvironment in Order to know if the port or anything change about the endpoint since the last call

How to Get More RAM

  • RAMDiectory pouts everything in memory
  • Choose the VM Size:
    • Small
    • Medium
    • Large
    • Extra-Large

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

* Copy This Password *

* Type Or Paste Password Here *

1,206 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>