Nuno Filipe Godinho

All about .NET Development and Architecture

November 2009 - Posts

PDC09 – Day Three – Building Scalable and Reliable Applications with Windows Azure

Brad Calder – Director/Architect

Data Building Blocks

  • Types of Storage in Windows Azure
    • Volatile Storage
      • Local Storage
      • Caches (eg. AppFabricCache and MemCache)
    • Persistent Storage
      • Windows Azure Storage
        • Blobs
          • Provide interface for storing name files
        • Tables
          • structured storage.
        • Queues
          • reliable storage and delivery of messages
      • SQL Azure
  • Storage Account Performance at commercial Availability
    • Capacity
      • 100TB
    • Throughput
      • Up to a few hundred megabytes
  • Partitioning of Data Objects
    • Load balancing is an internal concept of Windows Azure Storage
      • Allows the system to automatically scale out access to your data to meet its peek traffic demands
    • What matters to the application is the partitioning key used for objects
      • All objects with the same partition key are always grouped
  • Per Object/Partitioning Performance for Commercial Availability
    • Throughput
      • Single Queue and single table partition
        • Up to 500 transactions per second
      • Single Blob
        • small reads/writes up to 30 MB/s
        • large reads/writes up to 60 MB/s

Scaling Computation

  • Compute Service Model – What is describes?
    • The topology of your service
      • Types of roles and their binaries
      • How the roles are connected
    • Configuration of the service
      • How many instances of each role type
      • Application specific configuration settings
      • How many update domains you need
  • Best Practices
    • Due to application failures, upgrades or hardware failure
      • Use multiple instances
  • Queue Workflow Concepts
    • Windows Azure Queue Provides
      • Guarantee delivery
        1. Worker dequeues Message and marks it as Invisible
        2. Worker deletes Message when finished processing
        • Note: If worker role crashes, message becomes visible for another worker to process
      • A message may be processed more than once
      • Assume messages put into same queue can be processed in any order
    • Best Practice
      • Make work items idempotent
  • Scaling Queue Throughput
    • Batch Work Items into Blob
      • Group together many work items into a blob
      • Queue up pointer to the Blob for the message
    • Use Multiple Queues
      • Job Manager
        • Responsible form managing the execution of the Queues
      • Work Items
  • Continuation for Long Running Work Items
    • Want to continue on failover
    • High level approach
      • Bread work item into smaller and repeatable steps
      • Record progress

Lifecycle Management

  • In-place Rolling updates
    • Specify the number of upgrade domains in service model
      • Breaks your roles evenly over the number of domains
    • Rolling upgrade
      • Walk each upgrade domain one at a time
      • Upgrade just the roles in the current domain
    • Benefits
      • Minimizes availability loss
        • Only one domain of roles are restarted at a time
      • Allows local state to be uses across upgrades
      • Caches application upgrade issues early
        • Detect upgrade issues after first few domains
  • Versioning with Rolling Updates
    • Always assume you will have old and new running side by side in your service
    • Version Everything
      • Protocols, Schemas, Messages and everything else
  • Windows Azure Tables Schema change
    • Have a version property in each entity
    • Types of Schema changes
      • Adding a non-key property
        • Perform similar step update process
        • Update “IgnoreMissingProperties”
      • Removing a non-key property
        • Perform similar upgrade process
        • Update “IgnoreMissingProperties”
      • Changes in Partition Key or Row Key
    • Most uses schema change is adding a non-key property
PDC09 – Day Two – Advanced Topics for Building Large-Scale Applications with Microsoft Silverlight

MVVM – Model-View-ViewModel

  • Separation of concerns
  • View = handled UI
  • Model = contains pure data
  • ViewModel = communicates between View and Model through bindings
  • Works Great with Silverlight and WPF
    • XAML based data bindings
  • Testable

 

  • Model
    • Represents the Data
    • The entity
    • Not required to know where it gets the data from
      • WCF service, WCF Ria Services
  • View
    • The Screen, the UI
  • ViewModel
    • Main source of logic for the MVVM triad
    • Connects the Model and the View
    • Abstracts the View
    • Public Properties that are bound to the View
    • INotifyPropertyChanged and INotifyCollectionChanged talk to the view through bindings
    • Listens for changes from the View made to the Model
  • Variations of the MVVM
    • View First
      • ViewModel is declared as StaticResource in the Views XAML
        • Works well in Blend
      • Another way is to create the ViewModel in the View’s code-behind
    • ViewModel First
      • View is injected into the ViewModel’s constructor
      • Doesn’t allow the possibility to use Blend
    • View and ViewModel Marriage
      • View must be paired with the ViewModel somehow
      • Doesn’t allow the possibility to use Blend
  • What don’t we have with MVVM
    • Commanding

Prism 2

  • Prism is a set of options
  • Use what you want and ignore the rest
  • Technical Concepts:
    • Modules
    • Shell
    • Commands
    • Containers
    • Regions
    • Bootstrapper
    • Event Aggregation
    • Unity and Dependency Injection
PDC09 – Day Two – Windows Workflow Foundation 4.0 from the Inside out

Bob Schmidt – Program Manager

For WF4:

  • Programs are data
  • Scheduler-based program execution
    • stackless & serializable
  • Runtime-mediated code rendezvous
  • Natural Control flow
    • run it the way you think of it

Authoring

  • WF is an activity
    • Can author programmatically or using XAML
    • Can contain other activities
    • Separate base classes for activities that return a value
  • WF program is a definition from which many instances can be created
    • Each instance of an activity has a unique environment (visible data values)

Execution

  • WF runtime just sees activities and not sequence or parallel or recurrence
    • WF runtime is a referee that enforces the rules of the work
    • CacheMetadata is how an activity describes itself
  • WF runtime knows when an activity is done
  • An activity can schedule the execution of a child activity and be notified upon its completion
    • There can be multiple, distinct method invocations per activity
    • Can Express all kinds of patterns (control flow)
  • There can be multiple paths of invocation …

Scheduler

  • WorkItem represents the invocation of a method
  • WorkItems can be created by:
    • Activity Code
    • External Code
  • Flow of execution
    1. The Activity Code or the External Code Add a WorkflowItem
    2. Them the elements get Pushed or Enqueued for execution
    3. Afterwards the Scheduler will Pop it and execute it
  • Details
    • Scheduler per program instance
    • Manages an ordered list of work items

Threading Model

  • One thread at a time is used to process work items for a program instance
    • Simplifies the programming model of activities
    • Thread may differ work items in the same instance
      • WF runtime uses host-provided SynchronizationContext
      • Standard TLS mechanisms do not apply to WF
        • Instead use WF Execution Properties – names properties visible for a part of a workflow
        • Attached / detached from the current environment by the WF runtime before / after work item invocation
    • Activities should not block this thread

Bookmarks

  • Problems
    • What happens when your programs need to wait for input?
    • We want a “Zero footprint” WaitForInput()
  • Bookmark
    • A named resumption point in a WF program
    • Resumption will schedule an activity’s callback method
    • WF runtime mediates resumption – no need for the instance to be in memory
  • WCF Receive activity is built on top of bookmarks in order to give access to this possibility when using Workflow Services

Persistence

  • lets you pause an instance, save it somewhere & resume it later
    • has no affinity to a WF host instance, CLR instance, thread, process or machine
  • instances of WF are serializable
    • A CLR Stack is not serializable, but in WF program a stack only exists transiently, during work item execution
  • Sometimes you want a “no persist zone”
    • Automatic during execution of an async activity
  • Details of persistence are deliberately separate from the machinery of WF runtime

Serializable Instances

  • Contains
    • Work Item list
    • Bookmarks
    • Data (arg and values)
      • Environment for all executing activity instances
    • Activity instance info (callbacks, execution props)
    • Custom Data from persistence participants
  • Doesn’t contain
    • Workflow Definition
    • Why?
      • several instances can share the same workflow definition
      • management of definitions is responsibility of the host
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
PDC09 – Day Two - Keynote

Steven Sinofsky

Developing Windows 7

  • Learning
    • Solving Problems + Innovation
    • “Engineering 7” Blog made a very interesting Dialog even without having any code of the product, just about the decisions that were being made
    • Ecosystem Readiness
    • Developer Pre-Beta, Beta, RC rhythm
    • Telemetry
  • Telemetry
    • Seed Feedback Button
    • Hardware and Device Diagnostics
    • Reliability Analysis Component (RAC)
    • Software Quality Monitor (SQM)
    • Windows Error Reporting (WER or “Watson”)

Developing Internet Explorer

  • Learning
    • Responsible Engineering
    • Trustworthy computing
    • Real-world Interoperability
    • Innovative Technologies
  • Updates
    • Standards Progress
      • ACID
      • HTML 5
    • Performance Improvements
      • Javascript
    • Ecosystem Innovations
  • IE 9 with 3 weeks of development is looking interesting in terms of performance and interoperability
  • Using Direct2D and DirectWrite to provide better graphics rendering and Hardware Acceleration without any change of the current sites

Windows 7 Call to Action

  • Integrate with Windows 7 Desktop
  • Develop 64-bit
  • Focus on fundamentals in your code
  • Build on new APIs in Windows 7
  • Watch more videos today on Channel 9 about Internet Explorer 9

Scott Guthrie – Developer Division

Silverlight 4

  • Focus
    • Media
      • Web and and Microphones
        • gives you access to the raw access to the input and so you can make the changes you want on that stream, like using PixelShader with it
      • Multicast streaming
      • Output protection
      • Offline DRM support
    • Business Applications
      • Printing
        • Print Preview Dialogs
        • Printing Configurations
        • This is a Print API that you can change however you want and not only a screenshot of the screen
      • Rich Text
      • Clipboard access
        • Local and Central clipboard support
      • Right Click
      • Mouse Wheel
      • Implicit Styles
      • Drag and  Drop
      • Drop Targets support
      • Bidi & RTL
      • HTML
        • Hosting HTML inside Silverlight application
        • We can interact with the HTML contents as being a brush
      • Commanding and MVVM
      • Data & Networking
        • Sharing Assemblies across SL and .NET 4.0
        • Data Binding Improvements
        • UDP Multicast support
        • REST Enhancements
        • WCF Improvements
          • Main one is TCP channel support
        • WCF RIA Services
          • All the capabilities of RIA Services and with all the capabilities of WCF
          • Works well with OAuth
      • Visual Studio 2010
        • WYSIWYG Design Surface
        • XAML Intellisense
        • WF and POCO Support
    • Additional Control
    • Beyond the Browser
      • Windowing API
      • Notification Popups
      • HTML support
      • Drop Target support
      • Opening the Sandbox
        • Trusted Application
          • Custom Windows Chrome
          • Local File System
          • Cross-file Network
          • Keyboard support in Full Screen Mode
          • COM object support in Windows
            • using dynamic keyword of C#
          • Access to Several devices form the client machine
      • Silverlight Performance
        • Twice as fast
          • uses JIT like the normal .NET Application
        • 30% faster startup
        • New Profiling support
      • Google Chrome will support SL4 also
    • Schedule
      • Beta
        • All the features seen today
        • VS2010 Tools
        • Expression Tools
      • RC
      • Final Release
        • First half of Next Year (MIX’10 ????)

 

Kurt DelBene – Office and Sharepoint 2010

