Author: Richard Seroter

  • Should an ODS Have a Query-By-Service Interface?

    My company has an increasingly mature Operational Data Store (ODS) strategy where agreed-upon enterprise entities are added to shared repositories and accessible across the organization.  These repositories are typically populated via batch loads from the source system.  The ODS is used to keep systems which are dependent on the source system from bombarding the source with bulk data load processing requests.  Independent of our ODS landscape, we have BizTalk Server doing fan-outs of real-time data from source systems to subscribers who can handle real-time data events.  My smart architect buddy Ian is proposing a change to our model, and I thought I’d see what you all think.

    So this is a summary of what our landscape looks like today:

    Notice that in this case, our ESB (BizTalk Server) is populated independently of our ODS.  What Ian wants us to do is populate all of our ODSs from our ESB (thus making it just another real-time subscriber), and then throw a “get” interface on the ODS for request/reply operations which would have previously gone against the source system (see below).  Below notice that the second subscriber of data receives real-time feeds from BizTalk, but also can query the ODS for data as well.

    I guess I’ve typically thought of an ODS as being for batch interactions only, and not something that should be queried via request/response operations.  If I need real-time data, I’d always go to the source itself. However, there are lots of benefits to this proposed model:

    • Decouple clients from source system
    • Remove any downstream  impact on source system maintenance schedules
    • Don’t require additional load, interfaces or adapters on source system (although most enterprise systems should be able to handle the incremental load of request/response queries).
    • All the returned entities are already in a flattened, enterprise format as opposed to how they are represented in the source system

    Now, before declaring that we never go to source systems and always hit an ODS (which would be insane), here are some considerations we’ve thought about:

    • This should only be for shared enterprise entities that are distributed around the organization.
    • There is only a “get by ID” operation on the ODS vs. any sort of “update” or “delete” operations.  Clearly having any sort of “change” operations would be nuts and cause a data consistency nightmare.
    • The availability/reliability of the platform hosting the ODS must meet or exceed that of the source system.
    • We must be assured that the source system can publish a real-time event/data message.  No “quasi-real-time” where updates are pushed out every hour.
    • This model should not be used for entities where we need to be 110% sure that the data is current (e.g. financial data, extremely volatile data).

    Now, there still may be a reliance by clients on the source system if the shared entity doesn’t contain every property required by the client.  And in a truly event-driven model, maybe the non-ODS subscribers should only get event notifications and be expected to ping the ODS (which receives the full data message) if they want more data than what exists in the event message.  But other than that, are there other things I’ve missed or considerations I should weigh more heavily one way or the other?  Share with me.

    Technorati Tags: , ,

  • New ESB Guidance 2.0 CTP Out

    Yesterday the Microsoft team released a new tech preview of the ESB Guidance 2.0 package.

    What’s new?  I’ll be installing this today so we’ll see what “LDAP Resolver” and “SMTP Adapter Provider” actually are.  Looks like some good modifications to the itinerary design experience as well.  The biggest aesthetic change is the removal of the dependency on Dundas charting (for the Exception Management Portal) and a long-overdue move to Microsoft Chart Controls. 

    As you’d expect with any CTP (and as I’ve learned by digging into CTP1 for my BizTalk 2009 book), don’t expect much in the way of documentation yet.  There ARE updated samples, but it’s up to you to dissect the components and discover the relationships between them.

    Technorati Tags: ,

  • Great New Whitepapers on .NET Services

    One of my early complaints with the .NET Services offerings has been a relative dearth of additional explanations besides the SDK bits.  Clearly just to satisfy me, Microsoft has published a series of papers (authored by those prolific folks at Pluralsight) about the full spectrum of .NET Services.

    Specifically, you’ll find papers introducing .NET Services, .NET Access Control Service, .NET Service Bus, and the .NET Workflow Service.  Upon a quick speed-read through, they all look well thought out and full of useful demonstrations and context.

    Be like me and add these papers to your “to do” list.

    Technorati Tags:

  • Query Notification Capability in WCF SQL Adapter

    I recently had a chance to investigate the new SQL Adapter that ships with BizTalk Server 2009 (as part of the BizTalk Adapter Pack) and wanted to highlight one of the most interesting features.

    There are lots of things to love about the new adapter over the old one (now WCF-based, greater configuration, cross-table transactions, etc), but one of the coolest ones is support for SQL Server Query Notification.  Instead of relying on a polling based solution to discover database changes, you can have SQL Server raise an event to your receive location when relevant changes are committed.  Why is this good?  For one scenario, consider a database that updates infrequently, but when changes DO occur, they need to be disseminated in a timely manner.  You could use polling with a small interval, but that’s quite wasteful given the infrequency of change.  However, using a 1-day polling interval is impractical if you need rapid communication of updates.  This is where Query Notification is useful.  Let’s walk through an example.

    First, I created the following database table for “Employees.”  I’ve highlighted the fact that when I installed the SQL Server 2008 database engine, I also installed Service Broker (which is required for Query Notification).

    Once my table is in place, I want to next add the appropriate schema(s) to my BizTalk Server 2009 project.  If you recall from using the BizTalk Adapter Pack in the past, you go to the “Add Generated Items” page and choose “Consume Adapter Service.”

    The first thing you need to do is establish a connection string for accessing your database.  The connection property window allows you to pick the server, instance, failover node, database name and more.

    Once a valid connection is created, we can browse the database.  Because I’ve chosen “Service” under the “Select Contract Type” drop down, I do not see the database artifacts in the “Select a Category” pane.  Instead, I see operations that make BizTalk Server act as a service provider (e.g. polling) instead of a service consumer (e.g. select from table).  I’ve chosen the “Notification” option.

    The schema generated by this wizard is one of the most generic, non-contextual schema I’ve seen in a while.  However, I’m not sure that I can fault BizTalk for that as it appears to be the standard Query Notification event schema provided by SQL Server.

    Note that this schema DOES NOT have any information about which table changed, which row changed, or which data changed.  All it tells you is that an event occurred in a database.  During receive location configuration you can specify the type of data you are interested in, but that interest does not seep into this event message.  The idea is that you take this notice and use an orchestration to then retrieve the data implied by this event.  One big “gotcha” I see here is that the target namespace is not related to the target database.  This means you can you can only have one instance of this schema in your environment in order to avoid encountering collisions between matching namespace+root schemas.  So, I’d suggest generating this schema once, and throwing it into a BizTalk.Common.dll and having everyone else reference that in their projects.

    Ok, let’s see what this event message actually looks like.  After deploying the schema, we need to create a receive location that SQL Server publishes to.  This adapter looks and feels like all the other WCF adapters, down to the URI request on the first tab.

    The most important tab is the “Binding” one where we set our notification details.  Specifically, I set the “Inbound Operation Type” to “Notification” (instead of polling), and set a notification statement.  I’m looking for any changes to my table where the “IsChanged” column is set to “True.”  Be aware that you have to specify a column name (instead of “select *”) and you must provide the database owner on the table reference (dbo.Employees).

    After I built a send port that simply subscribed to this receive port, I changed a record in my table.  The resulting Query Notification event message looked like this:

    As you can see, by itself, this is a useless message.  You require the knowledge of which receive port it came from, and what your notification statement was.  I haven’t thought it through too much, but it would probably be nice to at least have a database or table reference in this message.

    Now what if we want to do something with this event message?  Let’s say that upon updates to the table, I want to select all changed records, update them so that they are no longer “changed”, and then publish that record set out.  First, I walked through the “Consume Adapter Service” option again and chose a “Client” contract type and browsed to my “Employee” table and highlighted the “Select” operation.

    From this wizard, I now get a schema with both a request message and a strongly typed response.

    After distinguishing the fields of my Query Notification message, I created a new orchestration.  I receive in the Query Notification message, and have a Decision to see if and update of the data has occurred.

    If a “change” event is encountered, I want to query my database and pull back all records whose “IsChanged” value is “True”, and “Status” is equal to “Modified.”  When using the classic SQL adapter, we had to constantly remember to flip some sort of bit so that the next polling action didn’t repeatedly pull the same records.  This is still useful with the new adapter as I don’t want my “Select” query to yank messages that were previously read.  So, I need to both select the records, and then update them.  What’s great about the new adapter is that I can do this all at once, in a single transaction.  Specifically, in my Select request message, I can embed an “Update” statement in it.

    So above, I’m selecting “*” columns, and my “Query” node contains both my WHERE clause and UPDATE statement.  In my orchestration, I send this Select request, get back all the records from the database, and publish that record set back out.  I’ve highlighted the fact that my port operation name must match what’s expected by the adapter (in my case, “Select”).

    Because the “Consume Adapter Service” wizard also generated a send port binding (which I’ve imported into my application), I can confirm that the expected operation name is “Select.”

    So what does the result look like?  I changed two records in my database table, which means a notification was instantly sent to my receive location, which in turn instantiated an orchestration which both selected the changed records and updated those same records.  The final message distributed by my orchestration looked like this:

    There you go.  I’m a fan of this new capability as it truly makes our databases event driven participants in our environment instead of passive repositories that require explicit querying for changes of state.  While I don’t think I’m a fan of the generic schema, I suspect the best pattern is to take that generated event message, and, using what we know about the notification statement, republish a new event message that contains enough context to be actionable by downstream consumers.

    What do you think?  Is this interesting or will you stick with straight polling as a database access method?

    Technorati Tags:

  • BizTalk Server 2009 Misunderstood?

    My buddy Lucas wrote up a thoughtful piece in which he points out some flaws in Zapthink’s opinion on BizTalk Server 2009 and its impact on Microsoft’s SOA strategy.  It’s a good read if you need a refresher on BizTalk’s history and compatibility with SOA principles.  As yes, SOA still matters regardless of the recent chatter about the death of SOA  (Side rant: If you bought a set of products thinking that you were “doing SOA” and your subsequent SOA projects were failures, then you may have missed the point in the first place.  Whether it’s REST, SOA, BPM, etc, it’s the principles that matter, not the specific toolset that will dictate your long term success).

    If you don’t subscribe to Lucas’s blog, you should.  And I need to be better this year about pointing to (and commenting on) some of the great content written by my peers.

    Technorati Tags:

  • Interview Series: Four Questions With … Stephen Thomas

    Happy New Year and welcome to the 6th interview in our series of chats with interesting folks in the “connected systems” space.  This month we are sitting down with Stephen Thomas who is a blogger, MVP, and the creator/owner of the popular BizTalkGurus.com site.  Stephen has been instrumental in building up the online support community for BizTalk Server and also disseminating the ideas of the many BizTalk bloggers through his aggregate feed.

    Q: You’ve been blogging about BizTalk for eons, and I’d be willing to bet that you regularly receive questions on posts that you barely remember writing or have no idea of the reason you wrote it.  What are the more common types of questions you receive through your blog, and what does that tell you about the folks trying to understand more about BizTalk by searching the Net?

    A:  A main purpose of starting the forums on biztalkgurus.com was to reduce the number of questions I received via email.  Since I started the forums a few years ago, I get very few questions via email anymore.  The most common question I do receive is “How do I learn BizTalk?”  I think this question is a sign of new people starting to work with the product.  BizTalk is a large product and can sometimes be hard to decide what to start with first.  I always point people to the MSDN Virtual Labs.

    Q: What’s a pattern you’ve implemented in BizTalk that you always return to, and what’s a pattern that you’ve tried and decided that you don’t like?

    A: Typically I find the need to interact with SQL using BizTalk.  In the past, I have always put as much logic as possible into helper .net components and access SQL using Enterprise Library.  I have used this approach on many projects and it always proves to be easier to test and build out then working with the SQL Adapter.  I try to avoid using Convoys due to the potential of zombies and document reprocessing complications.

    Q: You’ve recently posted a series of videos and screenshots of Dublin, Olso and WF 4.0.  In your opinion, how should typical BizTalk developers and architects view these tools and what use cases should we start transitioning from “use BizTalk” to “use Dublin/Oslo/WF”?

    A:  Right now, I see Dublin and WF 4.0 having an impact in the near term.  I see the greatest use of these for scenarios that currently could use Workflow but have chosen BizTalk because of the lack of a hosting environment.  These are usually process controller or internal processing type scenarios.  I also see Dublin winning for in-house, non-integration scenarios and lower latency.  I will always foresee and recommend BizTalk for true integration scenarios across boundaries and for scenarios that leverage the adapters.  Also, the mapping story is better and easer in BizTalk so anything with lots of maps will be easer inside BizTalk.

    Q [stupid question]: We recently completed the Christmas season which means large feasts consisting of traditional holiday fare.  It’s inevitable that there is a particular food on the table that you consistently ignore because you don’t like it.  For instance, I have an uncontrollable “sweet potato gag reflex” that rears its ugly head during Thanksgiving and Christmas.  Tell us what holiday food you like best, and least.

    A:  Since we do not have a big family and no one close to us, we typically travel someplace outside the US for the Holidays.  The past four years our Christmas dinners have been my favorite, pizza, while my wife goes for my least favorite food, steak.  I am a very picky eater so when we do have a large dinner I usually do not each much.

    Thanks Stephen for sharing your technology thoughts and food preferences.

    Technorati Tags:

  • 2008 : Year in Review

    As 2009 starts, I thought I’d take a quick gander at the 2008 posts I enjoyed writing the most, and a few of my favorite (non-technical) blogs that I discovered this year.

    Early last year I embarked on a 9-part series of articles about how BizTalk and WCF integrate.  I learned a lot in the process and finally forced myself to really learn WCF.

    Throughout the year I threw out a few ideas around project guidance ranging from getting started with a commitment to the BizTalk platform, how to determine if you’re progressing in your SOA vision, a checklist you can use before migrating projects between environments and another checklist for ensuring that your solutions follow SOA principles.

    I also enjoyed digging into specific problems and uncovering ways to solve them.  Among other things, we looked at ways to throttle orchestrations, aggregating messages, putting data-driven permissions on SharePoint lists via Windows Workflow, doing contract first development with BizTalk, implementing an in-memory resquencer, and comparing code generation differences between the BizTalk ASMX and WCF wizards.   Another highlight for me was the work with RSSBus and investigating how to use RSS to enable real-time data mashups.

    The most fun I’ve had on the blog this year is probably the interview series I started up over the summer.  It’s been insightful to pick the brains of some of our smartest colleagues and force them to answer an increasingly bizarre set of questions.  So far, Tomas Restrepo, Alan Smith, Matt Milner, Yossi Dahan, and Jon Flanders have all been subjected to my dementia.  The next interview will be posted next week.

    I read too many blogs as it is, but there’s always room for fun new ones.  A few (non-technical) that I’ve grown attached to this year are …

    • It Might Be Dangerous… You Go First.  This is the blog of Paul DePodesta who is a front office assistant for the San Diego Padres (baseball).  He’s a smart guy and it’s really cool that he has an open, frank conversation with fans where the thought process of a professional baseball team is shared publicly.
    • Anthony Bourdain’s Blog.  If you watch the Travel Channel or have read Bourdain’s books, you’ll appreciate this great blog.  Tony’s the coolest, and when I watch or read him, I feel a bit like George Costanza around Tony the “mimbo“.
    • We the Robots.  The comics here just kill me.  For some reason I always chuckle at perfectly-placed obscenities.
    • Photoshop Disasters. Great blog where every day you see a professional image (from a company’s website, etc) that demonstrates a shocking Photoshop mistake (missing arms, etc).
    • The “Blog” of “Unnecessary” Quotation Marks.  Title says it all.  If you hate people putting quotes in “strange” places, then “this” is the blog for you.
    • F*ck You, Penguin.  I wish I had thought of this one.  This guy posts a picture of a cute animal every day and then proceeds to put these bastards in their place.  I love the internet.

    I hope to keep the party going in 2009.  I found out yesterday that my MVP was renewed, so hopefully that keeps me motivated to keep pumping out new material.  My book on SOA patterns with BizTalk 2009 should be out in the April timeframe, so that’s something to watch out for as well.

    I’ve appreciated all the various feedback this year, and hope to maintain your interest in the year ahead.

  • New Whitepaper on Developing BizTalk Solutions

    The BizTalk team blog alerted all of us to a new BizTalk-related whitepaper.  This paper, Developing Integration Solutions using BizTalk Server 2006 and Team Foundation Server, is the direct descendent of the seminal BizTalk 2004 paper.  I just skimmed through this newest document, and had a few thoughts to share.

    First off, the paper is misnamed.  The “TFS” in the title initially dimmed my interest since we don’t use TFS at my company.  This paper is actually about how to design and develop BizTalk solutions with a few pages dedicated to capabilities introduced by TFS.  You should read this paper regardless of your source control and software lifecycle management platform.

    I found the “Gathering Information” section fairly useful.  Specifically I liked the list of topics you should consider before starting the project. A few examples of process-based considerations included in the document were:

    • Define core business entities (not systems) that are involved in the process, for example, customers, orders, quotations, parts, invoices.
    • Identify the events or actions that initiate a process (both human and system-based).
    • Determine where exceptions occur in the current business processes and how those exceptions are handled (that is, is a process restarted, is human intervention required).
    • Are the other systems always available?
    • What business metrics, milestones, or key business data in the process must be reported to management?

    Following this section was a list of implementation-based considerations ranging from transport protocols required, security models, auditing, human interfaces and more.  While we probably know to ask these things, I’m always a fan of checklists that remind me of key considerations that impact design.

    The rest of the solution planning portion is nice, and then the document starts to look at how to set up development environments.  The document then addresses solution organization and naming standards.  After this we see more about debugging BizTalk components, and then finally read about build and deployment procedures.

    This is definitely a must-read for BizTalk architects and developers and another source of useful job interview questions!

    Technorati Tags:

  • RSSBus V2 Released

    A few months back I wrote a series of articles on RSSBus that used an early release of their software.  Yesterday they formally released version 2.0 of their product and have included some pretty interesting features.

    You’ve got the new SOAP connector, new scripting keywords, Intellisense within Visual Studio.NET 2008, updated User Guide, and lots more.  One of the coolest things is that they have a demo of the RSSBus server running on Windows Azure.  I need to play around with that and see exactly what can be accomplished there.

    The folks behind this are some of the smarter technologists I know, so you’re in good hands if you invest some time and energy into a solution based on RSSBus.

    Technorati Tags: ,

  • So What’s ACTUALLY In The BizTalk 2009 Beta?

    Yesterday I installed the latest public beta of BizTalk Server 2009 (the artist formerly known as BizTalk Server 2006 R3), and thought I’d share the latest visuals and features.  Note that you shouldn’t expect any particularly revolutionary things here, as a core aspect of this upgrade is bringing BizTalk into alignment with the most current versions of the application platform (VS.NET, Windows Server, .NET Framework).

    First off, you get a BizTalk Server 2009 branded installation.  Notice the new RFID Mobile and UDDI components.

    The installation options for BizTalk Server 2009 are pretty much the same, but do notice the new “Project Build” component that lets you compile BizTalk projects without Visual Studio.NET.

    Configuration of BizTalk Server 2009 is also virtually identical to BizTalk Server 2006 R2, but notice that MSMQT is no longer listed.

    If you choose to install the UDDI bits, you see those options.

    Then we can configure UDDI in much the same fashion as BizTalk Server 2009.

    So any changes to the BizTalk Admin Console?  You betcha.

    Nothing earth-shattering, but notice new icons and you’ll notice a bit of a new feeling due to a MMC update.  For some reason, the Event Log is no longer loaded into this console.  Rats.

    One great thing is that HAT is gone, and all historical data analysis occurs in the Admin Console.  Let’s have a moment of silence for HAT, and prepare to sacrifice a virgin to our new king, the Admin Console.

    There are two new query types in the Query view, and you get a series of interesting options if you pick the Tracked Message Events search type.

    What’s new in Visual Studio.NET 2008 for BizTalk Server 2009?  You’ll find support for unit testing of schemas, maps and pipelines.

    One of the really nice things about the promotion of BizTalk projects to “real” Visual Studio.NET projects is the elimination of BizTalk-specific complexity.  For instance, you may recall that there were roughly 112 property menus for schemas, but now, viewing schema properties loads ALL properties (including input instance, ex) in the single VS.NET window.

    Lucky for us, BizTalk maps have the same support for the single property window.

    One of the actual new features is support for map debugging.  You can right-click a BizTalk map, and jump into a true debugger that enables breakpoints and functoid evaluation.

    Also, there is no longer a “deploy” project build type, but rather, you get the standard “Debug” and “Release” build options.

    There’s a quick summary.  I’m sure other small things will surface as we all mess around with this.  I’ll be spending much more time evaluating the new UDDI features, ESB Guidance 2.0 and SQL WCF adapter in my upcoming book.

    Any other features that anyone has discovered since installing the beta?

    Technorati Tags: