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:
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
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
How to Get More RAM