Microsoft Business Productivity Infrastructure

  • Unified Business Platform
    • Unified Communications
    • Business Intelligence
    • Enterprise Content Management
    • Collaboration
    • Enterprise Search

 

  • Office and Sharepoint Development Platforms
    • User Experience
      • Based in Services and in a Object Model that can be extended in order to create better User Experience
    • Application Services
      • Expose all the capabilities in the Applications as services to be consumed without loosing any of the features that we have access inside the solution
    • Content and Data Management
    • Interoperability with LOB integration
      • possibility to more easily integrate the external LOB applications inside the products
    • Tools and Deployment Flexibility
      • New Tools for Sharepoint Development
      • Debug capabilities are currently in the Tools
        • Now Debug really works. Awesome.
      • Interesting capability to import a Sharepoint solution to start the project
      • Possibility to deploy the solution in a sandboxed solution. Interesting in terms of security
      • Deployment
        • Simply upload the package generated by Visual Studio 2010 into the sharepoint – Real All-in-One working for deployment also. Now it looks really good for Sharepoint Development.
    • Announcing the Office and Sharepoint 2010 Public Beta to download www.microsoft.com/2010
      • Office 2010
      • Sharepoint Server
      • Project Server 2010
      • Visio 2010
      • Mobile is also available today in the mobile marketplace
    • Sharepoint has a Silverlight WebPart out of the Box.
    • Sharepoint 2010 now has the Office Ribbon

  • Announcing Duet Enterprise for Microsoft Sharepoint and SAP
    • Consume and extend SAP from Microsoft Sharepoint 2010
    • Available on the Second-half of 2010
  • Announcing the Outlook Social Connector
    • Windows Live, Sharepoint Server, Linkedin
    • Has an Open SDK that can be used to develop new connectors for this connector
PDC09 – Day One – Code Visualization, UML and DSLs

Cameron Skinner – Product Manager in Visual Studio, responsible for the Architecture Tools in VS2010

Why?

  • Complexity remains a serious problem
    • Found everywhere
      • Code
      • Requirements
      • Organizational Politics
      • and so on…
  • VS2010 attacks these problems by increasing
    • Shared understanding between team members
    • the understanding of existing systems
    • the ability to gain and maintaining the control over it

Who?

  • Developers are trying
    • to understand existing code
    • focused on the “right fix”
  • Architects are trying
    • to understand the Domain and how it relates to implementation
    • get the solution for the existing projects

Product Capabilities

  • “Understand the Code”
    • Architecture Explorer
    • Sequence Diagram Generation
    • DGML Graphs and “Standard” Graphs
  • “Maintain Control”
    • Layer & Diagram & Custom MSBuild Tasks
    • Work Item Integration
  • “Understand the Domain”
    • UML 2.x Designers
  • All this capabilities are only in the Ultimate version of VS2010

“Understanding the Code”

In Visual Studio Options, “Mark the Show Misc Documents in Architecture Explorer”

Dependency Diagram

  • Very interesting Dependency Diagram that represent you application and all the interaction of the solution and you even can search who in your solution is using a specific assembly and what is being made with it.
  • If we use MEF, Unity or any other Dynamic connection this won’t be possible to see in the Dependency Diagram, since it currently represents only the static dependencies.
  • Think of Dependency Diagram as read-only, since if you make any change on it he won’t change any of the code of the solution associated.
  • The Dependency is a DSL that was generated for this version of VS2010.
  • We can select just the elements that we want to view in the Dependency Diagram and define which level of information we want to have, like:
    • Assemblies
    • Namespaces
    • Types
    • Methods
    • We can even filter by access modifiers:
      • public
      • private
      • protected
      • internal
      • protected internal
  • We can navigate to the code from the Dependency Diagram.
  • Doesn’t work on unmanaged C++, but is currently being done but no date for the release now.
  • We can interact with the Diagram and extend the DGML model but in a simple model
  • Possibility to define the level and the center of the dependency that you want to see
  • Butterfly mode enables the viewing of only the types that are just linking to your central defined element
  • We can generate the Dependency Diagram based on a Custom selected elements

Note: We can Calculate the Complexity by right-clicking on the Project and selecting the “Calculate Complexity” option of the Context Menu, but this isn’t currently available inside the Dependency Diagram.

Architecture Explorer

  • Capabilities to filter information about your solution
  • Ability to look at the Logical and Physical View of the Solution Projects and filtering what you want to filter in terms of inbound or outbound navigation, and this way we’ll have more information's about how our solution is working and how we can maintain it.

Sequence Diagram

  • Now you have the ability to define the depth of the diagram in terms of levels and them expand if you want more directly on the diagram
  • Designed to be collaborative and to persist the changes made on the Model, and it will identify the changes that were made on the diagram and associate that change to a new Work Item.
  • Works on all versions of .NET Framework
  • Doesn’t generate the code on by changing the Sequence Diagram, just identifies the changes that need to be done

“UML Diagrams”

  • There’s a new Modeling project in VS2010 that will have all the Diagrams
  • State Diagrams will be supported as well as all other diagrams from UML
  • UML Diagrams supported in this version of VS2010:
    • Use Cases
    • Class Diagram
    • Sequence Diagram
    • Activity Diagram
    • Component Diagram
    • Layer Diagram
      • Very interesting to define the architecture
      • Capability to validate the architecture by doing static code analysis in order to check all the dependencies and references between the several Layers, and defining the architectural problems as errors in the Error List.
      • We can get a visual information regarding the layers that are invalid due to the architectural validation
      • Just for static elements right now, but can be made by extending the pipeline of the Validation of the models

 

Very interesting Session and a great step for getting real architecture tools inside Visual Studio.

PDC09 – Day One – SQL Azure Present & Futures

Data Platform as a Service

In the future will have Reporting, Data Analytics

SQL Azure Database

  • Relational Database service
    • SQL Server technology foundation
    • Scalable
    • Symmetrical

SQL Azure Provisioning

  • Each account has zero or more servers
    • Azure wide provisioned in a common portal
    • Billing instrument
  • Each server has one or more databases
    • contains metadata about the databases
    • Unit of authentication and security
    • Unit of Geo-location
    • The server is a logical grouping of you DBs
  • Each database has standard SQL Object
    • Unit of consistency
    • Contains users, tables, views, indexes, and so on,

Global Availability

  • North Europe
  • Southeast Asia
  • North and South USA

Futures

  • Goal: Provide and end-to-end experience for enterprise departmental apps and Saas ISVs scenarios
  • Improved Tools
    • Today we have
      • VS, SSMS, ADO.NET, ADO.NET Data Service
  • Data Backups
    • Multiple replicas of all databases with automatic failover. System backups for additional protection
    • Use Database Clone to create a clone of the Database with every capabilities of the original one
    • During 1H 2010
  • Continuous Backups
    • Configurable retention and lag period
    • Backups available for read operations
    • Local and regional options
    • During 2H 2010
  • Operational Models
    • SaaS
      • Provisioning APIs for ISVs
      • Template database support
      • Meta-data tracking
      • Additional billing scenarios
    • Scale-out support –Today
      • Databases and workloads partitioning is a classic
        • Better price/performance
        • Levels of throughput not possible with a single machine
      • What SQL Azure addresses
        • Highly available service on top of commodity hardware
        • Zero administration
  • There will be available several options and the 10GBs of space is not an issue

Customer Feedback

  • Add support for profiler, DMV’s
  • SQLCLR
  • and much more

Codename “Vidalia”

  • Sharing to trustworthy collaboration
    • Cloud is a grate place to connect
    • Empowers multiple parties
    • Businesses need control

Very interesting demos, need to see more about it.

PDC09 – Day One – Application Server Technologies – Present & Future

Cloud: Fifth Generation of computing

  • Cloud - 2010+
  • SOA - 2000s
  • Web - 1990s
  • Client-Server - 1980s
  • MainFrame – 1970s

Technology Disruptions

  • Cheap Processing and Storing
  • Virtualization
  • Advances in Networking
  • Advances in Web Technologies
  • Emerge of Service Platforms

Application Trends

  • Service-Oriented
  • Composite Applications
  • Model Driven
  • Scale-out
  • Elastic
  • Failure Resilient
  • Always available
  • Multi-tenant
  • Staged Production

