Architecture related blurbs and snippets

A collection of blogs on varying technologies that drill into a specific issue or question.

  • Posting you WebSlice, Accelerator or Visual Search to the IE Add Ons site

    IE 8 makes it simple to create great add on experiences for users. Specifically, a site can provide web slices, accelerators and visual search. If you want to learn more about these features look here.

    I have heard a number of stories where people have written an add ons for IE 8 but then they have trouble posting them to the site http://ieaddons.com. In this post I will step you through the process so you can quickly make your add on available for download.

    Joining the Site

    After navigating to http://ieaddons.com you need to create a user ID on the site. If you have not signed in before you click the Join link in the upper right corner. On this page you fill out the form entering the Username, password and email address. Of course you need to agree to the Terms of Use then you just click the sign up button. It’s that easy and you don’t even need to use a Windows Live account. : )

    Logging In

    If you already have an account created you can just click the Sign In link in the upper right corner and enter your credentials.

    Posting Your Add On

    Once you are logged in you will see your login ID in the upper right corner. Click that link and you will go to a page with an Upload Now button. Click that button and it will bring up a form. You need to fill out each of the fields so that your add on will be displayed in the gallery and available for download from the site. In the following section I will try to map each field to how it is displayed when the add on is displayed on the site and also provide some guidance on the kind of information expected. Once you submit your add on it goes through a review with some Microsoft personnel. If they find any of the fields lacking they will go to your homepage and look for more information.

     

    Name              This is the name of your add on. The name needs to be 40 characters or less and it is the title that is displayed. The name should have your site name and a few words that describe its function. Examples, Weather from Bing, MSN Headlines, AOL Mail Web Slice…
    Tagline           This is a short sentence that tells the users what function the add on provides. Examples; Get weather updates from Bing with this Slice, Preview you AOL Mail.
    Description     If the user clicks on the Name or Image for your add on they go to a details page. The description is displayed on that page. Your description should build on your tagline and provide more detail. It is important that after reading your description a user knows what your add on does and what value they would get from using it. If it is specialized you should provide background to further clarify its use. For example, if my accelerator provides a search for aglets I should make a note that an aglet is the little tip on the ends of a shoe lace.
    Homepage URL This is the URL for your homepage. They user should be able to click on this page and see the site that will be serving the content and services for the add on.
    Upload a screenshot   Just like on the online dating sites, providing a picture gets you a lot more responses. The screenshot can be a shot of the add on in action or your sites logo or any other image you think best illustrates your add on.
    Language                    This is the (spoken, not programming) language that your add on uses.
    Type                            In order to be displayed in the correct part of the gallery you need to specify the type of add on.

     

    The following screenshots show you how the fields you entered are displayed.

    clip_image002

    clip_image004

    I hope this provides clarity for those that need it. Take care and start uploading!

  • What an Architect Should Know About Smooth Streaming

    The purpose of this blog is to not get into the technical details of Smooth Streaming but to help architects understand what it is, what you need to implement it and its immense benefits.  For mor technical details look here.

    Background

    For any application that allows a user to view video there is a fundamental decision that the architect has to make; to stream the media or to do a progressive download.  To restate the high level differences they are as follows:

    Streaming

    ·         Specialized media servers are used to broadcast the media.

    ·         Allows users to Play, Pause, and move through the video. 

    ·         Runs on specialized ports to can pose firewall issues.

    ·         Provides a high quality viewing experience. 

    Progressive Download (think the Youtube experience)

    ·         The media file is downloaded to the client via a web server.

    ·         Easily works over port 80 so no firewall issues.

    ·         Can leverage edge servers and cache services.

    ·         Less expensive then streaming.

    ·         This is the Youtube approach so the user can get many pauses while the player buffers the content.

    Why is Streaming More Expensive

    Streaming requires a state-full connection between the client and the media server.  Each media server only has a certain amount of capacity so scaling is achieved by adding extra servers.  Progressive downloads on the other hand treat the media as a file.  What this means is that the files can be spread out on edge servers at a CDN and served from there.  Typically, CDN’s provide these services more economically then hosting the services yourself. 

    Introducing Smooth Streaming

    Microsoft has created a new technology called Smooth Streaming (or Smooth HD) which allows adaptive streaming of Silverlight content over HTTP.  What this means is that the video file can leverage edge servers and cache services plus the Smooth streaming clientwill automatically detect the clients bandwidth and hardware capabilities and adjust the video quality to give them the best experience.  So, if the bandwidth is low the client will request the lower bitrate version of the subsequent files. 

    The following is what you need to deploy:

    Microsoft Expression Encoder 3

    Expression Encoder 3 (or you can use Expression Encoder 2 SP1) is used to encode the file to the appropriate bitrate and then to break the file into many small files.  These files are deployed to a share that is accessible to the IIS web server.  You may choose to encode the video in 720p HD quality and then again at a lower resolution.  As stated earlier, smooth streaming will determine the best video quality for the client and send those encoded files.  Other vendors have adapted their encoders to support smooth streaming and will be announced soon. 

    IIS 7

    You need an IIS7 web server to serve and manage the video content. 

    IIS Media Services 2.0

    Microsoft has created an extension for IIS named “IIS Media Services 2.0”.  It can be downloaded from here and note that if you don’t want to use the Web Platform Installer then you can click on the x86 or x64 links obviously selecting the appropriate one for your platform.  IIS Media Services 3.0 is currently in beta and adds the ability to use smooth streaming with live events.  BTW: this is a free download.

    Silverlight

    Use the MediaElement element in Sivlerlight.  If you are using Expression Encoder it gives you the ability to generate a player.  You can then change the generated xap file to a zip (just change the extension) and pull out the AdaptiveStreaming.dll.  The details on implementing it into your code are here.  Yes, you do need to do some coding, unless of course you use the player generated by Expression Encoder. 

     

    Summing Up the Benefits

    By implementing smooth streaming you gain the benefits of:

    ·         It being cheaper to deploy and operate.  The broken up files can be served for the cheap edge servers at CDN’s.  Also, imagine a 2 hour movie.  If after 10 minutes the user seeks to 1 hour into the movie then the server jumps to the files that make up the one hour mark and forward and serves them.  Since the files seeked past are not served you save bandwidth charges. 

    ·         Better scalability because the media is really just small files.  If you take image files on a CDN as an example they scale so well because the image files are distributed all over the CDN’s network on cache servers.  The cache servers are super fast and cheap.   Your media files are treated the same way.  The small media files are cached throughout the CDN on the edge servers and served up to the clients. 

    ·         better customer satisfaction due to the better video experience. Imagine your users never seeing a spinning circle that tells them the video is buffering!

    ·         your users have fast start up and the ability to seek within videos

    ·         as a users circumstances change (such as reduced bandwidth) the bitrate can change to give the user a seamless experience

  • MSDN Developer Conference

    For those of you who could not attend the PDC in person the MSDN Developer Conference is out on the road and coming to a city near you!  The following is the schedule:

    Date

    City

    12/9/08

    Houston, TX

    12/11/08

    Orlando, FL

    12/16/08

    Atlanta, GA

    1/13/09

    Chicago, IL

    1/13/09

    Minneapolis, MN

    1/16/09

    Washington, DC

    1/20/09

    New York, NY

    1/22/09

    Boston, MA

    1/22/09

    Detroit, MI

    1/26/09

    Dallas, TX

    2/19/09

    San Francisco, CA

     Registration is $99 for a full day of learning.  Check out http://www.msdndevcon.com/Pages/start.aspx for the up to the date agenda and to register. 

     

  • A Roadmap of emerging Microsoft Technology


     

    Introduction

    It can be challenging to keep up with the new developer tools that Microsoft has either recently released or that are in development.  The following blog is a summary of information that I collected from various sources.  I hope it helps.  This document was written September 12, 2007 so the content will become outdated quickly as new products and technologies are announced. 

     

    .Net 3.0  (WinFX, NetFX3)

    When It Ships

    Ships with Vista and Longhorn server.  Available as free download for Windows XP SP2 and Windows 2003.    Released 11/6/2006

    What It Is

    Includes all of 2.0 Framework.  There are 4 major functional areas that are added to the framework. 

    They are:

    Windows Presentation Foundation (AKA: WPF, Avalon)

                     The new graphical subsystem for Windows that is routed directly through Direct3D. 

                    Why It’s Important

    ·         Provides very clear line of demarcation between the User Interface and Business Logic.

    ·         Unifies UI, 2 dimensional drawing , 3 dimensional drawing,  vector graphics, animation, raster graphics (i.e. bitmaps), audio and video.

    ·         Provides greater performance then previous versions.

    ·         WPF applications can run on desktop or web browser.

    Windows Communication Foundation  (AKA: WCF, Indigo)

    Unified framework for building distributed applications.

    Why It’s Important

    ·         Unified programming model for communication

    o   ASMX – for interop with other platforms

    o   Attribute based programming – For enterprise services

    o   WS-* Protocol support – WSE

    o   Message Oriented Programming

    o   .Net Remoting – Extensibility location transparency

    ·         Integrated into VS 2005 (intellisense, templates and debugging)

    ·         Works with Contracts which is agreement with client on the:

    o   Operations the service can perform

    o   The data structure

    o   The structure of the message on the wire

    ·         Communication is config based so easy to change the protocol/transport

     

     

    Windows Workflow Foundation (WWF)

    The programming model, engine and tools for quickly building workflow enabled applications.

     

    Why It’s Important

    ·         Provides a framework for creating sequential workflows, state machines and a rules engine.

    ·         Provides a graphical interface for creating the workflows.  Graphical interface is programmable so developer can host it in their own application. 

    ·         Provides default services for Tracking progress, persistence, thread management and transactions.  All services are extensible so developer can write their own.

    Windows Cardspace (AKA: InfoCard)

    Enables users to provide their digital identities in a familiar, secure and easy way.   Main features are:

    ·     Support for any digital identity system

    ·     Consistent user control of digital identity

    ·     Replacement of password-based Web login

    ·     Improved user confidence in the identity of remote applications

    Why It’s Important

    ·         Protects users from being vulnerable to phishing attacks and spoofed websites.

    ·         Extendable model that allows developers to create custom Identity Providers.  Currently developer must authenticate the user with one or more of the following; user ID and password, Kerberos tickets, X509 V3 certificates or SAML security tokens.

    ·         Built on top of WCF.

     


     

    .Net 3.5

     

    When It Ships

    Ships with Visual Studio 2008 (Code named Orcas).    Targeted for end of 2007, early 2008

    What It Is

    .Net 3.5 is the latest version of the .Net framework.  In addition to many enhancements it provides new WS-* support and built in LINQ support.

    It will run on Windows 2003, Windows XP , Vista and Longhorn.

    Enhancements

    ·         AJAX is built into the .Net framework 3.5 , previous versions required separate downloads.   AJAX support is built into VS 2008 (automatic update of web.config,  server controls in toolbox). 

    ·         Tighter integration between WCF and WWF.  Provides new activities to support WCF.

    ·         Simplified publishing through RSS or ATOM

    ·         Performance improvements

    ·         Improvements in the GC

    ·         64 bit client improvements

    ·         New templates for web services, wcf, AJAX and WPF

    ·         Powerful Office development via VB.Net and C# (instead of only VBA).

     

    LINQ (Language Integrated Query)

    ·         Provides a structured way to query collections  such as arrays, enumerable classes, XML, datasets from relational databases and third party data stores.  Any third party data store can expose their data to LINQ by implementing an interface.

    ·         The query is done directly from code written in C# or VB. 

    ·         Deeply integrated into programming languages and framework.

    ·         A powerful addition to the .Net framework that simplifies doing DB and XML queries using C# and VB.

     

    WS-*

    The following OASIS specification ws-* standards  were added

    ·         WS-AtomicTransaction  V1.1

    ·         WS-ReliableMessaging V1.1

    ·         WS-SecureConversation V1.1

    ·         WS-Coordination V1.1

     

    SilverLight 1.0

    When It Ships

    Shipped 9/5/2007

    What It Is

    Microsoft® Silverlight™ is a cross-browser, cross-platform plug-in for delivering the next generation of .NET based media experiences and rich interactive applications for the Web. Silverlight offers a flexible programming model that supports AJAX, VB, C#, Python, and Ruby, and integrates with existing Web applications. Silverlight supports fast, cost-effective delivery of high-quality video to all major browsers running on the Mac OS or Windows.   Support for Linux was announced on 9/5/2005.

    Version 1.0 provides javascript based coding for the browser side code.  Support for building Silverlight applications built into VS 2008.

    Silverlight 1.1

    When It Ships

    TBD

    What It Is

    Version 1.1 provides a subset of the .Net 3.5 framework that is downloaded to the browser one time and that is sandboxed.  Developers write client side code in a .Net language.  The compiled code is served by the web server and run on the browser.  This allows developers to write code behind pages for Silverlight applications.  Support for building Silverlight applications built into VS 2008.

     


     

    Microsoft Expression

    When It Ships

    Currently shipped.  New versions are being released with strong support for Silverlight applications.

    What It Is

    A suite of products for developing rich content.  Products in suite are:

    Microsoft Expression Web

    A professional design tool to create modern, standards-based sites that deliver superior quality on the Web.  Expression Web provides seamless integration with Visual Studio 2005 and ASP.NET 2.0, enabling designers and developers to interact using products that they are most comfortable with. Designers can easily lay out XHTML, CSS, JavaScript, and basic dynamic functionality using Expression Web and take advantage of many ASP.NET 2.0-specific features like Master Pages for templating, and drag and drop controls. The project can then be handed over to developers using Visual Studio 2005, enabling them to extend the functionality through advanced server-side code and business logic.

    Microsoft Expression Blend

    The professional design tool to create engaging web-connected experiences for Windows. Microsoft® Expression Blend is a professional design tool to create compelling user experiences and applications for Windows using the new .NET Framework 3.0 (which includes the Windows Presentation Foundation). With the .NET Framework 3.0, designers and developers can work collaboratively to build visually stunning Windows applications that deliver a superior user experience and enhance user productivity and satisfaction. .NET Framework 3.0 includes the Windows Presentation Foundation, which introduces XAML (Extensible Application Markup Language), a markup language for describing application user interface, documents, and media content. XAML serves as a back-and-forth communication format which designers and developers can use to directly exchange and collaborate on applications created using both the Expression Studio and Visual Studio.

    Microsoft Expression Design

    A professional illustration and graphic design tool that lets you build compelling elements for both Web and desktop application user interfaces. Expression Design can be used together with other products in the Expression Studio, principally with Expression Blend for a end-to-end XAML based design workflow. Expression Design features an advanced XAML Export feature which allows design elements to be exported directly to XAML format, which can then be integrated with Expression Blend, Visual Studio, and other professional design and development tools for further elaboration and implementation within an application or website's user interface. Expression Design can import the following formats:.psd, ai, .jpg, .bmp, .png, .gif, .tif, .ico and .wdp (Windows Media Photo) files. Expression Design can export the following formats:.psd, .jpg, .bmp, .png, .gif, .tif, wdp, .pdf, and .xaml. Additionally there is support for copy/paste to Microsoft Office, and copy/paste of XAML to Expression Blend and other XAML editors.

    Microsoft Expression Media

    Expression Media is a professional digital asset management tool to visually catalog and organize all of the elements associated with your creative workflow. Expression Media is the newly announced member of the Expression family, and is based on the iView MediaPro product acquired by Microsoft in June of 2006. Expression Media is for creative professionals and anyone else with the need to quickly and easily import, organize, search, annotate, repurpose and archive digital files.. Expression Media is for creative professionals and anyone else with the need to quickly and easily import, organize, search, annotate, repurpose and archive digital files.Expression Media is for creative professionals and anyone else with the need to quickly and easily import, organize, search, annotate, repurpose and archive digital files. A feature of the Windows version of Expression Media, the Expression Encoder is designed to streamline the enhancement and publishing of video assets for cross-platform viewing on the Web with Silverlight*. With Expression Encoder, you can import, crop, and enhance video from multiple sources, add metadata, markers, overlays, and more. Create custom jobs and templates for automated publishing, or use powerful command-line features to integrate into your existing workflow - even on the server.

    Microsoft Media Encoder

    Expression Encoder offers enhancement, encoding, and publishing of rich video experiences with Microsoft Silverlight. Convert and compress multiple video formats to SMPTE standard VC-1 video for mobile, web, and HD video scenarios. For streamlined workflow, create branded templates with Expression Blend, and encode on the desktop or server to guarantee a consistent viewing experience on Windows, Mac, and devices. Expression Encoder is an application that is included with the Windows version of Expression Media.


     

    SQL Server 2008 (AKA:  Katmai)

     

    When It Ships

    TBD

    What It Is

    This is the next version of SQL Server.  The major features are

     SQL Server Always On Technologies

    Provide near zero downtime.  Data management will be self tuning, self organizing and self maintaining. 

    Better support for unstructured and semi-structured data

    SQL Server can be provide storage for different data such as XML, files, dowuments, email,…

    Declarative Management Framework

    Allow declarative configuring of policies and constraints on DB and/or tables.

    Resource Governor

    Resources can be reserved for certain users or workflows.

    Reporting Services Enhancements

    Integration of data virtualization products from the company Dundas Data Virtualization, which Microsoft acquired.


     

    Windows Server 2008 (LongHorn)

    When It Ships

    First quarter 2008

    What It Is

    Next Windows server.  Product highlights include:

    Built for the Web

    Simplify Web server management with Internet Information Services 7.0, which is a powerful Web platform for applications and services. This modular platform provides a simplified, task-based management interface, greater cross-site control, security enhancements, and integrated health management for Web Services.

    Internet Information Server (IIS) 7 and .NET Framework 3.0 provide a comprehensive platform for building applications that connect users to each other and to their data, enabling them to visualize, share, and act on information.

    Virtualization

    Virtualize multiple operating systems - Windows, Linux and others - on a single server. With virtualization built into the operating system and with simpler, more flexible licensing policies, it’s now easier than ever to take advantage of all the benefits and cost savings of virtualization.

    Windows Server 2008 provides you with the flexibility to create an agile and dynamic datacenter to meet your changing business needs.

    Terminal Services Gateway and Terminal Services RemoteApp are designed for easy remote access and application integration with the local desktop, enabling secure and seamless application deployment without the need for a VPN.

     

    Security

    Windows Server 2008 is the most secure Windows Server ever. Its hardened operating system and security innovations, including Network Access Protection, Federated Rights Management, and Read-Only Domain Controller, provide unprecedented levels of protection for your network, your data, and your business.

    Windows Server 2008 helps protect against failure and intrusion for servers, networks, data, and user accounts.

    Network Access Protection gives you the power to isolate computers that don’t comply with your organization's security policies, and provides network restriction, remediation, and ongoing compliance checking.

    Federated Rights Management Services provides persistent protection for sensitive data; helps reduce risks and enables compliance; and provides a platform for comprehensive information protection.

    Read-Only Domain Controller allows you to deploy Active Directory Domain Services while restricting replication of the full Active Directory database, to better protect against server theft or compromise.

    A Solid Foundation for Your Business Workloads

    Windows Server 2008 is the most flexible and robust Windows Server operating system to date. With new technologies and features such as Server Core, PowerShell, Windows Deployment Services, and enhanced networking and clustering technologies, Windows Server 2008 provides you the most versatile and reliable Windows platform for all of your workload and application requirements.

    Server Manager accelerates server setup and configuration, and simplifies ongoing management of server roles via a unified management console.

    Windows PowerShell is a new command-line shell with more than 130 tools and an integrated scripting language that enables an administrator to automate routine system administration tasks, especially across multiple servers.

    Server Core is a new installation option for selected roles that includes only the necessary components and subsystems without a graphical user interface, to provide a highly available server that requires fewer updates and less servicing.

     

     

  • Windows Workflow Foundation Runtime Services

    A question I still get asked frequently is how Microsoft can call the Windows Workflow Foundations (WWF) framework a Workflow solution.  The short answer is it’s not.  It is a framework.  Microsoft’s workflow solution is BizTalk Server (BTS).  BTS is a complete solution that provides all of the functionality which is required in a workflow solution.  Actually, BTS is more than just a workflow solution but we’ll leave that for another blog.

    WWF on the other hand is a framework that enables a developer to develop their own custom workflow solution.  Microsoft is so invested in this framework that all product teams in Redmond need to use it for any workflow functionality in their future products.  Even the BTS team will rewrite their orchestration engine to be built on the WF framework for the next version.  Each product team will integrate the WF framework into their products and they will add any new activities that are specialized for their application. 

    A very compelling reason for developers to use WF is the price.  It’s free!  If a developer builds a solution using BTS or Webmethods then valid licenses of those servers need to be purchased for each machine that the application is deployed.  If you check the pricing on either of those products you will see that it can substantially increase the overall price tag for the solution. 

    Developing a solution using WF

    When creating an application using Workflow Foundation there are really three major development areas:

     

    Creating the Workflows

    This is creating the workflows either programmatically or using the designer UI. 

     

    Creating the Runtime Host

    WWF is a framework.  The developer needs to write code to host the workflow runtime engine.  Typically, this code is called the runtime host.   Ideally this code is re-used within an organization.

     

    Creating the Reporting Application for the tracking data (optional)

    Not all workflow scenarios warrant tracking but when they do it is important to create a reporting application to report on the collected data.

     

    There are a lot of great blogs and white papers on creating workflows.  For the rest of this blog I am going to talk about the runtime host and the runtime services. 

    Workflow Runtime, Runtime Host and Runtime Services

    The workflow runtime is in System.Workflow.Runtime.WorkflowRuntime.  As stated above, a runtime host is a process that programmatically instantiates the workflow runtime and that then runs the workflow instances.  Microsoft will provide runtime hosts for their workflow enabled products and developers will often write their own based on the requirements of the application. 

    The workflow runtime is configurable and has default runtime services that are used to customize the characteristics of the runtime. 

    Workflow Runtime         Set of classes provided in the WF framework that provide everything to run instances of workflows.

    Runtime Host                    The custom code that configures and instantiates the Workflow runtime.

    Runtime Services            Additional services that are used to customize the behavior and provide features for the workflow runtime. 

    Runtime Services

    PersistenceService

    This service saves the current state of the workflow.  Examples of when this is useful include the host process being stopped or an activity that may take a long time getting a response, like waiting for an approval from a user.  In the first case if the state is not persisted then the state would be lost and the workflow would be terminated while in process.  In the second case it is desirable to unload the process from memory so that the resources are not held.  Once the user issues the approval the process would restart where it left off by getting the state from the persistence store.  A workflows state is persisted in a variety of ways that include the host application calling Unload, an activity configured to PersistOnClose or even a custom callback method called from the workflow.

    The default Persistence Runtime Service that is supplied with WF is SQLStatePersistenceService.  The state is stored ina SQL Server DB.  If you are going to use this you need to create the DB and run the scripts SQLPersistenceService_Schema.sql and SQLPersistenceService_Logic.sql provided at  <windows>\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\SQL\EN.  Remember that they must also be deployed to all the other environments that you will work in (QA, Prod Support, Production,…).

    The persistence service can be added to the runtime instance in two ways.  The first is programmatically using code like the following:

    WorkflowRuntime workflowRuntime = new WorkflowRuntime();

     

    SqlStatePersistenceService stateservice = new     

    SqlStatePersistenceService("Data Source=localhost;Initial

                Catalog=WFState;Integrated Security=True");

    workflowRuntime.AddService(stateservice);

     

    Or you can use a section in App.Config.

    <WorkflowRuntime Name="SampleApplication" UnloadOnIdle="true">

    <Services>

    <add

    type="System.Workflow.Runtime.Hosting.SqlStatePersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" ConnectionString="Data Source=localhost;Initial Catalog=WFState;Integrated Security=True;" />

    </Services>

    </WorkflowRuntime>

     

     Some things to note are:

    ·         If you are implementing this in an application that will run in the logged in users context you should review if user a SQL application account would be a better option.  If you use integrated security then the logged in user will need to have access to the persistence DB. 

    ·         The version will need to change if you use .Net 3.5

    ·         Setting these values programmatically, as in the example above, hardcodes them and would make deployment to other environments a nightmare.  Consider storing the values in an XML file or DB so they can be easily changed.

    Some other attributes that can be defined are:

    OwnershipTimeoutSeconds                        Setting this tells other blocks other workflows from loading the instance for the specified period of time.     

    UnloadOnIdle                                                    When true the service will persist the workflow and unload it from memory.

    LoadIntervalSconds                                        Tells the service how frequently to check for expired timers in the workflow.

    EnableRetries                                                    When true tells the service to retry persisting a workflow if it fails.  The default is true.  The runtime throws an exception and the host would need to catch and handle it.

     

    Tracking Service

    The tracking service is used to track the activity in the running workflows.  The default tracking service that is provided with WF is SQLTrackingService and this, like the persistence service, requires a SQL Server database.     If you are going to use this you need to create the DB and run the scripts Tracking_Schema.sql and Tracking_Logic.sql provided at  <windows>\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\SQL\EN.  Remember that they must also be deployed to all the other environments that you will work in (QA, Prod Support, Production,…).

    The default behavior is to catch all events from a running workflow so the developer can create custom tracking profiles.  A tracking profile tells the service what events to capture and to ignore the rest.  They can be created programmatically or as an XML document.  They need to be inserted into the tracking database after they are created in order to be used.  The database provides the stored procedure UpdateTrackingProfile to accomplish this. 

     

    Adding the tracking service to the runtime programmatically is the same as with the persistence service except you use SQLTrackingService instead of SQLStatePersistenceService. 

    Adding it through App.Config is also the same except there are different attributes to set.

    PartitionOnCompletion                                 Partioning the DB provides an efficient method to archive and delete tracking records.   Seting this makes the portioning happen at the end of every workflow.  Use this for tracking databases that have no scheduled downtime.  If this is not set then you need to run manual jobs that will lock records so they need to run during scheduled downtime. 

    EnableRetries                                                    If this is set then record writes to the transaction DB will retry if they fail.

    ProfileChangeCheckInterval                       The tracking profile can be changed at any time and updated in the DB.  The interval set here is used by the tracking service to know the frequency to check for changes to the tracking profile.  If it detects an update then an event is fired and the new profile is loaded into the profile cache and used.

    UseDefaultProfile                                            If true then workflows that do not have a tracking profile will use the default profile. 

     

                                                                                   

     

    Transaction Service

    There are 2 transaction services that come with the WF framework. 

     

    DefaultWorkflowCommitWorkBatchService is the default service used unless otherwise specified.  What it does is enable the registering of a delegate so that the Transaction service will call back into a method in the workflow host and allow the developer to add custom code.   The WF framework does not allow the developer of the runtime host to create their own transactions so they need to customize through this method. The transaction service is responsible for creating transactions for the persistence DB and the Tracking DB if they are on different servers and/or have different connections.

     

    If the Tracking and Persistence database are on the same server and share the same connection then use SharedConnectionWorkflowCommitWorkBatchService. 

     

    These can be added either programmatically or through the App.Config file.   The attribute EnableRetries when set to true tells the service to retry the commit in case of failure.

     

    Threading  Service

    There are two scheduler services.  One allows workflows to run asynchronously and the other runs them synchronously.

    To run them asynchronously use the DefaultWorkflowSchedulerService.  When the runtime host starts a workflow the request is put in an internal queue.  The scheduler service acquires a thread from the .Net framework thread pool.  If there are no threads available then the workflow waits in the queue until a thread becomes available.  It is important to note that it is possible for the .Net thread pool to starve.  Transaction objects use the .Net thread pool so thread starvation could cause timeouts for the persistence service.

    The ManualWorkflowSchedulerService forces the workflow instance to be run on the host instances thread so the host application is blocked until the workflow instance completes or becomes idle.  This method is recommended when it is important to conserve the .Net thread pool, specifically when a workflow is instantiated by ASP.Net.

     

    Writing Custom Runtime Services

    All services provide abstract classes that a developer can inherit from and implement.  This allows the developer to implement whatever their application calls for. 

  • Application Infrastructure and MOSS 2007

    Last week I was asked to elaborate on what the application infrastructure would look like for a brand new MOSS 2007 initiative.  Typically I would learn what the clients existing IT infrastructure looked like and would then show how MOSS 2007 would fit within it.  In this case I was asked to assume that they were running Windows Servers and I should just plug in Microsoft Software in the appropriate places, basically to think of it as green fields. After thinking about it I decided that MOSS 2007 could actually serve multiple roles in the effort.  Their primary goal was to use the Web Content Management (WCM) features of MOSS to allow content authors to rapidly create and publish content to their public websites.  They would have many sites all using the same code base (master files, content types, page layouts,...)  so there would be a full development effort that would require collaboration from both partners and different groups within their organization. 

    Microsoft offers a complete set of products that integrate together and satisfies the entire application lifecycle.  When used in conjunction the tools speed development, reduce defects and decrease management and operation costs.  The following are those tools mapped to the different phases of an application’s lifecycle. 

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Portal Environments

    Portal applications have proven themselves to be increasingly valuable and versatile.  It is common for there to be at least 3 different portal environments that are used to support an application.  The following discusses the three environments and their basic architecture.

    NOTE:  The use of MOSS 2007 does not dictate a particular network topology.  Actually, MOSS 2007 is very flexible and allows each corporation to dictate their own architecture requirements.  For the purposes of the following illustrations a common topology was used.

    Application Lifecycle Repository

    This instance is used as a repository for all application lifecycle documents.  Examples include Project Plans, Architecture documents, Corporate Best Practices documents, Vendor documentation…  This environment typically has restricted access and is configured to be securely accessible both from the intranet and the internet to facilitate collaboration with partners and vendors. 

    Content Authoring Environment

    This is the environment where content authors and approvers do their work.  After content is submitted it goes through a workflow for approval.  The last step of the approval process is to submit it to a staging server.  On a managed basis approved content is moved from staging to production.  This environment is typically configured to be securely accessible both from the intranet and the internet to facilitate collaboration with partners and vendors. 

    Production

    The Production environment is where all approved content is made accessible to the users.  Often in a public internet scenario this environment is accessible to all.  If required this can be locked down with user accounts and forms based authentication.  

     

    Application Lifecycle Repository

    This environment allows collaboration between domain members on the corporate network, domain members connecting remotely and partners that do not have domain membership.  This environment is typically used as a repository for all documents related to the development lifecycle.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    In this architecture:

    1.       Users on the corporate(Enterprise) domain use NTLM to authenticate to the application

    2.       When corporate users connect remotely (through the internet) they authenticate against an ISA server instance.  ISA authenticates against the domain controller and then presents the security token to the web site, logging them in.  There are many other solutions to remote access including VPN, SecureID, RSA, ….

    3.       ISA also acts as a reverse proxy to provide a layer of abstraction between the internet and the web application.  It can also be used for intrusion detection and restricting the sites in the DMZ that a user can see. 

    4.       Partners connect through the internet and use forms based authentication.  Since these users are not in the AD they are stored in a SQL repository (any repository will work such as ADAM, Oracle, Sun LDAP Server,…).

    5.       The web site itself would have different Shared Services Providers for employees and for partners.  This will allow granular control over what each group can access.  For example, partners can be restricted to only seeing content that they created whereas corporate users can be configured to see everything.

    6.       Windows Identity Lifecycle Manager provides automatic synchronization of user accounts, roles and passwords in the enterprise.  A common example is when a new employee is hired.  After their HR record is created in the ERP system a record is sent to the Identity Manager server.  It would then launch a workflow that would create the domain account, the email account, place them in all the appropriate domain groups, create their phone extension and vmail box and in this case grant them the appropriate roles within MOSS.  Identity manager can also be used create the partner accounts in the external user SQL database. 

    Content Authoring Environment

    Once the site(s) are live then the content will need to be managed (i.e.  Adding new content, updating existing content and deleting old content).   Both partners and employees connect to the Authoring environment in the same manner as defined in the application lifecycle repository. 

     

     

     

    When content is approved is it deployed to the Staging environment.  In this scenario, the staging environment is the place where the final approvers get to review the content before releasing it to production.  Due to the restricted nature of this environment only employees on the corporate network that are in the appropriate roles can access this environment. 

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Production

    Production is the environment that is accessible to all users. 

     

     

     

    In this environment administrators deploy the content from the staging server to Production.  The production server allows anonymous access so there is no authentication done.  If authentication is required then the model used to allow partner’s access could be employed.

    In this scenario ISA server acts as a reverse proxy.  This provides a layer of abstraction between the sites and the internet and it provides a strong caching mechanism that removes much of the load from the IIS, MOSS and SQL services.   Additionally, it provides strong intrusion detection capabilities.

  • Expression Blend 2 August Preview is Available

  • You want me to deploy what??? - Silverlight deployment

    So it’s a Monday morning and you find out that your company’s key decision makers had some meetings with a silver tongued Architect Evangelist in the Microsoft D&PE group and they want you to deploy their first SilverLight application in your data center so they can evaluate it.   Now you are tasked with figuring out just how to do that.

    I created a mini scenario using my laptop which is running Vista ultimate and has SilverLight 1.1 alpha framework loaded.    I pulled down the source code for the Video Library 1.1 sample from http://www.silverlight.net/samples/1.1/video-library/videolibrary.zip.  After unzipping it I deployed it locally and made sure everything ran fine. 

    As a next step I started a VM running Windows 2003 that had no Silverlight components loaded.  Actually it had no pre-production software of any kind on it, it was just a vanilla build.  I copied all the Video Library files and folders directly to the file system on the VM then opened the IIS MMC and under Web Sites I selected New->Web Site…  I created a new site called VideoLibrary that pointed to the folder containing the VideoLibrary application and started the site.

    I returned to my Vista machine, opened IE and navigated to http://myWin2003VM/default.html  .   Hmmm, nothing happened.  I checked the IIS log (\windows\system32\LogFiles) and I saw that when the Vista machine was requesting the XAML file it was getting back a 404 – file not found.  If you check out the article http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a6031732-b4e0-4b6c-b30b-e72350e5b693.mspx?mfr=true you see that  IIS 6.0 will only serve up content that has a mime type definition.   When I open the IIS Manager and check my web site’s MIME Types (VideoLibrary->Properties->HTTP Headers->Mime Types) I see nothing in the list.  That means it is using inherited the MIME Types.  When I check the Web Sites group I saw the same thing so I checked at the Root (machine) level.  There I saw a list of all the MIME Types that are defined and as expected, there was no definition for XAML.  I then went to my Vista machine where everything was running fine and checked the MIME Type for XAML and found that the setting that I needed to add to IIS 6.0 was

                    Extension = .XAML

                    MIME Type = application/xaml+xml

    In the IIS Manager in IIS 6.0 I right clicked my web site VideoLibrary and selected properties.   I selected the HTTP Headers tab and clicked the MIME Types button.   On that dialog I added the XAML reference.

    The other thing about downloaded types that seems noteworthy are dll’s.  Silverlight 1.1 actually downloads .Net dlls that your developers write and that run in the sandbox of the browser.  Typically we are used to a bin folder on the web site that hosts all the server side dlls and the last thing we ever want is for a user to type in a direct path to a dll and have it downloaded.  In the case of Silverlight that is exactly what we are allowing the happen.  The folder that contains the client side dlls (in this example’s case ClientBin) has READ checked.   Additionally, the ClientBin folder Properties-> Home Directory tab needs to have their Execute Permission set to either “None” or “Scripts only” because if you set it to “Scripts and Executables” then IIS will try to run the DLL on the server side.   If you set this property at the site level you can still override it at the folder level (i.e.ClentBin) so that everything works properly.

    Summary

    There are no new server side components to install to host SilverLight applications.  The only change is a configuration change.  For IIS 5.0 and IIS 6.0 you just need to add the proper MIME type configuration to the site.  There are other new mime types that you may need to configure depending on the features you need to deploy.   http://silverlight.net/forums/t/479.aspx and http://www.cjcraft.com/Blog/2007/05/08/HowToConfigureIIS50AndIIS60ToDeploySilverlightApplications.aspx have good information about configuring the server.  If you encounter an issue you can always check the IIS log and then look for a corresponding MIME Type in the IIS Manager. 

    I haven’t tried hosting this on Apache but I was assured that it works fine.   Again you would need to configure the mime types (http://httpd.apache.org/docs/1.3/mod/mod_mime.html#addtype) just like IIS but there are no special components that need to be deployed. 

  • Let me introduce myself

    Hi,  my name is Jim Cirone.  I have spent the last 10 years working in Microsoft's services division in the New York/New Jersey area but have recently switched over the the Developer and Platform Evangelism group as an Architect Evangelist.  I will be out meeting with developers, users and clients showing them all the new web related products and the benefits of using them.  I will also be helping the team answer questions in the developer community and sharing any interesting information that I come across.  My specialty area is application infrastructure so alot of my postings will be within that broad topic. 

    I am working on my first technical blog now and should have it up before the weekend. 

     Thanks,

     Jim

     


© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker