WF http://rickgaribay.net/category/42.aspx WF en-US Rick G. Garibay rickgaribay@hotmail.com Subtext Version 1.9.5.176 Windows Server AppFabric Cookbook is Out! http://rickgaribay.net/archive/2012/07/26/windows-server-appfabric-cookbook-is-out.aspx <p>I'm very pleased to announce the release of my new book "Windows Server AppFabric Cookbook" which hit distribution today, July 26, 2012. <a href="http://www.packtpub.com/microsoft-windows-server-appfabric-cookbook/book"><img style="margin: 5px; display: inline; float: right" alt="Microsoft Windows Server AppFabric Cookbook" align="right" src="http://www.packtpub.com/sites/default/files/4187EN_Microsoft%20Windows%20Server%20AppFabric%20Cookbook.jpg" width="357" height="454" /></a></p> <p>Before I get into the details of the book, I want to start by thanking my co-author and friend <a href="http://twitter.com/HammadRajjoub">Hammad Rajjoub</a> for inviting me to participate in this project and trusting me to help carry out his vision for this book. Hammad and I both share a labor of love as it applies to the Microsoft distributed technology stack affectionately (and somewhat nostalgically) known as "Connected Systems" and this project represents nearly a year of work in bringing our collective experience to bear in this book. </p> <p>I would also like to express my appreciation to Adnan Masood and Zubair Ahmed who volunteered their time despite extremely busy schedules reviewing the book as it progressed and providing very valuable technical feedback along the way. Their time and dedication has contributed immensely to the quality of the book and any errors or things we've overlooked are our fault alone. </p> <p>Last but not least, I'd like to thank Ron Jacobs at Microsoft for writing the foreword to the book and providing his support and encouragement along the way.</p> <p><strong><font size="3">Why this book and why now?</font></strong></p> <p>It's hard to believe that Dublin has been in the wild for just over 2 years. The first release of <a href="http://www.microsoft.com/en-us/server-cloud/windows-server/appfabric.aspx">Windows Server AppFabric</a> went to GA in June, 2010 at TechEd in New Orleans (I remember how much fun I had demoing the features at the Microsoft booth during my shifts that seemed to fly by) and signaled an exciting shift in Microsoft's middleware strategy that continues today. Late last year, Microsoft added new caching features and made some branding changes to "<a href="http://msdn.microsoft.com/en-us/windowsserver/ee695849.aspx">AppFabric 1.1 for Windows Server</a>" to align with the the next wave of on-premise capabilities which further extend and build upon the Windows Server platform. Just last week, two new capabilities have shipped in beta which compliment AppFabric on premise: <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30376">Service Bus 1.0 Beta for Windows Server</a> and <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30369">Workflow 1.0 Beta for Windows Server</a>.</p> <p>Hammad and I are fortunate to have both worked very closely with Microsoft during the development of "Dublin", participating in software design reviews and early incubation initiatives. Since its release just over two years ago, we've advised customers of all shapes and sizes and fielded these capabilities in countless projects across various verticals. And herein lies the mission of this book: </p> <blockquote> <p><em><strong>To provide practical, real-world guidance for making the most of the capabilities offered by Windows Server AppFabric and AppFabric 1.1 for Windows Server based on our collective experiences in the field over the last two years since it's release. </strong></em></p> </blockquote> <p>The result (we hope) is not just a book, but a field manual chock-full of practical step-by-step, real-world guidance, tips and techniques that will help you build more maintainable, scalable, reliable, and secure service-oriented applications on the Windows Server Platform today. </p> <p><strong><font size="3">What is Windows Server AppFabric/AppFabric 1.1 for Windows Server?</font></strong></p> <p>Windows Server AppFabric is an extension of the Application Server Role on the Windows Server Platform. In a nutshell, Windows Server AppFabric frees Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Service developers from common infrastructure plumbing by providing a robust, secure, composable, and reliable platform which provides caching, hosting, and monitoring capabilities, including support for long running workflow services, all on the Windows Platform. As such, Windows Server AppFabric is an evolution of the Windows Server platform, providing essential building blocks for first-classing WCF (for code-based services) and WF (for declarative workflow services) that are built using the .NET Framework 4 and Visual Studio 2010. <br />As an extension to IIS and WAS, Windows Server AppFabric relies on IIS's proven capabilities for hosting and lifecycle management, adding additional useful capabilities for working with WCF and WF services. In addition, Windows Server AppFabric takes advantage of Windows Server's robust event tracing mechanism (also known as ETW). ETW provides optimized <br />and high-performing kernel-level instrumentation which greatly minimizes impact on the performance of WCF and WF services hosted in IIS with Windows Server AppFabric.</p> <p>Best of all, this key extension to the Windows Server Platform remains available <a href="http://www.microsoft.com/en-us/download/details.aspx?id=27115">free of charge</a>.</p> <p>Below are some helpful resources if you are interested in learning more:</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/windowsserver/gg675185"><font color="#ffc000">Developer Introduction to Windows Server AppFabric (Part 1): Hosting Services</font></a> </li> <li><a href="http://msdn.microsoft.com/en-us/windowsserver/gg675186"><font color="#ffc000">Developer Introduction to Windows Server AppFabric (Part 2): Caching Services</font></a> </li> <li><a href="http://msdn.microsoft.com/en-us/library/hh351389.aspx"><font color="#ffc000">Product Documentation</font></a> </li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=168906"><font color="#ffc000">Architectural Overview</font></a> </li> <li><a href="http://go.microsoft.com/fwlink/?LinkID=168903"><font color="#ffc000">Tutorials</font></a> </li> <li><a href="http://social.technet.microsoft.com/wiki/contents/articles/windows-server-appfabric-portal.aspx"><font color="#ffc000">AppFabric on the TechNet Wiki</font></a> </li> </ul> <p><strong><font size="3">Is this book for you?</font></strong></p> <p>If you are a developer who wants to avoid the same repetitive tasks when preparing your WCF and/or WF services for deployment, or an IT Pro who wants to avoid complex XML for configuring hosting and monitoring options for the services you manage, you will instantly benefit from Windows Server AppFabric.</p> <p>The book is over 400 pages long and includes over 60 recipes within 9 cohesive chapters:</p> <ul> <li><strong>Chapter 1</strong>, Installing Windows Server AppFabric, covers setting up your development environment to use Windows Server AppFabric. You'll learn how to install hosting, persistence and monitoring capabilities, including provisioning repositories, choosing the appropriate storage options, making changes to configuration after installation, and troubleshooting common (and not so common) installation issues you might encounter along the way. <br /></li> <li><strong>Chapter 2</strong>, Getting Started with AppFabric Caching, introduces Caching in Windows Server AppFabric, covering everything you need to get started with introducing this important capability to your composite applications and services. You will learn how to set up and use Caching using code and configuration options, as well as working with Caching within your applications. In addition, you'll learn how easily an existing application that relies on ASP.NET session state can immediately benefit from Windows Server AppFabric Cache, handling common error conditions, using PowerShell commandlets, and building a custom provider model. <br /></li> <li><strong>Chapter 3</strong>, Windows Server AppFabric Caching – Advanced Use Cases, builds on the concepts in the previous chapter, covering the use of Regions and Tags as well as choosing the right concurrency mode and establishing expiration, eviction, and notification policies. You will also learn advanced monitoring concepts including the use of performance counters, configuring high availability, and common troubleshooting techniques for getting the most out of Windows Server AppFabric Cache. <br /></li> <li><strong>Chapter 4</strong>, Windows Server AppFabric Hosting Fundamentals, introduces Windows Server AppFabric's hosting capabilities, covering common deployment, management, and hosting scenarios. You'll learn how to host WCF SOAP and REST services as well as simple WF services along with a number of tips and tricks for moving beyond the service template defaults. <br /></li> <li><strong>Chapter 5</strong>, More Windows Server AppFabric Hosting Features, covers additional hosting topics, including supporting long-running WF services, how your services can benefit from the Auto-Start feature, properly hosting WCF services that take advantage of Windows Azure Service Bus Relay bindings for enabling modern, hybrid scenarios as well as common PowerShell commandlets for scripting many of the tasks covered in this and the previous chapter. <br /></li> <li><strong>Chapter 6</strong>, Utilizing AppFabric Persistence, provides ample coverage of Windows Server AppFabric persistence capabilities, including configuring persistence for WF services, working with multiple persistence stores, and developing instance store, control, and query providers. This chapter also provides an in-depth walkthrough of development and configuration of custom instance, control, and query providers. <br /></li> <li><strong>Chapter 7</strong>, Monitoring Windows Server AppFabric Deployment, provides an introduction to <br />the monitoring capabilities provided by Windows Server AppFabric. Topics include collecting and viewing events from WCF and WF services, enabling tracing and configuring tracking profiles, and leveraging PowerShell cmdlets for monitoring WCF and WF services as well as the Caching service. In addition, you'll learn how to surface monitoring information to any user experience by following the sample recipe for building a custom monitoring dashboard using ASP.NET MVC and OData. <br /></li> <li><strong>Chapter 8</strong>, Scaling AppFabric Hosting, Monitoring, and Persistence, covers a common scenario for scaling Windows Server AppFabric across multiple IIS hosts. You will learn how to prepare two hosts for clustering using Microsoft NLB as well as understand deployment, management, and administration of a multi-host Windows Server AppFabric deployment that shares a common, centralized persistence store. <br /></li> <li><strong>Chapter 9</strong>, Configuring Windows Server AppFabric Security, covers what you need to know about planning and implementing a security model with Windows Server AppFabric. You will learn how to secure the caching, persistence, monitoring, and eventing (via ETW) subsystems of Windows Server AppFabric. </li> </ul> <p>If you've gotten this far, I sincerely appreciate your interest and hope you’ll consider purchasing our book ;-)</p> <p>The book is available in print and across most digital formats including Kindle, Nook, etc.:</p> <p>Packt is running some specials on the book which you can learn more about here: <a title="http://www.packtpub.com/microsoft-windows-server-appfabric-cookbook/book" href="http://www.packtpub.com/microsoft-windows-server-appfabric-cookbook/book">http://www.packtpub.com/microsoft-windows-server-appfabric-cookbook/book</a></p> <p>The book is also available on <a href="http://www.amazon.com/Microsoft-Windows-Server-AppFabric-Cookbook/dp/1849684189/ref=sr_1_sc_1?ie=UTF8&amp;qid=1343337928&amp;sr=8-1-spell&amp;keywords=windows+server+appfabic+cookbook">Amazon.com</a>, <a href="http://www.amazon.co.uk/Microsoft-Windows-Server-AppFabric-Cookbook/dp/1849684189/ref=sr_1_1?ie=UTF8&amp;qid=1343337985&amp;sr=8-1">Amazon.co.uk</a> and <a href="http://www.barnesandnoble.com/s/windows-server-appfabric-cookbook?store=allproducts&amp;keyword=windows+server+appfabric+cookbook">Barnes and Noble</a> (if the book is not immediately available, I’m told by the publisher that all shipments are en-route so any shipping delays should be minimal).</p> <p>If you purchase the book, I'd love to hear from you. Please <a href="http://rickgaribay.net/contact.aspx">drop me a line</a> or connect with me <a href="http://twitter.com/rickggaribay">@rickggaribay</a> and let me know what you think. </p> <ul></ul> <p>References:</p> <ul> <li><a href="http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&amp;id=15848">Windows Server AppFabric 1.0</a></li> <li><a href="http://www.microsoft.com/en-us/download/details.aspx?id=27115">AppFabric 1.0 for Windows Server</a></li> <li><a href="http://www.microsoft.com/en-us/download/details.aspx?id=30376">Service Bus 1.0 Beta for Windows Server</a></li> <li><a href="http://www.microsoft.com/en-us/download/details.aspx?id=30369">Workflow 1.0 Beta for Windows Server</a></li> <li><a href="http://hammadrajjoub.net/2012/03/03/have-you-booked-your-copy-of-windows-server-appfabric-cookbook-yet/">Hammad Rajjoub’s Blog</a></li> <li><a href="http://blog.adnanmasood.com/2012/01/03/microsoft-windows-server-appfabric-cookbook-available-for-pre-order/">Adnan Masood’s Blog</a></li> <li><a href="http://soa-thoughts.blogspot.com/2012/04/more-cookbooks-microsoft-windows-server.html">Steef-Jan Wiggers’ Blog</a></li> <li><a href="http://jeremiedevillard.wordpress.com/2012/04/07/windows-server-appfabric-and-biztalk-cookbook/">Jeremie Devillad’s Blog</a></li> <li><a href="http://paulsomers.blogspot.com/2012/03/windows-server-appfabric-cookbook.html">Paul Somer’s Blog</a> </li> </ul><img src="http://rickgaribay.net/aggbug/340.aspx" width="1" height="1" /> Rick G. Garibay http://rickgaribay.net/archive/2012/07/26/windows-server-appfabric-cookbook-is-out.aspx Thu, 26 Jul 2012 22:12:56 GMT http://rickgaribay.net/archive/2012/07/26/windows-server-appfabric-cookbook-is-out.aspx#feedback 3 http://rickgaribay.net/comments/commentRss/340.aspx http://rickgaribay.net/services/trackbacks/340.aspx WCF, WF and WF Services V.Next http://rickgaribay.net/archive/2010/10/30/wcf-wf-and-wf-services-v.next.aspx <p>The Application Server Platform team (the team responsible for WCF and WF, who I affectionately still refer to as the Connected Framework team) has been hard at work on futures since before the release of .NET 4. And while the new feature area announcements made public today may not share the same spotlight as higher layers of the AppFabric onion, they are a welcome addition to the framework that continue to build on the theme of productivity ushered in the 4.0 release. </p> <p>No doubt, some of these features should have made it within 4.0, but others are careful tuning; the result of direct feedback from customers, developers, MVPs and Business Platform Technology Advisors for making a fantastic set of technologies for exposing and composing applications both on-premise and in the cloud even better.</p> <p><strong>WF</strong></p> <p>Developers who prefer C# (such as myself) will welcome the addition of C# support to WF expressions. In truth, while at first I balked at the omission, I became used to the VB syntax much in the same way that I accepted the light C-style syntax in the BizTalk Expression Editor. That said, if I had a dollar for every time I got a validation error for adding the impulsive semicolon after initializing a variable, I’d have a higher balance in my bank account.</p> <p>The community has protested about the absence of a State Machine Activity in WF 4 v1 ever since the first SDR when it’s omission was benevolently declared. However, the team has made this highly coveted activity available for evaluation in <a href="http://wf.codeplex.com/releases/view/43586" target="_blank">CTP</a> form for some time, and it sounds like it is getting further baked, though no suggestion was made that it would RTM out-of-band. </p> <p><a href="http://twitter.com/ronljacobs" target="_blank">@ronljacobs</a> did a nice job showing off the designer, and it appeared that there have been some enhancements to the UX since the CTP. <a href="http://wf.codeplex.com/"><img style="margin: 5px; display: inline" align="left" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=wf&amp;DownloadId=109464&amp;Build=17275" width="229" height="43" /></a>Additions such as compile-time semantic error checking (i.e. ensuring a state is connected to at least one transition state) and an intuitive composition experience whereby connections are made between states by simply nudging one state shape to the other and dropping a state on an existing connector to join the transition as an intermediary are very nice enhancements. Annotations, essentially the ability to add PowerPoint style comments on activities will be very helpful for scattering “WTF?’s”,  I mean comments :-) within workflows for documentation as well as aiding in design/code reviews. These essentially become declarative TODOs, which as Ron showed are searchable and clicking each annotation brings you to the activity which is tagged. A big kudos to <a href="http://twitter.com/mwinkle" target="_blank">@mwinkle</a> and team on this body of work as I know Matt has been working hard and actively soliciting and listening to the community and influencing investments based on this feedback for several months.  </p> <p>Speaking of activities, there are a number of very early non-control flow activites that made their first public appearance, including a set of data activities that make it easy to invoke SQL statements and stored procedures (ExecuteSqlQuery&lt;T&gt;, ExecuteSqlQuery and ExecuteSqlNonQuery). To be honest, I have mixed feelings about these activities. While you can certainly compose these activities within domain-specific activities, I think that they make it far to easy for developers to build kitchen sink outer activities that will have a tendency for abuse on the mainline. Of course, patterns alone don’t ship software, working software ships software, but just as I shudder to see references to System.Data in the business layer, the concepts of domain-specific encapsulation are really a key value proposition to declaratively orchestrating activities in a manner that reflects the intent of a workflow. Hopefully the guidance will remain to think about potential for reuse of every activity and consider taking advantage of the productivity benefits of these new data activities while not giving up intuitive composition. </p> <p>Interestingly, I am more comfortable with the SendMail activity, whose purpose is self-explanatory. Perhaps this is because unlike DAL-specific activities, I’ve written one too may SMTP code activities. In truth though, I will likely stick with my own for demo purposes because the PickupDirectoryLocation technique taught to me by my friend and fellow MVP <a href="http://twiter.com/milnertweet" target="_blank">@Milnertweet</a> of <a href="http://twiter.com/pluralsight" target="_blank">@pluralsight</a> fame is just plain wicked.   </p> <p>There are also a number of new Messaging activities coming that are reflective of Microsoft’s full embracing of REST style composition (more on that shortly) including an HttpGet, HttpPost, HttpPut and HttpDelete activity. These will offer a nice alternative to dropping down to a code activity to issue a GET or a POST,  making banging on an ODATA or POX feed easier than ever while allowing folks to debate the RESTfulness of their workflows in a fully declarative manner :-)</p> <p><strong>Workflow Services</strong></p> <p>Further evidence of the team listening and responding to feedback is the much anticipated support for contract-first Workflow Services. Many including myself have been very vocal about this. In WF 4 v1, you define your contract via properties on the Receive activity and the WSDL is generated based on these properties. This is the equivalent of slapping a ServiceContract attribute on a concrete type, which on my teams results in an instance electric shock being administered to the errant developer. Just because you can do something doesn’t mean you should, and while in WCF there is no excuse for this, in WCF 4 v1, it is the only way to expose a WCF service. Contract-First WF allows you to browse your assemblies or projects and choose an existing interface, ensuring that factoring decisions can continue to take place outside of the WF designer while embracing the pillars of separation of interface definition from implementation. The result of browsing and selecting an existing Service Contract is the generation of one activity per operation, the workflow way.</p> <p>Versioning has been an interesting problem for as long as technologies have provided the ability to persist and resume application state. The canonical problem is this that if you persist the state of a workflow and in between the time it was persisted and later resumed, a new version of the workflow definition is deployed, what happens? The short answer is an exception indicating that you are asking the WF runtime to try to fit a round hole into a square peg. Leon Welicki (PM on the WF team and one of the nicest guys on earth) and team have found a solid solution which is to redirect, or bind a persisted workflow to the appropriate definition at runtime, and this is what Versioning and Dynamic Update do for you. By giving your workflow a name and version, you can map instances to that named instance, solving the versioning problem without giving up the performance benefits of keeping the definition and instance state as peas in the same pod.</p> <p>Ron also provided a teaser for what the <a href="http://rickgaribay.net/archive/2010/10/28/soa-2.0.aspx" target="_blank">goodness of the Container in the Composition Model</a> might do for Workflow Services. One area in particular he focused on was the ability to monitor WF instances, and I couldn’t help but compare it to HAT orchestration debugging in the BTS world. I can only hope that this capability will be available both on-premise as well as in the cloud, as the fidelity of features and workloads within AppFabric <a href="http://rickgaribay.net/archive/2010/10/28/the-appfabric-platform-is-landing.aspx" target="_blank">appear to be landing</a> towards a single hybrid platform in which both WF and WCF play key roles.</p> <p><strong>WCF</strong></p> <p>While the slow uptick of developers embracing .NET workflow can be attributed largely in part to the nascent release of WF 4 v1 among the firehouse of new technologies release this year, WCF as a technology came out strong from the beginning and has only gotten better and better since its debut in .NET 3.0. As my hands down favorite .NET technology, I’ve worked very hard to understand why developers have such a hard time with WCF, but for reasons I still don’t fully understand, there is an intimidation factor in WCF that is difficult to reconcile. The team has worked hard to make the barrier to entry with WCF as low as possible, delivering significant improvements to the developer experience in WCF 4, including <a href="http://rickgaribay.net/archive/2010/07/11/new-pluralsight-wcf-4-on-demand-screencast.aspx" target="_blank">configuration-less F5 hosting</a>, improvements in REST support and out-o<a href="http://wcf.codeplex.com/"><img style="margin: 5px 0px; display: inline" align="right" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=wcf&amp;DownloadId=156977&amp;Build=17275" width="255" height="44" /></a>f-the-box support for <a href="http://rickgaribay.net/archive/2010/10/06/new-pluralsight-on-demand-screencast-on-wcf-4-discovery.aspx" target="_blank">WS-Discovery</a> and message brokering via the <a href="http://cid-df930ee6f91132fd.office.live.com/self.aspx/Public/Talks/DCC2010.1/New%20Features%20in%20WCF%204%20that%20will%20Instantly%20Make%20you%20More%20Productive.pdf" target="_blank">Routing Service</a>. </p> <p>While admittedly a WS guy at the core, I cannot dispute that there is a need for different tools for every job, and WCF has remained true to its vision for delivering service-oriented enablement of applications across a variety of formats and styles. To this end, <a href="http://twitter.com/gblock" target="_blank">@gblock</a> has taken some time away from slinging MEF to explore and deliver new ways of enabling developers to use WCF to expose resources of virtually any type over HTTP, transcending the boundaries that WS or even REST styles impose. </p> <p>For example, by embracing the capabilities of the HTTP protocol, Glenn and his team are working to make it very easy to serve up content based on the encoding type defined in the HTTP header of a GET request. The implementation is reminiscent of the ActionResult API in MVC by which you can bind a requested content-type to a specialized response stream such as a JSONResul or XMLResult, however the new enhancements take it much farther by providing a very simple approach for serving up content of any supported content type, be it POX, PNG or PDF. Like WCF Data Services, these investments on top of WCF will allow developers of all backgrounds to take advantage of a simpler model for exposing and consuming multiple resource types in a very direct and lightweight manner.</p> <p><strong>Wrap Up</strong></p> <p>All of these features are welcome addition to the framework, and while there is no guarantee that everything discussed here will be be part of the next official shipping vehicle (what that is remains unclear), it is evidence that the team is continuing to move in the right direction, not only listening, but more importantly acting upon what the community is asking for.</p> <p>You can download and explore the beta of the new WCF Web APIs that Glenn covered here: <a title="http://wcf.codeplex.com/" href="http://wcf.codeplex.com/">http://wcf.codeplex.com/</a> and as I mentioned earlier, CTP 1 for WF State Machine is available here: <a title="http://wf.codeplex.com/releases/view/43586" href="http://wf.codeplex.com/releases/view/43586. ">http://wf.codeplex.com/releases/view/43586. </a></p> <p>There are no public announcements as to when we might expect the next rev of the State Machine CTP or the new WF goodies discussed above, however be sure to keep up with the WF team at <a href="http://msdn.microsoft.com/wf, endpoint.tv" target="_blank">http://msdn.microsoft.com/wf,</a> endpoint.tv on channel9 <a title="http://channel9.msdn.com/shows/endpoint/" href="http://channel9.msdn.com/shows/endpoint/">http://channel9.msdn.com/shows/endpoint/</a> and stay tuned for “Endpoint Radio” a new podcast by Ron himself making its debut shortly.</p><img src="http://rickgaribay.net/aggbug/293.aspx" width="1" height="1" /> Rick G. Garibay http://rickgaribay.net/archive/2010/10/30/wcf-wf-and-wf-services-v.next.aspx Sat, 30 Oct 2010 17:44:43 GMT http://rickgaribay.net/archive/2010/10/30/wcf-wf-and-wf-services-v.next.aspx#feedback http://rickgaribay.net/comments/commentRss/293.aspx http://rickgaribay.net/services/trackbacks/293.aspx