AppFabric

  • Windows Server and Windows Azure platform
  • Composition
    • Bases
      • Windows Azure or Windows Server with Microsoft .NET Framework Available
    • Main Capabilities
      • High Availability
      • Scale Out
      • Multi-Tenant
      • Management
    • High Level Services
      • Service Bus
      • Caching
      • Workflow Hosting
      • Services Hosting
      • Monitoring
      • Access Control
  • 2010 Wave
    • WCF and WF
      • Customer Momentum
        • Adoption of WCF and WF
          • > 27% year over year growth in developer adoption
          • Top 5 technologies used by ISV’s
      • .NET 4.0
        • WCF
          • Configuration simplification
          • Service Discovery with WS-Discovery support
          • Routing Services
          • REST service improvements
        • WF
          • Intuitive flowchart modeling style
          • New activity model and runtime
          • Fully declarative authoring and composition
          • Designer performance and re-hosting
          • Change from XOML to XAML
        • Deep integration between WCF and WF
          • Workflow Services with Supporting activities
          • Integrated hosting and messaging
          • Enterprise grade messaging for workflows
    • Windows AppFabric
      • Manage Services and Workflows
        • Infrastructure for enhanced workflow and service hosting, configuration and control
        • Integration with IIS Manager and PowerShell
      • Monitor services and Workflows
        • Infrastructure for storing workflow and service monitoring
        • Dashboard for information’s regarding the usage
      • Distributed in-memory application cache (Previously known as “Velocity”
      • Server/Service symmetry
        • Symmetric application development, deployment and management
        • Common scale-out and availability fabric
      • Server/Services Connectivity
        • Service Bus for Connectivity
        • Access Control
    • Announcing Microsoft Biztalk Server 2009 R2
      • Customer Momentum
        • Adoption of Biztalk Server
          • 10kç customers
          • 80% global 1000
      • Innovations
        • Platform alignment
          • Windows Server 2008 R2
          • SQL Server 2008 R2
          • VS2010
        • Productivity Gains
        • B2B Scenarios Made Easy
    • Summary
      • .NET 4.0 (WCF/WF)
      • Windows Server AppFabric
      • Microsoft Biztalk 2009 R2
  • Futures
    • Server-Service Symmetry
      • CTP of Windows Azure platform AppFabric in CY10
    • Common App & Programming Model
      • End-to-End Composite Applications Model
      • WCF Service Authoring Simplicity and Scale
      • WF Activity and Rule Libraries and Tooling
    • AppFabric
      • Loosely coupled Message-oriented Event-Driven
      • Multi-Tenancy
    • Common End-to-End Management
      • End-To-End deployment, configuration and management
      • Dashboard for management
    • Biztalk Server
      • Enterprise connector to the AppFabric
      • Deep platform alignment

Summary

  • 2010 Wave
    • Rich Framework, server and tools for building service-oriented and distributed Applications
    • Build upon your existing investments
    • Scale & Performance Windows Server AppFabric
    • S+S – Symmetric Host, Development and Deployment
  • Futures
    • Agility – Common Application & Programming Model
    • Elastic Scale and Continuous Availability – Rich AppFabric Services
    • Enterprise Productivity – Management Model
    • Multiple Workloads – Unified Application Server for ASP.NET, Biztalk Server

Very interesting in terms of leveraging all the capabilities of “Dublin”, WCF, WF, Velocity, Multi-Tenancy, Scaling Out and so on.

PDC09 – Day One – Software + Services Identity Roadmap Update

Announcement: WIF – Windows Identity Foundation RTW

Interesting Changes

  • “Genera” Server is now called “Active Directory Federation Services 2.0” and comes as part of Windows Server 2008 and not separately.
  • “Genera” Framework is now called “Windows Identity Foundation” and is an extension for .NET
  • Windows CardSpace “Geneva” is now called “Windows CardSpace 2.0” and is the usage of WIF with CardSpace

Microsoft Dynamics CRM “5”

  • Identity Challenges
    • Custom Authentication
    • Grant Access to users at partner organizations
    • Mash up: single sign on across applications and across companies
    • Support browser, rich and mobile clients
  • Now using WIF and ADFS 2.0 in order to get the Challenges solved

Microsoft Sharepoint 2010

  • Identity Challenges
    • Identity Flow
      • Client
      • Web Server
      • App Server
      • Sharepoint Content
      • Back-End Web Services
    • Use Customer Identity Provider
      • Several Authentication Providers like
        • Integrated Authentication
        • ASP.NET Membership
        • Live ID
        • Custom Membership
    • Automatic & Secure identity delegation
    • Authorization over Application specific roles
    • “No-credential” access to WebService

Directions

  • Authorization - .NET ACS CTP
  • OpenID
    • Key part of the Identity Management System
      • 50.000 destination sites
      • US Government sites to be OpenID enabled
    • Major portals are OpenID providers
      • Yahoo, Google
    • Challenges
      • Usability
      • Security
      • Client Software
  • ‘M’ Model : System Identity
    • Allow more interesting queries in terms of security tracking

Very interesting topics and certainly to keep seeing more information about it.

PDC09 – Day One - Keynote 1

Ray Ozzie – Chief Software Architect

  • Strategy
    • Seamless experience through the several applications
    • Silverlight Everywhere
      • Mobile
      • Notebooks and NetBooks
      • TV’s
  • News about Windows Live and Windows Phone during this next Spring in MIX’10
  • Platforms
    • Windows Server
    • Windows Azure
  • Managing Software for all Platforms
    • System Center
  • Azure Roadmap
    • Presentation of the concept – PDC 2008
    • New Release - PDC 2009
      • More than just Worker and Web Role, now supports any type of development
      • Support for
        • ZendFramework
        • MySQL
        • Java
        • Php
        • Eclipse
      • Storage
        • Automatic geographic replication based on the selected Locations
        • Europe: Dublin and Amsterdam
        • Features
          • Entity group transactions
          • Snapshots
          • Copy
          • Block blobs
          • Regular Extra
            • usage like NTFS in the Azure Storage
        • SQL Azure
          • Database in the Cloud – Real SQL Server database in the cloud
          • Management using the same Tools that currently exist without any change, like:
            • Management Studio
            • Excel
            • Other third-party tools
    • Production with no billing associated – January, 1st
    • Production with billing – February, 1st
  • Microsoft Pinpoint
  • Microsoft CodeName “Dallas”
    • CTP release today
    • Information Services Business
    • Open Catalog and Market place for managing the data
    • Creates a uniform binding mechanism for data
    • Uniform licensing model
    • Data as a Service
    • Learn more
  • Microsoft Pinpoint and Codename “Dallas” will be the center of the Data for the Applications

Vivek Kundra – Chief Information Officer for the US Government

Loic LeMeur – Founder & CEO by Seesmic

  • Will be launched today the new Seesmic application for Windows
  • A Silverlight version will be release soon

Matt Mullenweg – Founder, Automattic – WordPress

  • WordPress using Windows Azure with MySQL and Apache

 

Bob Muglia - President, Server & Tools Business

  • Next Generation of Cloud Application Model
  • Generations
    1. MainFrame – 1970’s
    2. Client-Server – 1980’s
    3. Web – 1990’s
    4. SOA – 2000’s
    5. Cloud – 2010’s
  • Cloud Application Model
    • Service-Oriented
    • Scale-out
    • Always Available
    • Staged Production
    • Model-Driven
    • Self-Service
    • Federated
    • Multi-Tenant
    • Failure Resilient
    • Elastic
  • Application Evolution is based on three tenants
    • Move
    • Enhance
    • Transform
  • Products
    • Server Space
      • OS: Windows Server
      • Relational Databases: SQL Server
    • Cloud Space
      • OS: Windows Azure
      • Relational Databases: SQL Azure
  • SQL Server Data Sync
    • Syncs data from several databases based on schedule
    • Interesting to perform sync from On-Premise to the Cloud SQL
  • Connectivity
    • Data Services to connect Enterprise and and Azure Platform SQL Data
    • Service Bus to integrate the Enterprise services and make them available in the cloud
    • Access Control to make federated identity between the Enterprise and the Azure Platform
    • Codename “Sidney” - Low level network access, connect servers inside a company with Windows Azure
    • Uses the “Windows Azure Connectivity Agent”
      • Makes a secure connection between the Enterprise Server and the Azure Cloud, using IPSE
  • Windows Azure Virtual Machine Role
    • New Virtual Machine role Type
    • Helps easily move existing apps to the cloud
    • Enables wide range of Windows apps to run in Windows Azure
    • Available during next year
  • Announcing AppFabric
    • Available today in Beta
    • Contains
      • Caching
      • Workflow Hosting
      • Monitoring
      • Service Bus
      • Service Hosting
      • Access Control
    • Will be available on Windows Server and Windows Azure
  • Download Now
    • Windows Server AppFabric Beta 1
    • ASP.NET MVC 2 Beta
    • Windows Identity Foundation Beta 1
  • Available Now
    • Windows Server 2008 R2
    • Windows Azure
    • SQL Azure
  • Beta at PDC and ship at 2010
    • Windows Server AppFabric Beta1
    • SQL Server 2008 R2
    • Visual Studio 2010
    • .NET 4.0
  • Beta in 2010
    • System Center “Cloud”
    • Windows Azure AppFabric

Windows Azure Platform Tour

  • Speakers
    • Don Box
    • Chris Andersen
  • SQL Azure
    • Usage of T-SQL and Normal SQL Server Tools
    • Transactions support
  • Access Control List
    • Working with Google and Yahoo on OAuth Wrap Support

Platform Convergence – Douglas Purdy

  • New Application Model Project in VS2010
  • Interesting to model our applications
  • Present in SQL Server 2008 R2 Beta 2
  • Capability to:
    • Publish to Test Environment
    • Publish to Deployment Package
  • “OSLO” was officially renamed to SQL Server Modeling Server
  • Makes possible to take an existing application and deploy it into the Windows Azure without any application change. (Of course this is always relative and based on the type of solution that we have, but it seems very interesting)
    • Configures all the Roles that exist on the Windows Azure without any need for working in XAML and using a Modeling approach
  • System Center Operations Manager getting the running in Windows Azure Solution information and models that are running
PDC09 – Pre-Conference – Windows Bootcamp Part 8 – Multi-Touch

Architecture

  • Handled using a Driver Model that is implemented by the partners
  • Based on WM_Messages that are exchanged by the application and the Multi-touch Hardware

Development Tiers

  • Good
    • Everything that comes for free
    • APIs
      • Panning/Zoom gestures
      • Right-click Gestures
    • Native Win32
      • Controls with standard scrollbars
    • WPF4
      • Click Events
      • ScrollViewer
    • WinForms
      • Controls with standard scrollbars
  • Better
  • Best
    • Everything done before and even handle events that the Multi-touch supports

Coding with MultiTouch

  • Gestures
    • Native
    • .NET 4.0 / WPF
    • .NET 3.5
  • Raw Touch
    • Native
    • .NET 4.0 / WPF
    • Silverlght
    • .NET 3.5
  • Manipulation
    • Native
    • .NET 4.0 / WPF
    • .NET 3.5
  • Inertia
    • Native
    • .NET 4.0 / WPF
    • .NET 3.5

Gestures

  • One or two fingers “actions”
  • Pre-defined in the platform
  • On by default in Windows 7
  • Using WM_Gestures

Touch

  • Using WM_Touch
  • Similar to WM_Gestures but just a lot more of them
  • We need to opt-in to have Touch capabilities
  • In case of using Touch we won’t get Gestures any more, just Raw touch
Geneva Framework goes WIF – Windows Identity Foundation

   Geneva Framework has received a name change and now is called WIF – Windows Identity Foundation, since is the technology that will work with all types of Identity in the Microsoft world.

“It provides developers pre-built .NET security logic for building claims-aware applications, enhancing either ASP.NET or WCF applications.  Windows Identity Foundation makes it easeir to build richer, more secure applications (cloud and on-premise) without being a security and identity expert.  It will boost developer productivity, as a result, and enhance app security through a standard approach to federation, strong authentication and identity delegation.”

   I’ve made a simple wrap-up of the several interesting articles about WIF, and they are:

   Have good reading and tests with WIF

PDC09 – Pre-Conference – Windows Bootcamp Part 7 – Graphics Improvements in Windows 7

Windows 7 Usage of the GPU

  • Continues from Vista
    • Media Center UI
    • Video Playback
    • Desktop Window Manager (DWM)
  • Win7 DWM uses DirectX3D10.1 API
    • Scales in Performance all the way from low end integrated graphics cards to the highest level ones

Windows 7 High Color

  • Wider Gamur
    • Bigger then sRGB, eg. xvYCC, AdobeRGB
  • Higher precision
  • Higher Dynamic Range
  • Windows 7 provides
    • Color Calibration Tool
    • Gamma LUT Loader

High DPI Displays are now Common

  • Improvements in Windows UI & IE
    • Automatic Configuration in OOBE (Out-Of-Box-Experience)
    • Promotion the Control Panel UI for DPI

Current Challengues

  • 3D
    • Uses DX3..10
    • Challenges
      • Not always available
        • No Hardware
        • Server
    • New in Win7
      • usage of DirectX10.1
  • 2D
    • Uses GDI, GDI+
    • Challenges
      • Quality and Performance
    • New in Win7
      • usage of Direct2D
  • Text
    • GDI
    • Challenges
      • Quality, Not up to date
    • New in Win7
      • usage of DirectWrite
  • Imaging
    • GDI, GDI, WIC+
    • Challenges
      • Extensive Format
      • Support for Security
    • New in Win7
      • new WIC version
  • Device Control
    • GDI
    • Challenges
      • Outdated notion of devices
Windows Azure TCO and ROI Calculator

   One of the most asked questions about Windows Azure is what is the TCO (Total Cost of Ownership) and the ROI (Return of Investment) that we have in order to decide if we are going or not into the cloud.

   Based on this questions Windows Azure Team putted together a TCO and ROI Calculator that will help you make your decisions better, and also plan how much are you going to spend in Windows Azure and Windows Azure Service Platform in order to maintain your business going. This is very important because even when having things going into the cloud our management still need some predictability on the costs and also some numbers to support the decision of moving to the cloud.

   Start predicting and planning your TCO and ROI using this calculator here.

PDC09 – Pre-Conference – Windows Bootcamp Part 6/6 – Windows Sensors and Location

Sensor Platform Overview

  • Develop better and more productive user experiences
    • Enable environmentally adaptive user interface
  • Windows 7 features a unified API for working with sensors
    • No need to target vendor-specific APIs
    • Consistent interface for sensors, extensions for location
    • Access control and privacy

Sensor Platform Architecture

  • Applications
  • Sensor API
  • Sensor class extensions
  • UMDF Sensor Driver
  • Sensor Device

Sensor class extensions and Sensor API connect to the Location and Other sensors control panel

Privacy and Access Control

  • Sensor data is considered personal
    • User consent is required to share data
  • All sensors are disabled by default
  • Can be preconfigured per user/services
  • Administrator rights required to enabled a sensor

What is a Sensor?

  • Category and Type
    • Category, represents what is being sensed
    • Type, represents how it’s being sensed
  • Properties
    • Read-only (Model, Serial Number) or read-write (Report Interval)
    • Sensors may have custom properties
  • Data
    • Get sensor-specific data report object synchronously or asynchronously (recommended approach)
  • Events
    • State change, leave, data updated, other
  • State
    • Is sensor working properly? What is the problem?

Sensor API Architecture

  • Native/Win32 API
    • COM Based (includes sensorsapi.h and sensors.h)
    • Consist in the following interfaces
      • ISensorManager
      • ISensor
      • ISensorDataReport
  • Windows API CodePack
    • Managed class library to ease .NET Framework access to the Sensor and Location APIs

Location Platform

  • A single API call to answer. Where I am?
    • Enabled location based services
    • Adjust functionality based on location changes
  • Built on top of the sensor API
    • Automatic transition between providers (most accurate providers have priority)
    • Concurrent access for multiple applications
  • Managed Wrapper
  • In .NET 4 we’ll use the System.Devices namespace where this will be placed
PDC09 – Pre-Conference – Windows Bootcamp Part 5/6 – Windows 7 Libraries Integration

Overview

  • In previous versions of windows, users managed files in known folders locations
    • Documents, Pictures, Music, Videos
  • People store data “all over the place”
    • 54% of digital content lives outside the user profile
    • Most uses do both
    • Store content on net work shares
      • Home Groups
  • Allows us to specify which folders make the library
  • “Libraries are declarations where users can find and organize data collected from multiple folders”

“Under the Hood”

  • Library is kept in a file
    • Important: Don’t work with the file
  • Libraries is similar to a folder but only look at the folders

Integrating with Libraries

  • Common File Dialog
    • When we save a file on a Library by default is going to be saved into the default save location defined in the Library configuration
    • The new Common file dialog have built-in support for Libraries
    • Win32
      • Use IFileDialog native APIs
      • Do not use GetOpenFileName and SaveFileName

Library APIs

  • Shell APIs are COM Bases
  • User the Library objects, interfaces and functions you should
  • To Load Library
    • IShellLibrary
    • LoadLibraryFromKnownFolder
  • Shell Helper Functions (ShHelper.h)
  • ShellLibrary Class in the Windows API CodePack for Managed Code
  • SLUtil.exe is a command-line tools that enables us to manage libraries
    • More samples here.
PDC09 – Pre-Conference – Windows Bootcamp Part 4/6 – Windows 7 Taskbar

Key Goals

  • Things you use all the time are at your fingerprints
  • Manage your windows with confidence
  • You are in control
  • Clean and lightweight

Coding for the Windows Taskbar

  • Win32/C++
    • COM
      • iTaskbarList3
      • ICustomDestinationList
      • IShellItem
      • IShellLink
  • .NET

How are Windows Grouped?

  • ApplicationID
    • It’s a String, not a GUID
      • Limited to 128 characters
      • Naming Conventions – Company.Product.SubProduct
    • Design Considerations
      • Default: Computed by process name
      • Can be explicitly declared
        • Several executables, same application
        • Same executables (host), many applications
        • Multiple shortcuts
    • Setting the ApplicationID
      • Process-wide – affects all windows in the current process
      • C++
        • SetCurrentProcessExplicjtAppUserModelId(L”Microsoft.Samples.AppId1”)
      • .NET
        • TaskbarManager.SetCurrentProcessId(“Microsoft.Samples.AppId1”)

Taskbar Buttons

  • Consolidation
    • Quick launch
    • Notification area icon
    • Desktop shortcut
    • Running application Windows
  • Design Considerations
    • Only users can pin applications to taskbar
    • The icon’s hot-track color us the icon dominant color
    • Test icons with High DPI
    • Test with with various themes and glass colors
  • Get More from Taskbar Buttons
    • Overlay and Progress
      • Design considerations
        • Notification area is now user controlled
          • Leave yourself out if possible
        • Use taskbar buttons for custom progress or status information
  • Thumbnail toolbars
    • Design Considerations
      • You’ll get up to 7 buttons (hard-coded limit)
        • Once added, can’t delete
        • Can hide and disable
      • Behave as regular buttons
        • Listen to Events
    • API
      • C++
        • RegisterWindowMessage
        • ThumbBarAddButton
      • .NET
        • AddButtoons(IntPtr windowHandle, params ThumbnailToolbarButton[]) – WindowsForms
        • AddButtons(UIElement element, params ThumbnailToolbarButton[]) – WPF
  • Live Thumbnails
    • Custom Window Switchers
      • Use ITaskbarList3::RegisterTab, SetTabOrder

Taskbar + Windows Shell

  • Application Support
    • Common file dialogs
    • Known folders and libraries
    • Property System
  • Terminology
    • IShellItem – represents folders and files
    • IShellLink – represents shell shortcuts
    • IShellFolder – represents folders
  • Jump List
    • It’s a mini Start Menu for the application
      • The user is in control of what is part of the Jump List
    • Detailed Look
      • Destination (nouns) – Items that will be worked
        • Pinned Category
        • Known Category
          • Only 2 Known category exist and mutually exclusive on the API
            • Recent
            • Frequent
        • Custom Category
      • Tasks (verbs) - Actions
        • User Tasks
        • Taskbar Tasks
    • Design Considerations
      • Surface key destinations and tasks
        • Recent and frequent are free
        • Pinned is also free (if the user uses it)
        • Respect items the user removes
PDC09 – Pre-Conference – Windows Bootcamp Part 3/6 - Working Set Background

Working Set Background

  • Optimal usage of system memory – a constant area of investment
  • Working set: Comprises all the potentially trimmable virtual addresses for a given process, session or system resource
  • Resources like nonpaged pool, kernel stacks, large pages & AWE regions are excluded
  • Working sets provide an efficient way for the system to make memory available under pressure … but maintaining them is nor free

Working Set Aging/Trimming

  • Are periodically aged to improve trim decisions
  • Which sets and which virtual addresses to trim?
  • How much to trim?
  • Memory events so applications can trim?

General Policies of Working Sets

  • How is optimal usage achieved?
    • Ordered based on their age distribution
    • Trim goal is set higher to avoid subsequent additional trimming
    • After the goal is meet other sets continue to be trimmed – bus just for their very old pages. This provides fairness so one process doesn’t surrender pages and the others not.
    • Up to 4 pages may be performed later passes consider higher percentages of each working set and lower ages (more recently accessed) as well
    • When trimming does occur, all sets are also aged so future trims have optimal aging

Working Set improvements

  • Expansion to 8 aging values
  • Keep exact age distribution counts instead of estimates
  • Force self-aging and trimming during rapid expansion
  • Don’t skip processes due to lock contention and ensure fair aging by removing pass limits
  • Separation of the system cache working set into 3 distinct working sets (system cache, paged pool and driver images)
    • Now we can apply minimums to each one making it more manageable and interesting
  • Factor in standby list repurposing when making age/trim decisions
    • Any pages that are reference by your application are immediately protected by the factor in the standby list
  • Improved inpage clustering of system addresses
  • RESULTS: Doubling of performance in memory constrained systems 

PFN Lock Background

  • The Page Frame Number (PFN) array is virtually continuous (but can be physically sparse)
  • The Problem
    • The huge majority of virtual memory operations were synchronized via a single system-wide PFN lock.
    • Large number of processors and memory sizes identify the lock pressure. Prior to this change SQL Server had an 88% PFN lock contention rate on systems with 128 processors
    • Applications and device drivers seeking higher performance faced significance complexity at best
  • The Answer
    • In Windows 7 the system wide PFN lock was replaced with the fine-grained locking on an individual page basis
    • This completely eliminated the bottleneck, resulting in much higher scalability.
PDC09 – Pre-conference – Windows 7 Bootcamp Part 2/6 – Core Kernel Changes

More Core Platform Support

  • Supporting Mode than 64Lps
    • Introduction of the Processor Groups
      • Windows Server 2008 R2 introduces processor Groups
        • Each processor groups can contain up to 64 LPs
        • System support up to 4 groups in this release
        • Maintains compatibility with legacy systems
  • Processes and Threads
    • Processes can  contain threads executing in multiple groups
    • Processes are assigned groups in round robin fashion
    • Threads are assigned to a group based on:
      • Inheritance from creating thread
      • Using new group affinity API
  • Task Based Scheduling
    • Runtime support task based concurrency want to control when and where tasks execute
    • Why not use kernel threads to represent tasks
      • Context switches between threads involve the kernel scheduler
      • Runtime loses control when blocking event occurs
  • UMS – User Mode Scheduling
    • Enables switching between threads in user mode
    • Returns control to the runtime when a thread blocks in the kernel
    • Architecture
      • Divides threads into a user and kernel portion
        • Together these comprise a UMS Worker Thread
      • Creates to views of what is being made
      • When a Worker thread enters the kernel
        • porting of the Scheduler thread enters wait state
        • Worker thread wakes and executes kernel service
          • Ensures correct kernel state for the Worker Thread
  • The Dispatcher Lock
    • Dispatcher database lock originally protected the integrity of all scheduler related data structures
    • Over time additional locks introduced to reduce contention
      • Thread locks, timer table locks, PRCB locks
      • Still synchronizes
    • Replaced in Windows 7 by Coarse-Grained lock
      • Well defined locking hierarchy
      • Per-object locking used for object paths
      • Many Operations are lock-free
      • Uses transactional semantics for waits
PDC09 – Pre-Conference - Windows 7 BootCamp Part 1/6 - Introduction

Introduction to the Windows 7 BootCamp

Key Windows Kernel Changes

  • Performance
    • Footprint reduction
    • Memory optimizations
    • Working set management improvements
    • Perftrack
  • Power efficiency
    • Core Parking
      • Trying to make cores going to sleep if they are not needed
    • Unified Background Process Manager
    • Timer Coalescing
    • Tick Skipping
  • Reliability
    • Fault Tolerant Heap
    • Process Reflection
    • Native VHD
      • Ability to mount and manage VHDs
      • Boot-from-VHD
    • Scalability
      • Simultaneous Multithreading Improvements
      • User Model Scheduling
      • Support for > 64 logical processors
      • Lock removal, including PFM, dispatcher locks
  • Security
    • New UAC operating models
    • Managed Service accounts
      • Allows a service to run isolated form other services
    • Bitlocker-to-go
      • Extends the  previous versions in order to encrypt USB disks and we can use it in any other OS since it launches the Bitlocker-To-Go plugin in order to get access to the elements of the USB disks
    • Windows Biometric Framework
    • App Locker
    • Auditing improvements
      • New Object global auditing in order to get information about why the user has or doesn’t have access to same information
More Posts Next page »