<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Clemens Vasters</title>
    <link>http://vasters.com/clemensv/</link>
    <description>Cloud Development and Alien Abductions</description>
    <language>en-us</language>
    <copyright>Clemens Vasters</copyright>
    <lastBuildDate>Mon, 10 Jun 2013 11:53:04 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.7067.0</generator>
    <managingEditor>cvasters@guhhome.com</managingEditor>
    <webMaster>cvasters@guhhome.com</webMaster>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=600fbefe-9d05-4950-a606-273d25f80dd1</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,600fbefe-9d05-4950-a606-273d25f80dd1.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,600fbefe-9d05-4950-a606-273d25f80dd1.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=600fbefe-9d05-4950-a606-273d25f80dd1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I published a <a href="http://channel9.msdn.com/Blogs/Subscribe/Things-M2M-IoT-Connecting-Special-Purpose-Devices-to-and-through-the-Cloud">new
video over on Subscribe</a> about the "Internet of Things". Check it out.
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=600fbefe-9d05-4950-a606-273d25f80dd1" />
      </body>
      <title>Things. M2M. IoT - Connecting Special Purpose Devices to and through the Cloud</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,600fbefe-9d05-4950-a606-273d25f80dd1.aspx</guid>
      <link>http://vasters.com/clemensv/2013/06/10/Things+M2M+IoT+Connecting+Special+Purpose+Devices+To+And+Through+The+Cloud.aspx</link>
      <pubDate>Mon, 10 Jun 2013 11:53:04 GMT</pubDate>
      <description>&lt;p&gt;
I published a &lt;a href="http://channel9.msdn.com/Blogs/Subscribe/Things-M2M-IoT-Connecting-Special-Purpose-Devices-to-and-through-the-Cloud"&gt;new
video over on Subscribe&lt;/a&gt;&amp;nbsp;about the "Internet of Things". Check it out.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=600fbefe-9d05-4950-a606-273d25f80dd1" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,600fbefe-9d05-4950-a606-273d25f80dd1.aspx</comments>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=e474633e-97b4-43f8-b06e-1428dc5206b3</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,e474633e-97b4-43f8-b06e-1428dc5206b3.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,e474633e-97b4-43f8-b06e-1428dc5206b3.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=e474633e-97b4-43f8-b06e-1428dc5206b3</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <style type="text/css">li.ftx {font-size:medium}</style>
        <p>
We're talking a lot about "Mobile" solutions in the industry, but the umbrella that
this moniker casts has become far too big to be useful and doesn't represent any particular
scenario subset that's useful for planning services for "mobile" devices. Nearly every
personal computing scenario that consumers encounter today is "mobile". 
</p>
        <p>
This post is a personal perspective on "mobile" applications and how applications
that run on devices labeled under this umbrella really enable a range of very different
scenarios, and do require a different set of backend services, depending on the core
scenario. 
</p>
        <p>
From this perspective, I present a taxonomy for these experiences that may be helpful
with regards to their relationship to cloud services: Mobile, Outside, Inside, and
Attached. 
</p>
        <ul>
          <li class="ftx">
            <em>Mobile</em> only applies to all scenarios where I am literally mobile. I'm moving. 
</li>
          <li class="ftx">
            <em>Outside</em> applies to all scenarios where I'm away from my office or my house,
but at rest. 
</li>
          <li class="ftx">
            <em>Inside</em> applies to all scenarios where I'm at the office or at the house,
but potentially roaming. 
</li>
          <li class="ftx">
            <em>Attached</em> applied to all scenarios where the experience is immovably attached
to a physical location or device, appliance, or other machinery. 
</li>
        </ul>
        <h3>Mobile 
</h3>
        <p>
As soon as I get into my car and drive, my $700 phone is not really all that useful.
Things will beep and ring and try to catch my attention, but they do that without
respecting my physical world situation where I probably shouldn't pay much if any
attention. 
</p>
        <p>
That said – the phone does integrate with my car's entertainment system, so that I
can listen to music, podcasts, and Internet streams and the phone functionality also
integrates for a hands-free experience. It also reads text message to me out loud
as they arrived when the phone is paired with my car. That all happens because the
OS supports these core functions directly. 
</p>
        <p>
In the case of my particular car, a 2013 Audi A6 with MMI Touch and Audi Connect services
(I'm not at all meaning to be boasting here), the phone/entertainment system has even
its own phone SIM, so all my phone gets to contribute is its address book and the
music/audio link for playing songs from the phone. Text messages and phone communication
and the car's built-in navigation features including getting live traffic data is
all natively supported by the vehicle without needing the phone's help. 
</p>
        <p>
To help making sure that the traffic data is accurate, the vehicle sends – today;
this isn't science fiction – anonymous motion information, so-called "floating car
data" telemetry into a data pool where it gets analyzed and yields real-time information
about slowdowns and traffic jams complementing stationary systems. 
</p>
        <p>
If you need to catch my attention while I am mobile in the sense of 'in motion' you
either have to call me and hope that I choose to pick up and am not talking to someone
else already, leave me a voice mail, send me a text message and hope I'll call back
or, otherwise, wait. A text message will reach me right in the central dashboard display
of my car. 
</p>
        <p>
If you send me a Twitter message or send me something on Facebook or send me an Email
I most certainly won't see it until it's safe for me to take my eyes off the street
– because it is much less targeted and not integrated in the experience that my personal
safety depends on in that situation. 
</p>
        <p>
When I'm walking on the Microsoft campus or I'm at an airport in line to board a plane,
it's very similar. You can try to reach me via any of these channels, but it's not
too unlikely that I'll make you wait when the immediate circumstances demand my attention.
Boarding that plane or getting to the next building in time for a meeting with 20
people while it's raining outside is likely of higher urgency than your message –
I'm sorry. 
</p>
        <p>
A 'mobile' experience is one that supports my mobility and the fact that my primary
focus is and must be elsewhere. It can augment that experience but it must not attempt
to take center stage because that ought not to be its role. The "My Trips" app for
TripIt.com on Windows Phone is a near perfect example of an experience that is truly
tailored to mobility. The app doesn't make me ask questions. It knows my itinerary
and anticipates what info I will need the next time I look at the live tile. 
</p>
        <p>
When I'm arriving at an airport, it will have looked up my connecting flight and will
have sent a notification or repeatedly try to send one to fill the Live Tile with
information about the connecting flight status and gate information. I don't even
have to open the app. If there are critical disruptions it will send me a Toast notification
that comes with an audible alarm and vibration to help getting my attention. 
</p>
        <p>
Avis, the rental car company, does the same thing via email and also their app for
me since I'm a "Preferred" customer. Just before the scheduled pick-up time, which
they can also adjust since I give them my flight info, I get a timely email with all
the information I need to proceed straight to the stall where my rental car is parked
and will find that within the last handful of emails as my plane lands. I proceed
to the rental care facility, get into the vehicle, and I get the rental agreement
slip as I exit the facility presenting my driver's license. No need to ask for anything;
the system anticipates what I'll need and it excels at that. 
</p>
        <p>
The phone's calendar is obviously similar. It will show me the next relevant appointment
including the location info so that's available at a glance when I just look at the
phone while I'm walking to another building; and it will provide the most recent updates
so if the meeting gets moved between rooms as I'm on my way then I'll see that reflected
on the lock screen. 
</p>
        <p>
All these mobile experiences that I'm using today as I'm traveling, share that they
are decoupled, asynchronous, often time-driven, and message based. I don't ask for
things. I answer to and react to what needs my urgent attention and otherwise I will
observe and then "get to it" as I truly have time to focus on something other than
getting from A to B and being mobile. Mobilility is driven by messaging, not by request/response. 
</p>
        <h3>Outside 
</h3>
        <p>
Being on the road, doesn't literally mean to be driving all the time, of course. Once
I sit down and indeed start interacting with a device in order to read email, go through
my other messages, read/watch news, or get some work done, I am still outside of the
office or the house, but I am yet not on the move. I am at rest in relatively safety
and can pay closer attention to the interaction with my information device. 
</p>
        <p>
The shape of that interaction differs from the pure mobile experience in that I commonly
ask questions and interact with the device, with focus on the device experience. That
includes everything from browsing the news, to researching with Wikipedia, watching
training videos, to enjoying a movie. Listening to podcasts and/or radio is also one
of those experiences even if we're often doing so while being on the move, i.e. walking
or driving, as we're instantly able to turn our attention to more important matters
as needed – like a nearing ambulance – if we're managing the audio volume as appropriate
for the situation. 
</p>
        <p>
The outside experience is one where I can indeed get at most of my data assets, as
much of it is readily accessible from anywhere since it's stored on the cloud or networked
and accessible via VPN. Whether the device I am using to access that data is connected
via 3G, LTE, WLAN, or wired Ethernet, and whether the screen is 5" or 27" is largely
a question of what sort of an experience I'm looking for, and how big of a device
I want to carry to where I'm going. 
</p>
        <p>
For many, if not most consumers, this <em>outside</em> experience is often the preferred
interaction mode with their devices – and when they own only a single device it's
largely indistinguishable from the <em>Inside </em>experience that I'll expand on
in the next section. They sit in a cafe or elsewhere comfortable with connectivity,
make notes, write email, hatch plans, capture snippets of their life in photos or
videos and share them with friends through Instagram, Twitter, or Facebook. 
</p>
        <p>
For me, the <em>Outside </em>experience is however quite different from the <em>Inside</em> experience
because it's constrained in two key ways: First, while and when connectivity is available,
it's commonly either metered or it's provided on someone else's terms, for free or
even paid, and that means I don't get a say on the bandwidth and quality and the bandwidth
may be seriously constrained as it is, for instance, in most hotels. 
</p>
        <p>
What <em>Outside</em> also often means is that connectivity is sparse or non-existent.
If I'm traveling and outside the country where I have my primary data contract, I
will pay a platinum-coated-bits premium for data. Therefore I find myself Hotspot-hopping
quite a bit. <em>Outside</em> may also mean that I'm going away from the core coverage
zones of wireless networks, which means that I might quite well end up with no reliable
access to network services because I'm either in a remote valley or inside the Faraday-Cage
hull of a ship. It might also mean that I am in a stadium with 52,000 other people
who are trying to use the same set of cell towers – which is the case about every
two weeks for me. 
</p>
        <p>
Second, what I am connecting to is a shared network that I cannot trust, which is
not well suited for easy discovery and sharing scenarios that rely on UPnP/SSDP and
similar protocols. 
</p>
        <p>
From an infrastructure perspective, apps that focus on <em>Outside</em> experiences
work best if they can deal with varying quality and availability of connectivity,
and if they are built to hold and/or access data in a way that is independent – for
better and worse – of the scope and sandboxing provided by the local network that
I'm connecting to. Thus, Outside experiences are best suited for using cloud-based
services. 
</p>
        <h3>Inside 
</h3>
        <p>
The <em>Inside</em> experience is much like the <em>Outside</em> one but with the
key difference that I either directly own the environment that I'm connecting into
or that I at least have reason to trust the owners and anyone else they allow to connect
to the environment. That's true for my home network and it's also true, even though
with a few caveats, for the office network. 
</p>
        <p>
The <em>Outside</em>/<em>Inside</em> split and a further differentiation of <em>Inside</em> into
work and home environments is also what the Windows Firewall uses to categorize networks.
The public, outside networks are on the lowest trust level, domain networks are a
notch higher, and private networks are most trusted. 
</p>
        <p>
The experiences that I use on my <em>Inside</em> network at home are indeed different
from the experiences I use when <em>Outside</em>. Xbox Smart Glass is a pure inside
experience that pairs my mobile device with my Xbox as a companion experience. Xbox
connects to my Windows Media Center to make my DVB-S2 SmartCard tuner available to
in the guest room, I have a remote control on my phone for my Onkyo A/V receiver,
I have IPTV apps with which I can tune into HDTV streams available on my Internet
service, I use file sharing to access my multi-TB local photo archive. 
</p>
        <p>
A great <em>Inside</em>-experience needs services that are very similar to those of <em>Outside</em> experiences,
including state-roaming between devices, and even more so support for seamless multi-device
"continuous client" experiences – but they are not necessarily cloud-bound. 
</p>
        <h3>Attached 
</h3>
        <p>
Some of the latter <em>Inside</em> experiences, especially the photo archive, are
on the brink towards being <em>Attached</em> scenarios. Since I'm shooting photos
in RAW and video in 1080p/50, I easily bring home 30GB+ or more from a day out at
a museum or air show, and I tend to keep everything. That much data develops quite
a bit of gravitational pull, meaning to say that it's not easily moved around. 
</p>
        <p>
What's not easily moved around, at all, are experiences that depend on a particular
physical asset that is located at a particular place. The satellite dish at my house
is something I need to be close to or go to (in the network sense) in order to get
at content that is exclusively delivered via that channel. It also, has to be decoded
with that one precious smart card that I rent from the Pay-TV provider. 
</p>
        <p>
If I had surveillance cameras and motion sensors around the house (I'll let you speculate
on whether I really do), those cameras and sensors are location locked and I need
to go to them. I can conceivably take a WLAN hub and my Xbox when I go on a vacation
trip (and some people do) to make an <em>Inside</em> experience at a hotel room, but
I can hardly take the satellite dish and the cameras. 
</p>
        <p>
In the business world, even when interacting with consumers, there are plenty of these
immobile experiences. An ATM is a big and heavy money safe designed to be as immobile
as possible that is equipped with a computer that controls how much cash I can take
from that safe. A check-in terminal at an airport makes sense there as a shared experience
because it gives me a printout of a document – the boarding pass – that I can use
to document my authorization to travel on a particular flight. That's convenient,
since paper doesn't run out of battery. 
</p>
        <p>
What's particularly noteworthy is that some attached experiences, such as the huge
center screen in Tesla Motors' Model S, are attached and inseparable from the larger
context, and yet fulfill a mobility role at times – and at other times they function
like an <em>outside</em> appliance. 
</p>
        <p>
We encounter "attached" experiences while <em>we</em> are mobile, but they're stationary
in their own context. That context may, however, be mobile if the attached experience
is an in-flight entertainment system or an information terminal on a train. 
</p>
        <h3>Conclusion 
</h3>
        <p>
The <em>Mobile</em>, <em>Inside</em>, <em>Outside</em>, <em>Attached</em> terminology
may be a tad bit factual and dry, but I believe it's a useful taxonomy nevertheless.
If you have a set of catchier monikers I'm all ears. Let me know whether you find
this useful.
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=e474633e-97b4-43f8-b06e-1428dc5206b3" />
      </body>
      <title>Mobile, Outside, Inside, and Attached: A Taxonomy for Mobile Experiences</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,e474633e-97b4-43f8-b06e-1428dc5206b3.aspx</guid>
      <link>http://vasters.com/clemensv/2013/06/04/Mobile+Outside+Inside+And+Attached+A+Taxonomy+For+Mobile+Experiences.aspx</link>
      <pubDate>Tue, 04 Jun 2013 08:47:51 GMT</pubDate>
      <description>
&lt;style type=text/css&gt;li.ftx {font-size:medium}&lt;/style&gt;
&lt;p&gt;
We're talking a lot about "Mobile" solutions in the industry, but the umbrella that
this moniker casts has become far too big to be useful and doesn't represent any particular
scenario subset that's useful for planning services for "mobile" devices. Nearly every
personal computing scenario that consumers encounter today is "mobile". 
&lt;/p&gt;
&lt;p&gt;
This post is a personal perspective on "mobile" applications and how applications
that run on devices labeled under this umbrella really enable a range of very different
scenarios, and do require a different set of backend services, depending on the core
scenario. 
&lt;/p&gt;
&lt;p&gt;
From this perspective, I present a taxonomy for these experiences that may be helpful
with regards to their relationship to cloud services: Mobile, Outside, Inside, and
Attached. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=ftx&gt;
&lt;em&gt;Mobile&lt;/em&gt; only applies to all scenarios where I am literally mobile. I'm moving. 
&lt;li class=ftx&gt;
&lt;em&gt;Outside&lt;/em&gt; applies to all scenarios where I'm away from my office or my house,
but at rest. 
&lt;li class=ftx&gt;
&lt;em&gt;Inside&lt;/em&gt; applies to all scenarios where I'm at the office or at the house,
but potentially roaming. 
&lt;li class=ftx&gt;
&lt;em&gt;Attached&lt;/em&gt; applied to all scenarios where the experience is immovably attached
to a physical location or device, appliance, or other machinery. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Mobile 
&lt;/h3&gt;
&lt;p&gt;
As soon as I get into my car and drive, my $700 phone is not really all that useful.
Things will beep and ring and try to catch my attention, but they do that without
respecting my physical world situation where I probably shouldn't pay much if any
attention. 
&lt;/p&gt;
&lt;p&gt;
That said – the phone does integrate with my car's entertainment system, so that I
can listen to music, podcasts, and Internet streams and the phone functionality also
integrates for a hands-free experience. It also reads text message to me out loud
as they arrived when the phone is paired with my car. That all happens because the
OS supports these core functions directly. 
&lt;/p&gt;
&lt;p&gt;
In the case of my particular car, a 2013 Audi A6 with MMI Touch and Audi Connect services
(I'm not at all meaning to be boasting here), the phone/entertainment system has even
its own phone SIM, so all my phone gets to contribute is its address book and the
music/audio link for playing songs from the phone. Text messages and phone communication
and the car's built-in navigation features including getting live traffic data is
all natively supported by the vehicle without needing the phone's help. 
&lt;/p&gt;
&lt;p&gt;
To help making sure that the traffic data is accurate, the vehicle sends – today;
this isn't science fiction – anonymous motion information, so-called "floating car
data" telemetry into a data pool where it gets analyzed and yields real-time information
about slowdowns and traffic jams complementing stationary systems. 
&lt;/p&gt;
&lt;p&gt;
If you need to catch my attention while I am mobile in the sense of 'in motion' you
either have to call me and hope that I choose to pick up and am not talking to someone
else already, leave me a voice mail, send me a text message and hope I'll call back
or, otherwise, wait. A text message will reach me right in the central dashboard display
of my car. 
&lt;/p&gt;
&lt;p&gt;
If you send me a Twitter message or send me something on Facebook or send me an Email
I most certainly won't see it until it's safe for me to take my eyes off the street
– because it is much less targeted and not integrated in the experience that my personal
safety depends on in that situation. 
&lt;/p&gt;
&lt;p&gt;
When I'm walking on the Microsoft campus or I'm at an airport in line to board a plane,
it's very similar. You can try to reach me via any of these channels, but it's not
too unlikely that I'll make you wait when the immediate circumstances demand my attention.
Boarding that plane or getting to the next building in time for a meeting with 20
people while it's raining outside is likely of higher urgency than your message –
I'm sorry. 
&lt;/p&gt;
&lt;p&gt;
A 'mobile' experience is one that supports my mobility and the fact that my primary
focus is and must be elsewhere. It can augment that experience but it must not attempt
to take center stage because that ought not to be its role. The "My Trips" app for
TripIt.com on Windows Phone is a near perfect example of an experience that is truly
tailored to mobility. The app doesn't make me ask questions. It knows my itinerary
and anticipates what info I will need the next time I look at the live tile. 
&lt;/p&gt;
&lt;p&gt;
When I'm arriving at an airport, it will have looked up my connecting flight and will
have sent a notification or repeatedly try to send one to fill the Live Tile with
information about the connecting flight status and gate information. I don't even
have to open the app. If there are critical disruptions it will send me a Toast notification
that comes with an audible alarm and vibration to help getting my attention. 
&lt;/p&gt;
&lt;p&gt;
Avis, the rental car company, does the same thing via email and also their app for
me since I'm a "Preferred" customer. Just before the scheduled pick-up time, which
they can also adjust since I give them my flight info, I get a timely email with all
the information I need to proceed straight to the stall where my rental car is parked
and will find that within the last handful of emails as my plane lands. I proceed
to the rental care facility, get into the vehicle, and I get the rental agreement
slip as I exit the facility presenting my driver's license. No need to ask for anything;
the system anticipates what I'll need and it excels at that. 
&lt;/p&gt;
&lt;p&gt;
The phone's calendar is obviously similar. It will show me the next relevant appointment
including the location info so that's available at a glance when I just look at the
phone while I'm walking to another building; and it will provide the most recent updates
so if the meeting gets moved between rooms as I'm on my way then I'll see that reflected
on the lock screen. 
&lt;/p&gt;
&lt;p&gt;
All these mobile experiences that I'm using today as I'm traveling, share that they
are decoupled, asynchronous, often time-driven, and message based. I don't ask for
things. I answer to and react to what needs my urgent attention and otherwise I will
observe and then "get to it" as I truly have time to focus on something other than
getting from A to B and being mobile. Mobilility is driven by messaging, not by request/response. 
&lt;/p&gt;
&lt;h3&gt;Outside 
&lt;/h3&gt;
&lt;p&gt;
Being on the road, doesn't literally mean to be driving all the time, of course. Once
I sit down and indeed start interacting with a device in order to read email, go through
my other messages, read/watch news, or get some work done, I am still outside of the
office or the house, but I am yet not on the move. I am at rest in relatively safety
and can pay closer attention to the interaction with my information device. 
&lt;/p&gt;
&lt;p&gt;
The shape of that interaction differs from the pure mobile experience in that I commonly
ask questions and interact with the device, with focus on the device experience. That
includes everything from browsing the news, to researching with Wikipedia, watching
training videos, to enjoying a movie. Listening to podcasts and/or radio is also one
of those experiences even if we're often doing so while being on the move, i.e. walking
or driving, as we're instantly able to turn our attention to more important matters
as needed – like a nearing ambulance – if we're managing the audio volume as appropriate
for the situation. 
&lt;/p&gt;
&lt;p&gt;
The outside experience is one where I can indeed get at most of my data assets, as
much of it is readily accessible from anywhere since it's stored on the cloud or networked
and accessible via VPN. Whether the device I am using to access that data is connected
via 3G, LTE, WLAN, or wired Ethernet, and whether the screen is 5" or 27" is largely
a question of what sort of an experience I'm looking for, and how big of a device
I want to carry to where I'm going. 
&lt;/p&gt;
&lt;p&gt;
For many, if not most consumers, this &lt;em&gt;outside&lt;/em&gt; experience is often the preferred
interaction mode with their devices – and when they own only a single device it's
largely indistinguishable from the &lt;em&gt;Inside &lt;/em&gt;experience that I'll expand on
in the next section. They sit in a cafe or elsewhere comfortable with connectivity,
make notes, write email, hatch plans, capture snippets of their life in photos or
videos and share them with friends through Instagram, Twitter, or Facebook. 
&lt;/p&gt;
&lt;p&gt;
For me, the &lt;em&gt;Outside &lt;/em&gt;experience is however quite different from the &lt;em&gt;Inside&lt;/em&gt; experience
because it's constrained in two key ways: First, while and when connectivity is available,
it's commonly either metered or it's provided on someone else's terms, for free or
even paid, and that means I don't get a say on the bandwidth and quality and the bandwidth
may be seriously constrained as it is, for instance, in most hotels. 
&lt;/p&gt;
&lt;p&gt;
What &lt;em&gt;Outside&lt;/em&gt; also often means is that connectivity is sparse or non-existent.
If I'm traveling and outside the country where I have my primary data contract, I
will pay a platinum-coated-bits premium for data. Therefore I find myself Hotspot-hopping
quite a bit. &lt;em&gt;Outside&lt;/em&gt; may also mean that I'm going away from the core coverage
zones of wireless networks, which means that I might quite well end up with no reliable
access to network services because I'm either in a remote valley or inside the Faraday-Cage
hull of a ship. It might also mean that I am in a stadium with 52,000 other people
who are trying to use the same set of cell towers – which is the case about every
two weeks for me. 
&lt;/p&gt;
&lt;p&gt;
Second, what I am connecting to is a shared network that I cannot trust, which is
not well suited for easy discovery and sharing scenarios that rely on UPnP/SSDP and
similar protocols. 
&lt;/p&gt;
&lt;p&gt;
From an infrastructure perspective, apps that focus on &lt;em&gt;Outside&lt;/em&gt; experiences
work best if they can deal with varying quality and availability of connectivity,
and if they are built to hold and/or access data in a way that is independent – for
better and worse – of the scope and sandboxing provided by the local network that
I'm connecting to. Thus, Outside experiences are best suited for using cloud-based
services. 
&lt;/p&gt;
&lt;h3&gt;Inside 
&lt;/h3&gt;
&lt;p&gt;
The &lt;em&gt;Inside&lt;/em&gt; experience is much like the &lt;em&gt;Outside&lt;/em&gt; one but with the
key difference that I either directly own the environment that I'm connecting into
or that I at least have reason to trust the owners and anyone else they allow to connect
to the environment. That's true for my home network and it's also true, even though
with a few caveats, for the office network. 
&lt;/p&gt;
&lt;p&gt;
The &lt;em&gt;Outside&lt;/em&gt;/&lt;em&gt;Inside&lt;/em&gt; split and a further differentiation of &lt;em&gt;Inside&lt;/em&gt; into
work and home environments is also what the Windows Firewall uses to categorize networks.
The public, outside networks are on the lowest trust level, domain networks are a
notch higher, and private networks are most trusted. 
&lt;/p&gt;
&lt;p&gt;
The experiences that I use on my &lt;em&gt;Inside&lt;/em&gt; network at home are indeed different
from the experiences I use when &lt;em&gt;Outside&lt;/em&gt;. Xbox Smart Glass is a pure inside
experience that pairs my mobile device with my Xbox as a companion experience. Xbox
connects to my Windows Media Center to make my DVB-S2 SmartCard tuner available to
in the guest room, I have a remote control on my phone for my Onkyo A/V receiver,
I have IPTV apps with which I can tune into HDTV streams available on my Internet
service, I use file sharing to access my multi-TB local photo archive. 
&lt;/p&gt;
&lt;p&gt;
A great &lt;em&gt;Inside&lt;/em&gt;-experience needs services that are very similar to those of &lt;em&gt;Outside&lt;/em&gt; experiences,
including state-roaming between devices, and even more so support for seamless multi-device
"continuous client" experiences – but they are not necessarily cloud-bound. 
&lt;/p&gt;
&lt;h3&gt;Attached 
&lt;/h3&gt;
&lt;p&gt;
Some of the latter &lt;em&gt;Inside&lt;/em&gt; experiences, especially the photo archive, are
on the brink towards being &lt;em&gt;Attached&lt;/em&gt; scenarios. Since I'm shooting photos
in RAW and video in 1080p/50, I easily bring home 30GB+ or more from a day out at
a museum or air show, and I tend to keep everything. That much data develops quite
a bit of gravitational pull, meaning to say that it's not easily moved around. 
&lt;/p&gt;
&lt;p&gt;
What's not easily moved around, at all, are experiences that depend on a particular
physical asset that is located at a particular place. The satellite dish at my house
is something I need to be close to or go to (in the network sense) in order to get
at content that is exclusively delivered via that channel. It also, has to be decoded
with that one precious smart card that I rent from the Pay-TV provider. 
&lt;/p&gt;
&lt;p&gt;
If I had surveillance cameras and motion sensors around the house (I'll let you speculate
on whether I really do), those cameras and sensors are location locked and I need
to go to them. I can conceivably take a WLAN hub and my Xbox when I go on a vacation
trip (and some people do) to make an &lt;em&gt;Inside&lt;/em&gt; experience at a hotel room, but
I can hardly take the satellite dish and the cameras. 
&lt;/p&gt;
&lt;p&gt;
In the business world, even when interacting with consumers, there are plenty of these
immobile experiences. An ATM is a big and heavy money safe designed to be as immobile
as possible that is equipped with a computer that controls how much cash I can take
from that safe. A check-in terminal at an airport makes sense there as a shared experience
because it gives me a printout of a document – the boarding pass – that I can use
to document my authorization to travel on a particular flight. That's convenient,
since paper doesn't run out of battery. 
&lt;/p&gt;
&lt;p&gt;
What's particularly noteworthy is that some attached experiences, such as the huge
center screen in Tesla Motors' Model S, are attached and inseparable from the larger
context, and yet fulfill a mobility role at times – and at other times they function
like an &lt;em&gt;outside&lt;/em&gt; appliance. 
&lt;/p&gt;
&lt;p&gt;
We encounter "attached" experiences while &lt;em&gt;we&lt;/em&gt; are mobile, but they're stationary
in their own context. That context may, however, be mobile if the attached experience
is an in-flight entertainment system or an information terminal on a train. 
&lt;/p&gt;
&lt;h3&gt;Conclusion 
&lt;/h3&gt;
&lt;p&gt;
The &lt;em&gt;Mobile&lt;/em&gt;, &lt;em&gt;Inside&lt;/em&gt;, &lt;em&gt;Outside&lt;/em&gt;, &lt;em&gt;Attached&lt;/em&gt; terminology
may be a tad bit factual and dry, but I believe it's a useful taxonomy nevertheless.
If you have a set of catchier monikers I'm all ears. Let me know whether you find
this useful.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=e474633e-97b4-43f8-b06e-1428dc5206b3" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,e474633e-97b4-43f8-b06e-1428dc5206b3.aspx</comments>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=588029f1-01c8-481a-a5e7-dd761f22893f</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,588029f1-01c8-481a-a5e7-dd761f22893f.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,588029f1-01c8-481a-a5e7-dd761f22893f.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=588029f1-01c8-481a-a5e7-dd761f22893f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
"Internet of Things" (IoT) is the grand catchphrase for network-enabling everyday
objects and leveraging the new connectivity to collect information from the devices,
allowing network-side control, and supplying information to those objects that allows
them to do new tricks – like telling a toaster about the day's weather forecast so
that it can burn a sun or a cloud into your morning slice of bread. 
</p>
        <p>
The opportunities and the use-cases in this space are almost limitless. Network-enabled,
commercial vehicles or even subsystems like engines or brake systems can leverage
the connectivity for conveying servicing information and predictive failure analysis,
for route optimization, and driver-safety programs. Devices attached to power grid
components can provide deeper insight into the health even of decades old equipment,
and they can help with managing capacity now that consumers turn producers with wind-power
generators and the flow of electricity has become a two-way flow. Smart devices will
also help consumers to closely track their own energy consumption and, obviously,
automate aspects of their households. 
</p>
        <p>
The "Internet of Things" wave will span many more industries and I could easily go
on for many pages with more examples of which none are science-fiction. They're real
and either already deployed in small scale or on the drawing boards of engineers under
active development. 
</p>
        <p>
What's decidedly different about this new Internet wave is that it is driven by an
entirely different class of people and companies as the wave of the consumer Web.
The "Internet of Things" is (surprise!) about "Things" and the drivers are the makers
of such things. Everyday devices and machines that consumers and businesses are buying
today and that the manufacturers are looking to make better for tomorrow. 
</p>
        <p>
The Web is the grand success that it is because it was built for and on people-centric,
general-purpose computing devices. It's also largely focused on people's interaction
with information stores and sources, meaning that the impulse for interaction is usually
coming from the end-user. Where user-initiated requests and the subsequent, hypertext-driven
requests rooting from the same impulse are the overwhelming traffic motivation, the
dominant HTTP protocol with its focus on request/response exchanges initiated by the
client is a logical best fit. 
</p>
        <p>
Web technology also provides for an enormously low barrier of entry for new commercial
providers of software-based services, as those are running on commodity hardware and
solution builders can pick from a great choice of commoditized software platforms. 
</p>
        <h3>The Internet of Things is not the Web 
</h3>
        <p>
There are some good reasons to believe that the Internet of Things will be different
from the Web. 
</p>
        <p>
To play in this space, companies typically start with a set of existing physical products,
a set of use-cases around these products, and very often an established and loyal
customer base that's looking for new capabilities in the things they already use for
their business or personal lives. There are a good number of startups operating in
this space, but disrupting and displacing incumbents in the maritime industries, commercial
vehicles, specialized production machinery, or high-speed train manufacturing may
quite well happen at the component supplier level, but is harder to see coming at
the product level. 
</p>
        <p>
If you are operating fleets of seagoing vessels, taxis, or trucks, or you run an electricity
grid or manage street-lamps, there's a clear set of primary use-cases, like shipping
things from A to B, along with well-established industries supplying machinery for
these use-cases, and the digital component is a value add, not a purpose in itself. 
</p>
        <p>
While a 40,000 feet view onto the topology of a network of devices may look very similar
to the topology of the network of the Web, with an interconnected core of services
and a peripheral cloud of clients. As you get closer, the similarities start waning,
though. While the Web is geared towards a primary interaction pattern where the clients
initiate all activities and interaction is typically some form of information exchange
– may that be a query being traded for a result list or a data-set update traded for
a receipt – the interaction patterns are more differentiated for special-purpose devices
where direct, human interaction is not in focus. 
</p>
        <p>
I generally classify the interaction patterns for 'things' into four major categories:
Telemetry, Inquiries, Commands, and Notifications. 
</p>
        <ul>
          <li>
Telemetry is the flow of information about the current or temporally aggregated state
of the device or the state of its environment (e.g. readings from its sensors) from
the device to some other party. The information flow is unidirectional and away from
the device. 
</li>
          <li>
Inquiries are questions that the device has about the state of the outside world based
on its current circumstances; an inquiry can be a singular query akin to a database
lookup, but it might also ask a service to supply a steady flow of information. For
instance, the aforementioned toaster will ask for the weather and get a singular response,
but a vehicle might supply a set of geo-coordinates for a route and ask for continuous
traffic alert updates about particular route until it arrives at the destination.
Only the former of these cases is the regular request/response case that HTTP is geared
towards. 
</li>
          <li>
Commands are service-initiated instructions sent to the device. Commands can tell
a device to send information about its state – either as a point-in-time observation
or over continuously some period – or to change the state of the device, including
performing activities with effects in the physical world. That includes, for instance,
sending a command from a smartphone app to unlock the doors of your vehicle, whereby
the command first flows to an intermediating service and from there it's routed to
the vehicle's onboard control system. 
</li>
          <li>
Notifications are one-way, service-initiated messages that inform a device or a group
of devices about some environment state they're otherwise not aware of. Cities may
broadcast information about air pollution alerts suggesting fossil-fueled systems
to throttle CO2 output – or, more simply, a car may want to show weather or news alerts
or text messages to the driver. 
</li>
        </ul>
        <p>
For all four interaction categories it is, except for that one request-response sub-scenario,
a clear requirement to have bi-directional information flow that can be client-initiated
or server-initiated, depending on the particular function's need. 
</p>
        <p>
A requirement that indirectly grows out of the need for server-initiated flow (like
telling your vehicle to toot a tune on its horn using a smartphone app when you've
forgotten in what corner of which level of the structure you've parked at the airport
a week ago) is that there must be a continuously maintained traffic route towards
the client, which may only have to route a few messages per week, but if whenever
a message is sent, the expectation is that the latency is in the order of a few seconds. 
</p>
        <p>
Because the scenarios around 'things' are quite different from those of the Web, where
the focus is on people and their interactions, there's quite a bit of a risk that
its well-known technologies turn into false friends. Are they a fit because they're
ubiquitous? 
</p>
        <h3>VPN to the Rescue? 
</h3>
        <p>
The standard Web interaction model where the client initiates and a service response
is just one out of a several different patterns that are required for connected and
non-interactive 'things', and this presents quite a bit of a challenge. How would
I send a service-originated command or a notification to a connected device? 
</p>
        <p>
One option would indeed be HTTP long-polling or Web Sockets. The client could establish
such a connection and the service would hold on to it and subsequently route all service-originated
messages for the client through the established channel. That's a reasonable strategy,
even if that introduces a solvable, but tricky service-side routing challenge of how
the service will route to that ephemeral socket or pending request across a multi-node
fabric. 
</p>
        <p>
But because that's tricky, many people in the devices space seem to go down a different
route today: They're turning the devices into servers – and suddenly that routing
problem is magically solved. If I can send a notification or command to a device by
ways of issuing an HTTP request to it, I could use off-the-shelf components and HTTP
to implement both the client-to-service Telemetry/Inquiry path and the service-to-client
Command/Notification. Or even if I'm not into HTTP, I could just use whatever standard
or proprietary protocol I like, and yet just treat either party as a server from the
respective other party's perspective. 
</p>
        <p>
That's enormously attractive. It also poses a new challenge. How do I turn a truck
or an off-shore wind-turbine into an addressable server endpoint? The answer to that
question is, across many industries and companies, in unison, "VPN". 
</p>
        <p>
Virtual Private Networks (VPN) provide a link layer integration model between network
participants. Expressed in a more pedestrian fashion, a VPN is akin to hooking everyone
connected to the VPN onto the same Ethernet hub, whereby secured public Internet connections
act as the network cables. Because the VPN illusion is created down at the link level
and largely equivalent to having a network adapter on that network, participants on
the VPN can speak practically any protocol, including but not limited to IPv4 and
IPv6, and all protocols that ride on top of those two. 
</p>
        <p>
The steps for making a field-deployed device network addressable – assuming it supports
VPN – are fairly straightforward: The device first establishes an external network
identity that allows it to connect either to the public Internet or, as it is sometimes
done for GPRS/3G/LTE devices, a carrier-provided closed network by ways of a dedicated
in-network access point. Then it establishes the VPN tunnel by connecting to the VPN
gateway's endpoint, which either resides on the Internet or on the closed network.
Once the tunnel is established, the device is now connected to a separate, second
network: the VPN. 
</p>
        <p>
Assuming that network is an IP network, the device either already has a pre-assigned
address or requests an address lease from the network's DHCP service and is then a
fully addressable network participant within the private address space of the VPN.
If we further assume that the service who wants to address the device has direct or
routed access to the VPN's address space, the service can now directly address the
device and talk to any endpoints the device may be listening on. And because all of
the tunnels into the VPN are secure, all the traffic exchanged between any of the
parties is automatically secure without taking any extra precautions. Perfect solution.
Is it? 
</p>
        <h3>Where's the Catch? 
</h3>
        <p>
The biggest issue with the VPN approach for field-deployed devices lies where many
people would expect it least: Security. That might be a surprise as VPN is often seen
as being seen as almost synonymous with a "secure network space", which is not a proper
way to look at it. 
</p>
        <p>
VPN provides a virtualized and private (isolated) network space. The secure tunnels
are a mechanism to achieve an appropriately protected path into that space, but the
space per-se is not secured, at all. It is indeed a feature that the established VPN
space is fully transparent to all protocol and traffic above the link layer. 
</p>
        <p>
In the two predominant use-cases for VPN technology, its transparency is clearly desirable:
The first use-case is the integration of corporate satellite assets like notebooks
into secure networks. The second key use-case are inter-datacenter links fusing datacenter
or application-scope networks over the public Internet. In the latter case, the connected
parties are presumably following datacenter best-practices for physical and network
access control. In the former case, the client is commonly in the possession of an
authorized employee or vendor, requires individual user credentials for access, is
often protected with a smartcard, is subject to device-level encryption, and often
allows some degree of remote control including remote wipe if the asset becomes compromised.
In both cases, the assets connecting into the VPN are either under immediate control
of personnel authorized by the VPN owner, or there are several layers of safeguards
in place to prevent access to the VPN should the assets become compromised. 
</p>
        <p>
The security of a virtual network space solely depends on controlling and securing
all assets that connect into it, which obviously includes physical access security. 
</p>
        <p>
Now imagine you're an energy utility company planting a farm of wind-turbines into
a field on a remote hill. Or imagine you're a city planting environmental sensors
for pollution, humidity, barometric pressure, and temperature onto rooftops. Or imagine
you're a manufacturer selling network-attachable kitchen appliances to the general
public. 
</p>
        <p>
And now imagine that the way you're creating bi-directional connectivity to these
devices and to make them addressable is by mapping them into a VPN, together with
your services and any other such device – at the link layer. 
</p>
        <p>
How much can you trust or control that these devices don't get physically hijacked
and compromised? What's the attack surface area of your services and the neighboring
devices in case that were to happen? 
</p>
        <p>
It's one of the key principles of security that whoever has physical possession of
a device owns ("pwns") the device from a security perspective. If you're handing complete
strangers networked devices that can log themselves into your VPN based on secrets
present on the device, you should expect that you'll eventually have unauthorized
link-level visitors in the private network that you will have to be prepared to defend
against – and you'll have to defend the device's neighbors as much as the services
you map into the same private network space. 
</p>
        <p>
The security measures you'll have to put in place for this eventuality are largely
equivalent to securing the services and devices as if they were directly attached
to the public Internet. If you get uninvited visitors who exploit a device, you will
have to assume malicious intent; these intruders will not show up by accident. Therefore,
you'll have to firewall all devices, and you have to put authentication and access
control measures on all exposed service endpoints. You'll also have to ensure that
whatever service software stack is running on the device is "Internet hardened" and
that you have an appropriate avenue to promptly distribute security updates, should
that become necessary. 
</p>
        <p>
In addition to the security challenges, only some advanced VPN protocols over IPSec/IKEv2
(RFC 4555) allow for seamless handling of connection failure scenarios, client network
roaming, and reconnect. With devices on unreliable or highly congested networks, or
devices that are used in mobility scenarios where connections may be interrupted because
of signal interruptions, a VPN client without this support will incur the cost of
having to reestablish the tunnel and the VPN session whenever the connection drops.
That, in turn, can lead to routing confusion when a client drops and reconnects and
shows up on different VPN load balanced router while some service-side component wants
to send data to the device. 
</p>
        <p>
Lastly, VPN is very resource hungry for establishing data tunnels to hundreds of thousands
or more small devices that send and receive relatively few and usually fairly small
messages each. It's demanding on the client in terms of the required stack and the
processing needs, which may be a problem for small embedded devices. It's also enormously
resource consuming on the service-side. Current, dedicated hardware for managing 10,000
simultaneous VPN tunnels can easily cost over $100,000 USD with single redundancy
for one site. 
</p>
        <p>
As you contemplate the complexity consequences, it is possible you'll come to the
conclusion that creating a VPN for the connected devices scenario may not be the obvious
best choice that it seemed to be at first. 
</p>
        <h3>Alternatives 
</h3>
        <p>
Even with the laid out constraints, VPN might be a viable model to enable two-way
connectivity, if you're willing to make the right security investments on top, and
if the devices are capable enough. 
</p>
        <p>
If a VPN solution and its consequential complexities were indeed turning out to be
too heavyweight for you, you'll again have the problem of how to make the devices
individually addressable in order to send a service-originated command or a notification
to a connected device. 
</p>
        <p>
As mentioned, one possible alternative would be a long-polling Web Sockets based gateway,
where the client establishes a connection that the service holds on to, and subsequently
routes service-originated messages through the established channel back up to the
client. 
</p>
        <p>
The advantage of this model is that the client will not have to be directly addressable.
If the gateway is hosted on a public-facing Internet address, the client can establish
a connection coming through any layers of NATs and/or Proxies and/or Firewalls and
the service can route information back over that established link through these intermediary
infrastructures. 
</p>
        <p>
What this model still wouldn't solve well is the case of clients that get occasionally
disconnected due to weak wireless signals or congested networks. The client can park
one of these sockets on the gateway and make itself known, but if the connection collapses
and the device is out of reach for a little while and a message arrives for it, where
does that message go? 
</p>
        <p>
Also, once the client comes back it may connect to a different gateway machine by
ways of a load balancer, so if you're retaining that message on the original gateway
node, you'd now have to route it to the current gateway node. Because the 'current'
node may shift if the device repeatedly connects and disconnect when it is, for instance,
at the edge of the wireless coverage area, chasing the client gets fairly complicated.
And that's something you'd have to build. 
</p>
        <h3>Messaging 
</h3>
        <p>
A very practical and fairly straightforward solution to the entirely problem space
is to use a scalable and Internet-facing messaging system using a bi-directional and
multiplexing protocol like AMQP to facilitate the outbound as well as the inbound
device traffic. 
</p>
        <p>
If each device is assigned an exclusive queue or a filtered subscription on a pub/sub
topic for messages to it, the addressing problem is moved from the edge where the
device (VPN) or its connection (Web Sockets) must be identified to one where messages
for a device get routed to a well-known and stable location in the system and from
which the device can pick them up as it can, depending on connectivity state. When
a message is sent and the device is connected and waiting for a message, the message
can be delivered in a matter of a few milliseconds. If the device is temporarily offline,
it can pick up messages whenever it regains network access – unless the message expire,
which is an option in most common messaging systems so that a command like "unlock
door" isn't executed to everyone's surprise a day later if the device was disconnected
for that long. 
</p>
        <p>
Since the devices will pull messages from the messaging system and send messages on
the same path and with AMQP also over the very same multiplexed connection, the communication
path – likely enveloped with SSL/TLS – is as secure as a VPN tunnel and an HTTPS-wrapped
Web Socket, and have the same advantages as the Web Socket path in terms of not exposing
the client to unwanted traffic because all traffic is outbound and coming from behind
existing protection layers. 
</p>
        <p>
From a scalability perspective, a scalable pub/sub system with addressable entities
and well-known scale characteristics also provides a good structure to allow for cleanly
partitioning devices and device-groups across as many queues and topics as needed
to accommodate a large device population. 
</p>
        <h3>Conclusion 
</h3>
        <p>
Using VPNs for device connectivity is a viable if the solution addresses the inherent
security issues. Using a VPN doesn't equate creating a secure network space. It creates
a virtual network space with full fidelity at the link layer with protected paths
into that network space. That's a big difference. The tax that needs to be paid for
VPN support on the client is not insignificant, and securing the virtualized network
doesn't pose a smaller challenge than securing Internet-exposed devices, especially
when those devices are outside the manufacturer's or operator's immediate physical
control. 
</p>
        <p>
After weighing these costs, a solution that builds purely on simple, client-originated
connectivity with overlaid transport layer security is not only much simpler, but
doesn't carry the same security risks or infrastructure tax. 
</p>
        <p>
Using a messaging system as the gateway technology for these client-originated connections
where each client has a designated 'mailbox' in form of a queue or topic also elegantly
solves the addressability issue with the added benefit of being resilient against
occasional connection loss – while not causing significant extra latency cost or overhead. 
</p>
        <p>
For a walkthrough on how to architect a system of this kind, I'll recommend taking
a look at <a href="http://msdn.microsoft.com/en-us/magazine/jj133819.aspx">my June
2012 MSDN Magazine article</a> (which may have been published a year before its time)
and you can expect more on this topic here in the upcoming months. 
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=588029f1-01c8-481a-a5e7-dd761f22893f" />
      </body>
      <title>Internet of Things: Is VPN a False Friend?</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,588029f1-01c8-481a-a5e7-dd761f22893f.aspx</guid>
      <link>http://vasters.com/clemensv/2013/06/03/Internet+Of+Things+Is+VPN+A+False+Friend.aspx</link>
      <pubDate>Mon, 03 Jun 2013 09:58:58 GMT</pubDate>
      <description>&lt;p&gt;
"Internet of Things" (IoT) is the grand catchphrase for network-enabling everyday
objects and leveraging the new connectivity to collect information from the devices,
allowing network-side control, and supplying information to those objects that allows
them to do new tricks – like telling a toaster about the day's weather forecast so
that it can burn a sun or a cloud into your morning slice of bread. 
&lt;/p&gt;
&lt;p&gt;
The opportunities and the use-cases in this space are almost limitless. Network-enabled,
commercial vehicles or even subsystems like engines or brake systems can leverage
the connectivity for conveying servicing information and predictive failure analysis,
for route optimization, and driver-safety programs. Devices attached to power grid
components can provide deeper insight into the health even of decades old equipment,
and they can help with managing capacity now that consumers turn producers with wind-power
generators and the flow of electricity has become a two-way flow. Smart devices will
also help consumers to closely track their own energy consumption and, obviously,
automate aspects of their households. 
&lt;/p&gt;
&lt;p&gt;
The "Internet of Things" wave will span many more industries and I could easily go
on for many pages with more examples of which none are science-fiction. They're real
and either already deployed in small scale or on the drawing boards of engineers under
active development. 
&lt;/p&gt;
&lt;p&gt;
What's decidedly different about this new Internet wave is that it is driven by an
entirely different class of people and companies as the wave of the consumer Web.
The "Internet of Things" is (surprise!) about "Things" and the drivers are the makers
of such things. Everyday devices and machines that consumers and businesses are buying
today and that the manufacturers are looking to make better for tomorrow. 
&lt;/p&gt;
&lt;p&gt;
The Web is the grand success that it is because it was built for and on people-centric,
general-purpose computing devices. It's also largely focused on people's interaction
with information stores and sources, meaning that the impulse for interaction is usually
coming from the end-user. Where user-initiated requests and the subsequent, hypertext-driven
requests rooting from the same impulse are the overwhelming traffic motivation, the
dominant HTTP protocol with its focus on request/response exchanges initiated by the
client is a logical best fit. 
&lt;/p&gt;
&lt;p&gt;
Web technology also provides for an enormously low barrier of entry for new commercial
providers of software-based services, as those are running on commodity hardware and
solution builders can pick from a great choice of commoditized software platforms. 
&lt;/p&gt;
&lt;h3&gt;The Internet of Things is not the Web 
&lt;/h3&gt;
&lt;p&gt;
There are some good reasons to believe that the Internet of Things will be different
from the Web. 
&lt;/p&gt;
&lt;p&gt;
To play in this space, companies typically start with a set of existing physical products,
a set of use-cases around these products, and very often an established and loyal
customer base that's looking for new capabilities in the things they already use for
their business or personal lives. There are a good number of startups operating in
this space, but disrupting and displacing incumbents in the maritime industries, commercial
vehicles, specialized production machinery, or high-speed train manufacturing may
quite well happen at the component supplier level, but is harder to see coming at
the product level. 
&lt;/p&gt;
&lt;p&gt;
If you are operating fleets of seagoing vessels, taxis, or trucks, or you run an electricity
grid or manage street-lamps, there's a clear set of primary use-cases, like shipping
things from A to B, along with well-established industries supplying machinery for
these use-cases, and the digital component is a value add, not a purpose in itself. 
&lt;/p&gt;
&lt;p&gt;
While a 40,000 feet view onto the topology of a network of devices may look very similar
to the topology of the network of the Web, with an interconnected core of services
and a peripheral cloud of clients. As you get closer, the similarities start waning,
though. While the Web is geared towards a primary interaction pattern where the clients
initiate all activities and interaction is typically some form of information exchange
– may that be a query being traded for a result list or a data-set update traded for
a receipt – the interaction patterns are more differentiated for special-purpose devices
where direct, human interaction is not in focus. 
&lt;/p&gt;
&lt;p&gt;
I generally classify the interaction patterns for 'things' into four major categories:
Telemetry, Inquiries, Commands, and Notifications. 
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Telemetry is the flow of information about the current or temporally aggregated state
of the device or the state of its environment (e.g. readings from its sensors) from
the device to some other party. The information flow is unidirectional and away from
the device. 
&lt;li&gt;
Inquiries are questions that the device has about the state of the outside world based
on its current circumstances; an inquiry can be a singular query akin to a database
lookup, but it might also ask a service to supply a steady flow of information. For
instance, the aforementioned toaster will ask for the weather and get a singular response,
but a vehicle might supply a set of geo-coordinates for a route and ask for continuous
traffic alert updates about particular route until it arrives at the destination.
Only the former of these cases is the regular request/response case that HTTP is geared
towards. 
&lt;li&gt;
Commands are service-initiated instructions sent to the device. Commands can tell
a device to send information about its state – either as a point-in-time observation
or over continuously some period – or to change the state of the device, including
performing activities with effects in the physical world. That includes, for instance,
sending a command from a smartphone app to unlock the doors of your vehicle, whereby
the command first flows to an intermediating service and from there it's routed to
the vehicle's onboard control system. 
&lt;li&gt;
Notifications are one-way, service-initiated messages that inform a device or a group
of devices about some environment state they're otherwise not aware of. Cities may
broadcast information about air pollution alerts suggesting fossil-fueled systems
to throttle CO2 output – or, more simply, a car may want to show weather or news alerts
or text messages to the driver. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
For all four interaction categories it is, except for that one request-response sub-scenario,
a clear requirement to have bi-directional information flow that can be client-initiated
or server-initiated, depending on the particular function's need. 
&lt;/p&gt;
&lt;p&gt;
A requirement that indirectly grows out of the need for server-initiated flow (like
telling your vehicle to toot a tune on its horn using a smartphone app when you've
forgotten in what corner of which level of the structure you've parked at the airport
a week ago) is that there must be a continuously maintained traffic route towards
the client, which may only have to route a few messages per week, but if whenever
a message is sent, the expectation is that the latency is in the order of a few seconds. 
&lt;/p&gt;
&lt;p&gt;
Because the scenarios around 'things' are quite different from those of the Web, where
the focus is on people and their interactions, there's quite a bit of a risk that
its well-known technologies turn into false friends. Are they a fit because they're
ubiquitous? 
&lt;/p&gt;
&lt;h3&gt;VPN to the Rescue? 
&lt;/h3&gt;
&lt;p&gt;
The standard Web interaction model where the client initiates and a service response
is just one out of a several different patterns that are required for connected and
non-interactive 'things', and this presents quite a bit of a challenge. How would
I send a service-originated command or a notification to a connected device? 
&lt;/p&gt;
&lt;p&gt;
One option would indeed be HTTP long-polling or Web Sockets. The client could establish
such a connection and the service would hold on to it and subsequently route all service-originated
messages for the client through the established channel. That's a reasonable strategy,
even if that introduces a solvable, but tricky service-side routing challenge of how
the service will route to that ephemeral socket or pending request across a multi-node
fabric. 
&lt;/p&gt;
&lt;p&gt;
But because that's tricky, many people in the devices space seem to go down a different
route today: They're turning the devices into servers – and suddenly that routing
problem is magically solved. If I can send a notification or command to a device by
ways of issuing an HTTP request to it, I could use off-the-shelf components and HTTP
to implement both the client-to-service Telemetry/Inquiry path and the service-to-client
Command/Notification. Or even if I'm not into HTTP, I could just use whatever standard
or proprietary protocol I like, and yet just treat either party as a server from the
respective other party's perspective. 
&lt;/p&gt;
&lt;p&gt;
That's enormously attractive. It also poses a new challenge. How do I turn a truck
or an off-shore wind-turbine into an addressable server endpoint? The answer to that
question is, across many industries and companies, in unison, "VPN". 
&lt;/p&gt;
&lt;p&gt;
Virtual Private Networks (VPN) provide a link layer integration model between network
participants. Expressed in a more pedestrian fashion, a VPN is akin to hooking everyone
connected to the VPN onto the same Ethernet hub, whereby secured public Internet connections
act as the network cables. Because the VPN illusion is created down at the link level
and largely equivalent to having a network adapter on that network, participants on
the VPN can speak practically any protocol, including but not limited to IPv4 and
IPv6, and all protocols that ride on top of those two. 
&lt;/p&gt;
&lt;p&gt;
The steps for making a field-deployed device network addressable – assuming it supports
VPN – are fairly straightforward: The device first establishes an external network
identity that allows it to connect either to the public Internet or, as it is sometimes
done for GPRS/3G/LTE devices, a carrier-provided closed network by ways of a dedicated
in-network access point. Then it establishes the VPN tunnel by connecting to the VPN
gateway's endpoint, which either resides on the Internet or on the closed network.
Once the tunnel is established, the device is now connected to a separate, second
network: the VPN. 
&lt;/p&gt;
&lt;p&gt;
Assuming that network is an IP network, the device either already has a pre-assigned
address or requests an address lease from the network's DHCP service and is then a
fully addressable network participant within the private address space of the VPN.
If we further assume that the service who wants to address the device has direct or
routed access to the VPN's address space, the service can now directly address the
device and talk to any endpoints the device may be listening on. And because all of
the tunnels into the VPN are secure, all the traffic exchanged between any of the
parties is automatically secure without taking any extra precautions. Perfect solution.
Is it? 
&lt;/p&gt;
&lt;h3&gt;Where's the Catch? 
&lt;/h3&gt;
&lt;p&gt;
The biggest issue with the VPN approach for field-deployed devices lies where many
people would expect it least: Security. That might be a surprise as VPN is often seen
as being seen as almost synonymous with a "secure network space", which is not a proper
way to look at it. 
&lt;/p&gt;
&lt;p&gt;
VPN provides a virtualized and private (isolated) network space. The secure tunnels
are a mechanism to achieve an appropriately protected path into that space, but the
space per-se is not secured, at all. It is indeed a feature that the established VPN
space is fully transparent to all protocol and traffic above the link layer. 
&lt;/p&gt;
&lt;p&gt;
In the two predominant use-cases for VPN technology, its transparency is clearly desirable:
The first use-case is the integration of corporate satellite assets like notebooks
into secure networks. The second key use-case are inter-datacenter links fusing datacenter
or application-scope networks over the public Internet. In the latter case, the connected
parties are presumably following datacenter best-practices for physical and network
access control. In the former case, the client is commonly in the possession of an
authorized employee or vendor, requires individual user credentials for access, is
often protected with a smartcard, is subject to device-level encryption, and often
allows some degree of remote control including remote wipe if the asset becomes compromised.
In both cases, the assets connecting into the VPN are either under immediate control
of personnel authorized by the VPN owner, or there are several layers of safeguards
in place to prevent access to the VPN should the assets become compromised. 
&lt;/p&gt;
&lt;p&gt;
The security of a virtual network space solely depends on controlling and securing
all assets that connect into it, which obviously includes physical access security. 
&lt;/p&gt;
&lt;p&gt;
Now imagine you're an energy utility company planting a farm of wind-turbines into
a field on a remote hill. Or imagine you're a city planting environmental sensors
for pollution, humidity, barometric pressure, and temperature onto rooftops. Or imagine
you're a manufacturer selling network-attachable kitchen appliances to the general
public. 
&lt;/p&gt;
&lt;p&gt;
And now imagine that the way you're creating bi-directional connectivity to these
devices and to make them addressable is by mapping them into a VPN, together with
your services and any other such device – at the link layer. 
&lt;/p&gt;
&lt;p&gt;
How much can you trust or control that these devices don't get physically hijacked
and compromised? What's the attack surface area of your services and the neighboring
devices in case that were to happen? 
&lt;/p&gt;
&lt;p&gt;
It's one of the key principles of security that whoever has physical possession of
a device owns ("pwns") the device from a security perspective. If you're handing complete
strangers networked devices that can log themselves into your VPN based on secrets
present on the device, you should expect that you'll eventually have unauthorized
link-level visitors in the private network that you will have to be prepared to defend
against – and you'll have to defend the device's neighbors as much as the services
you map into the same private network space. 
&lt;/p&gt;
&lt;p&gt;
The security measures you'll have to put in place for this eventuality are largely
equivalent to securing the services and devices as if they were directly attached
to the public Internet. If you get uninvited visitors who exploit a device, you will
have to assume malicious intent; these intruders will not show up by accident. Therefore,
you'll have to firewall all devices, and you have to put authentication and access
control measures on all exposed service endpoints. You'll also have to ensure that
whatever service software stack is running on the device is "Internet hardened" and
that you have an appropriate avenue to promptly distribute security updates, should
that become necessary. 
&lt;/p&gt;
&lt;p&gt;
In addition to the security challenges, only some advanced VPN protocols over IPSec/IKEv2
(RFC 4555) allow for seamless handling of connection failure scenarios, client network
roaming, and reconnect. With devices on unreliable or highly congested networks, or
devices that are used in mobility scenarios where connections may be interrupted because
of signal interruptions, a VPN client without this support will incur the cost of
having to reestablish the tunnel and the VPN session whenever the connection drops.
That, in turn, can lead to routing confusion when a client drops and reconnects and
shows up on different VPN load balanced router while some service-side component wants
to send data to the device. 
&lt;/p&gt;
&lt;p&gt;
Lastly, VPN is very resource hungry for establishing data tunnels to hundreds of thousands
or more small devices that send and receive relatively few and usually fairly small
messages each. It's demanding on the client in terms of the required stack and the
processing needs, which may be a problem for small embedded devices. It's also enormously
resource consuming on the service-side. Current, dedicated hardware for managing 10,000
simultaneous VPN tunnels can easily cost over $100,000 USD with single redundancy
for one site. 
&lt;/p&gt;
&lt;p&gt;
As you contemplate the complexity consequences, it is possible you'll come to the
conclusion that creating a VPN for the connected devices scenario may not be the obvious
best choice that it seemed to be at first. 
&lt;/p&gt;
&lt;h3&gt;Alternatives 
&lt;/h3&gt;
&lt;p&gt;
Even with the laid out constraints, VPN might be a viable model to enable two-way
connectivity, if you're willing to make the right security investments on top, and
if the devices are capable enough. 
&lt;/p&gt;
&lt;p&gt;
If a VPN solution and its consequential complexities were indeed turning out to be
too heavyweight for you, you'll again have the problem of how to make the devices
individually addressable in order to send a service-originated command or a notification
to a connected device. 
&lt;/p&gt;
&lt;p&gt;
As mentioned, one possible alternative would be a long-polling Web Sockets based gateway,
where the client establishes a connection that the service holds on to, and subsequently
routes service-originated messages through the established channel back up to the
client. 
&lt;/p&gt;
&lt;p&gt;
The advantage of this model is that the client will not have to be directly addressable.
If the gateway is hosted on a public-facing Internet address, the client can establish
a connection coming through any layers of NATs and/or Proxies and/or Firewalls and
the service can route information back over that established link through these intermediary
infrastructures. 
&lt;/p&gt;
&lt;p&gt;
What this model still wouldn't solve well is the case of clients that get occasionally
disconnected due to weak wireless signals or congested networks. The client can park
one of these sockets on the gateway and make itself known, but if the connection collapses
and the device is out of reach for a little while and a message arrives for it, where
does that message go? 
&lt;/p&gt;
&lt;p&gt;
Also, once the client comes back it may connect to a different gateway machine by
ways of a load balancer, so if you're retaining that message on the original gateway
node, you'd now have to route it to the current gateway node. Because the 'current'
node may shift if the device repeatedly connects and disconnect when it is, for instance,
at the edge of the wireless coverage area, chasing the client gets fairly complicated.
And that's something you'd have to build. 
&lt;/p&gt;
&lt;h3&gt;Messaging 
&lt;/h3&gt;
&lt;p&gt;
A very practical and fairly straightforward solution to the entirely problem space
is to use a scalable and Internet-facing messaging system using a bi-directional and
multiplexing protocol like AMQP to facilitate the outbound as well as the inbound
device traffic. 
&lt;/p&gt;
&lt;p&gt;
If each device is assigned an exclusive queue or a filtered subscription on a pub/sub
topic for messages to it, the addressing problem is moved from the edge where the
device (VPN) or its connection (Web Sockets) must be identified to one where messages
for a device get routed to a well-known and stable location in the system and from
which the device can pick them up as it can, depending on connectivity state. When
a message is sent and the device is connected and waiting for a message, the message
can be delivered in a matter of a few milliseconds. If the device is temporarily offline,
it can pick up messages whenever it regains network access – unless the message expire,
which is an option in most common messaging systems so that a command like "unlock
door" isn't executed to everyone's surprise a day later if the device was disconnected
for that long. 
&lt;/p&gt;
&lt;p&gt;
Since the devices will pull messages from the messaging system and send messages on
the same path and with AMQP also over the very same multiplexed connection, the communication
path – likely enveloped with SSL/TLS – is as secure as a VPN tunnel and an HTTPS-wrapped
Web Socket, and have the same advantages as the Web Socket path in terms of not exposing
the client to unwanted traffic because all traffic is outbound and coming from behind
existing protection layers. 
&lt;/p&gt;
&lt;p&gt;
From a scalability perspective, a scalable pub/sub system with addressable entities
and well-known scale characteristics also provides a good structure to allow for cleanly
partitioning devices and device-groups across as many queues and topics as needed
to accommodate a large device population. 
&lt;/p&gt;
&lt;h3&gt;Conclusion 
&lt;/h3&gt;
&lt;p&gt;
Using VPNs for device connectivity is a viable if the solution addresses the inherent
security issues. Using a VPN doesn't equate creating a secure network space. It creates
a virtual network space with full fidelity at the link layer with protected paths
into that network space. That's a big difference. The tax that needs to be paid for
VPN support on the client is not insignificant, and securing the virtualized network
doesn't pose a smaller challenge than securing Internet-exposed devices, especially
when those devices are outside the manufacturer's or operator's immediate physical
control. 
&lt;/p&gt;
&lt;p&gt;
After weighing these costs, a solution that builds purely on simple, client-originated
connectivity with overlaid transport layer security is not only much simpler, but
doesn't carry the same security risks or infrastructure tax. 
&lt;/p&gt;
&lt;p&gt;
Using a messaging system as the gateway technology for these client-originated connections
where each client has a designated 'mailbox' in form of a queue or topic also elegantly
solves the addressability issue with the added benefit of being resilient against
occasional connection loss – while not causing significant extra latency cost or overhead. 
&lt;/p&gt;
&lt;p&gt;
For a walkthrough on how to architect a system of this kind, I'll recommend taking
a look at &lt;a href="http://msdn.microsoft.com/en-us/magazine/jj133819.aspx"&gt;my June
2012 MSDN Magazine article&lt;/a&gt; (which may have been published a year before its time)
and you can expect more on this topic here in the upcoming months. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=588029f1-01c8-481a-a5e7-dd761f22893f" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,588029f1-01c8-481a-a5e7-dd761f22893f.aspx</comments>
      <category>Architecture</category>
      <category>IoT</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=36989ffc-6c04-4ac0-910d-848b11f00faf</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,36989ffc-6c04-4ac0-910d-848b11f00faf.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,36989ffc-6c04-4ac0-910d-848b11f00faf.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=36989ffc-6c04-4ac0-910d-848b11f00faf</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p align="center">
          <iframe style="height: 288px; width: 512px" src="http://channel9.msdn.com/Blogs/Subscribe/Service-Bus-Notification-Hubs-Code-Walkthrough-Windows-8-Edition/player?w=512&amp;h=288" frameborder="0" scrolling="no">
          </iframe>
        </p>
        <p>
          <em>
          </em>
        </p>
        <p>
          <em>Service Bus Notification Hubs </em>are a brand new intrinsic feature of Windows
Azure Service Bus and are different from other push notification services in four
key areas:
</p>
        <ul>
          <li>
Complete client registration management. Your backend application (if you even have
one) does not need to worry at all about device-ids or channels or other particulars
of push notifications and doesn't need to cooperate in management. It doesn't even
have to be a web app that's publicly accessible.   
</li>
          <li>
Platform independence. Service Bus Notification Hubs allow cross-platform push notifications
so that iOS Alerts and Windows Live Tiles can be targeted with a single event message.  
</li>
          <li>
Broadcast and tag-based Multicast - Service Bus Notification Hubs are optimized around
automatic notification broadcast to many thousand devices with low latency. One message
in, thousands of notifications out. 
</li>
          <li>
Mass customization - Notification Hub notification templates allow for customization
of notification delivery for each individual registration, allowing each instance
of a client App to choose how it wants to receive events. 
</li>
        </ul>
        <p>
In this preview, Notification Hubs are able to push notifications to Windows Store
apps and iOS apps from .NET back-ends. Support for Android and Windows Phone, along
with additional back-end technologies (including Windows Azure Mobile Services) will
be added soon.
</p>
        <p>
After the basic intro, I'm showing how to create and provision a Windows 8 application
from scratch, how to hook it up to a new Notification Hub, and send it a notification
"Toast" using the portals and Visual Studio 2012. (The equivalent iOS walkthrough
will follow later this week)
</p>
        <p>
For those of you with a "TL;DW" attention span (too long; didn't watch),
here's the whole extent of the code added to the stock Windows Store Grid template
to enable Service Bus Notifications and that includes re-registering existing registrations
at App startup. 5 lines without cosmetic wrapping and some massaging of XML for the
template:
</p>
        <p>
          <font face="Courier New">public App() 
<br />
{ 
<br />
    var cn = ConnectionString.CreateUsingSharedAccessSecretWithListenAccess( 
<br />
            "sb://clemensv1.servicebus.windows.net", 
<br />
            "{{secret-key}}"); 
<br />
    this.notificationHub = new NotificationHub("myhub", cn);</font>
        </p>
        <p>
          <font face="Courier New">    ... 
<br />
}</font>
        </p>
        <p>
          <font face="Courier New">async Task InitNotificationsAsync() 
<br />
{ 
<br />
    await notificationHub.RefreshRegistrationsAsync(); 
<br /><br />
    if (!await notificationHub.RegistrationExistsForApplicationAsync("myToast")) 
<br />
    { 
<br />
        await notificationHub.CreateTemplateRegistrationForApplicationAsync( 
<br />
            CreateTemplate(),
"myToast"); 
<br />
    } 
<br />
} 
<br />
         
<br />
XmlDocument CreateTemplate() 
<br />
{ 
<br />
    var t = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText01); 
<br />
    var n = t.SelectSingleNode("//text[@id='1']") as XmlElement; 
<br />
    if (n != null) 
<br />
    { 
<br />
        n.InnerText = "$(msg)"; 
<br />
    } 
<br />
    return t; 
<br />
}</font>
        </p>
        <p>
The event-source code is similarly terse:
</p>
        <p>
          <font face="Courier New">var cn = ServiceBusConnectionStringBuilder.CreateUsingSharedAccessSecretWithFullAccess( 
<br />
    "clemensv1", "{{{secret key}}"); 
<br /><br />
var hubClient = NotificationHubClient. 
<br />
    CreateClientFromConnectionString(cn, "myhub"); 
<br /><br />
hubClient.SendTemplateNotification(new Dictionary&lt;string, string&gt;{ 
<br />
    { "msg", TextBox1.Text }});</font>
        </p>
        <p>
3 lines. Three lines. No management of device ids. No public endpoint for the phone
to talk to. Service Bus does all that. It really is worth playing with. 
</p>
        <p>
And here are all the key links ....
</p>
        <ul>
          <li>
            <span>Feature guide (Windows Store Apps) - </span>
            <a href="http://go.microsoft.com/fwlink/?LinkID=275828">http://go.microsoft.com/fwlink/?LinkID=275828</a>
          </li>
          <li>
            <span>Feature guide (iOS) -  </span>
            <a href="http://go.microsoft.com/fwlink/?LinkId=275829">http://go.microsoft.com/fwlink/?LinkId=275829</a>
          </li>
          <li>
            <span>Fundamentals - </span>
            <a href="http://go.microsoft.com/fwlink/?LinkId=277072">http://go.microsoft.com/fwlink/?LinkId=277072</a>
          </li>
          <li>
            <span>Tutorial (Windows Store Apps) - </span>
            <a href="http://go.microsoft.com/fwlink/?LinkId=277073">http://go.microsoft.com/fwlink/?LinkId=277073</a>
          </li>
          <li>
            <span>Tutorial (iOS) - </span>
            <a href="http://go.microsoft.com/fwlink/?LinkId=277074">http://go.microsoft.com/fwlink/?LinkId=277074</a>
          </li>
        </ul>
        <p>
SDKs:
</p>
        <ul>
          <li>
            <strong>Windows 8 Managed Client Library -</strong> <a href="http://go.microsoft.com/fwlink/?LinkID=277160">http://go.microsoft.com/fwlink/?LinkID=277160</a></li>
          <li>
            <strong>iOS Client Library - </strong>
            <a href="http://go.microsoft.com/fwlink/?LinkID=277161">http://go.microsoft.com/fwlink/?LinkID=277161</a>
          </li>
          <li>
            <strong>Preview client NuGet -</strong> <a href="http://nuget.org/packages/ServiceBus.Preview">http://nuget.org/packages/ServiceBus.Preview</a></li>
        </ul>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=36989ffc-6c04-4ac0-910d-848b11f00faf" />
      </body>
      <title>Service Bus Notification Hubs &amp;ndash; Concepts and Code Walkthrough - Windows 8 Edition</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,36989ffc-6c04-4ac0-910d-848b11f00faf.aspx</guid>
      <link>http://vasters.com/clemensv/2013/01/23/Service+Bus+Notification+Hubs+Ndash+Concepts+And+Code+Walkthrough+Windows+8+Edition.aspx</link>
      <pubDate>Wed, 23 Jan 2013 08:03:46 GMT</pubDate>
      <description>&lt;p align="center"&gt;
&lt;iframe style="height: 288px; width: 512px" src="http://channel9.msdn.com/Blogs/Subscribe/Service-Bus-Notification-Hubs-Code-Walkthrough-Windows-8-Edition/player?w=512&amp;amp;h=288" frameborder="0" scrolling="no"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Service Bus Notification Hubs &lt;/em&gt;are a brand new intrinsic feature of Windows
Azure Service Bus and are different from other push notification services in four
key areas:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Complete client registration management. Your backend application (if you even have
one) does not need to worry at all about device-ids or channels or other particulars
of push notifications and doesn't need to cooperate in management. It doesn't even
have to be a web app that's publicly accessible.&amp;#160;&amp;#160; 
&lt;/li&gt;
&lt;li&gt;
Platform independence. Service Bus Notification Hubs allow cross-platform push notifications
so that iOS Alerts and Windows Live Tiles can be targeted with a single event message.&amp;#160; 
&lt;/li&gt;
&lt;li&gt;
Broadcast and tag-based Multicast - Service Bus Notification Hubs are optimized around
automatic notification broadcast to many thousand devices with low latency. One message
in, thousands of notifications out. 
&lt;/li&gt;
&lt;li&gt;
Mass customization - Notification Hub notification templates allow for customization
of notification delivery for each individual registration, allowing each instance
of a client App to choose how it wants to receive events. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
In this preview, Notification Hubs are able to push notifications to Windows Store
apps and iOS apps from .NET back-ends. Support for Android and Windows Phone, along
with additional back-end technologies (including Windows Azure Mobile Services) will
be added soon.
&lt;/p&gt;
&lt;p&gt;
After the basic intro, I'm showing how to create and provision a Windows 8 application
from scratch, how to hook it up to a new Notification Hub, and send it a notification
&amp;quot;Toast&amp;quot; using the portals and Visual Studio 2012. (The equivalent iOS walkthrough
will follow later this week)
&lt;/p&gt;
&lt;p&gt;
For those of you with a &amp;quot;TL;DW&amp;quot; attention span (too long; didn't watch),
here's the whole extent of the code added to the stock Windows Store Grid template
to enable Service Bus Notifications and that includes re-registering existing registrations
at App startup. 5 lines without cosmetic wrapping and some massaging of XML for the
template:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;public App() 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; var cn = ConnectionString.CreateUsingSharedAccessSecretWithListenAccess( 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;sb://clemensv1.servicebus.windows.net&amp;quot;, 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;quot;{{secret-key}}&amp;quot;); 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; this.notificationHub = new NotificationHub(&amp;quot;myhub&amp;quot;, cn);&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160; ... 
&lt;br /&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;async Task InitNotificationsAsync() 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; await notificationHub.RefreshRegistrationsAsync(); 
&lt;br /&gt;
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; if (!await notificationHub.RegistrationExistsForApplicationAsync(&amp;quot;myToast&amp;quot;)) 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; { 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; await notificationHub.CreateTemplateRegistrationForApplicationAsync( 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; CreateTemplate(),
&amp;quot;myToast&amp;quot;); 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; } 
&lt;br /&gt;
} 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
XmlDocument CreateTemplate() 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; var t = ToastNotificationManager.GetTemplateContent(ToastTemplateType.ToastText01); 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; var n = t.SelectSingleNode(&amp;quot;//text[@id='1']&amp;quot;) as XmlElement; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; if (n != null) 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; { 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; n.InnerText = &amp;quot;$(msg)&amp;quot;; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; } 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; return t; 
&lt;br /&gt;
}&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
The event-source code is similarly terse:
&lt;/p&gt;
&lt;p&gt;
&lt;font face="Courier New"&gt;var cn = ServiceBusConnectionStringBuilder.CreateUsingSharedAccessSecretWithFullAccess( 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;quot;clemensv1&amp;quot;, &amp;quot;{{{secret key}}&amp;quot;); 
&lt;br /&gt;
&lt;br /&gt;
var hubClient = NotificationHubClient. 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; CreateClientFromConnectionString(cn, &amp;quot;myhub&amp;quot;); 
&lt;br /&gt;
&lt;br /&gt;
hubClient.SendTemplateNotification(new Dictionary&amp;lt;string, string&amp;gt;{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; { &amp;quot;msg&amp;quot;, TextBox1.Text }});&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
3 lines. Three lines. No management of device ids. No public endpoint for the phone
to talk to. Service Bus does all that. It really is worth playing with. 
&lt;/p&gt;
&lt;p&gt;
And here are all the key links ....
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;span&gt;Feature guide (Windows Store Apps) - &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=275828"&gt;http://go.microsoft.com/fwlink/?LinkID=275828&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;Feature guide (iOS) -&amp;#160; &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=275829"&gt;http://go.microsoft.com/fwlink/?LinkId=275829&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;Fundamentals - &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=277072"&gt;http://go.microsoft.com/fwlink/?LinkId=277072&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;Tutorial (Windows Store Apps) - &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=277073"&gt;http://go.microsoft.com/fwlink/?LinkId=277073&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;span&gt;Tutorial (iOS) - &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=277074"&gt;http://go.microsoft.com/fwlink/?LinkId=277074&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
SDKs:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows 8 Managed Client Library -&lt;/strong&gt;&amp;#160;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=277160"&gt;http://go.microsoft.com/fwlink/?LinkID=277160&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iOS Client Library - &lt;/strong&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=277161"&gt;http://go.microsoft.com/fwlink/?LinkID=277161&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Preview client NuGet -&lt;/strong&gt;&amp;#160;&lt;a href="http://nuget.org/packages/ServiceBus.Preview"&gt;http://nuget.org/packages/ServiceBus.Preview&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=36989ffc-6c04-4ac0-910d-848b11f00faf" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,36989ffc-6c04-4ac0-910d-848b11f00faf.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=4718bf97-cc2e-46ba-854a-f4a1d93fb2a9</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,4718bf97-cc2e-46ba-854a-f4a1d93fb2a9.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,4718bf97-cc2e-46ba-854a-f4a1d93fb2a9.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=4718bf97-cc2e-46ba-854a-f4a1d93fb2a9</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://en.wikipedia.org/wiki/File:ESB.png">
            <img style="BORDER-LEFT-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px; BACKGROUND-IMAGE: none; BORDER-BOTTOM-WIDTH: 0px; FLOAT: right; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 2px 0px 2px 5px; DISPLAY: inline; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px" border="0" alt="File:ESB.png" align="right" src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/80/ESB.png/751px-ESB.png" width="300" height="240" />
          </a>The
basic idea of the Enterprise Service Bus paints a wonderful picture of a harmonious
coexistence, integration, and collaboration of software services. Services for a particular
general cause are built or procured once and reused across the Enterprise by ways
of publishing them and their capabilities in a corporate services repository from
where they can be discovered. The repository holds contracts and policy that allows
dynamically generating functional adapters to integrate with services. Collaboration
and communication is virtualized through an intermediary layer that knows how to translate
messages from and to any other service hooked into the ESB like a babel fish in the
Hitchhiker’s Guide to the Galaxy. The ESB is a bus, meaning it aspires to be a smart,
virtualizing, mediating, orchestrating messaging substrate permeating the Enterprise,
providing uniform and mediated access anytime and anywhere throughout today’s global
Enterprise. That idea is so beautiful, it rivals My Little Pony. Sadly, it’s also
about as realistic. We tried regardless.
</p>
        <p>
As with many utopian ideas, before we can get to the pure ideal of an ESB, there’s
some less ideal and usually fairly ugly phase involved where non-conformant services
are made conformant. Until they are turned into WS-* services, any CICS transaction
and SAP BAPI is fronted with a translator and as that skinning renovation takes place,
there’s also some optimization around message flow, meaning messages get batched or
de-batched, enriched or reduced. In that phase, there was also learning of the value
and lure of the benefits of central control. SOA Governance is an interesting idea
to get customers drunk on. That ultimately led to cheating on the ‘B’. When you look
around and look at products proudly carrying the moniker ‘Enterprise Service Bus’
you will see hubs. In practice, the B in ESB is mostly just a lie. Some vendors sell
ESB servers, some even sell ESB appliances. If you need to walk to a central place
to talk to anyone, it’s a hub. Not a bus. 
</p>
        <p>
Yet, the bus does exist. The IP network is the bus. It turns out to suit us well on
the Internet. Mind that I’m explicitly talking about “IP network” and not “Web” as
I do believe that there are very many useful protocols beyond HTTP. The Web is obviously
the banner example for a successful implementation of services on the IP network that
does just fine without any form of centralized services other than the highly redundant
domain name system. 
</p>
        <p>
Centralized control over services does not scale in any dimension. Intentionally creating
a bottleneck through a centrally controlling committee of ESB machines, however far
scaled out, is not a winning proposition in a time where every potential or actual
customer carries a powerful computer in their pockets allowing to initiate ad-hoc
transactions at any time and from anywhere and where we see vehicles, machines and
devices increasingly spew out telemetry and accept remote control commands. Central
control and policy driven governance over all services in an Enterprise also kills
all agility and reduces the ability to adapt services to changing needs because governance
invariably implies process and certification. Five-year plan, anyone? 
</p>
        <p>
If the ESB architecture ideal weren’t a failure already, the competitive pressure
to adopt direct digital interaction with customers via Web and Apps, and therefore
scale up not to the scale of the enterprise, but to scale up to the scale of the enterprise’s
customer base will seal its collapse. 
</p>
        <h3>Service Orientation
</h3>
        <p>
While the ESB as a concept permeating the entire Enterprise is dead, the related notion
of Service Orientation is thriving even though the <a href="http://msdn.microsoft.com/en-us/library/ff648318.aspx#SOATenets">four
tenets of SOA</a> are rarely mentioned anymore. HTTP-based services on the Web embrace
explicit message passing. They mostly do so over the baseline application contract
and negotiated payloads that the HTTP specification provides for. In the case of SOAP
or XML-RPC, they are using abstractions on top that have their own application protocol
semantics. Services are clearly understood as units of management, deployment, and
versioning and that understanding is codified in most platform-as-a-service offerings. 
</p>
        <p>
That said, while explicit boundaries, autonomy, and contract sharing have been clearly
established, the notion of policy-driven compatibility – arguably a political addition
to the list to motivate WS-Policy as the time – has generally been replaced by something
even more powerful: Code. JavaScript code to be more precise. Instead of trying to
tell a generic client how to adapt to service settings by ways of giving it a complex
document explaining what switches to turn, clients now get code that turns the switches
outright. The successful alternative is to simply provide no choice. There’s one way
to gain access authorization for a service, period. The “policy” is in the docs. 
</p>
        <p>
The REST architecture model is service oriented – and I am not meaning to imply that
it is so because of any particular influence. The foundational principles were becoming
common sense around the time when these terms were coined and as the notion of broadly
interoperable programmable services started to gain traction in the late 1990s – the
subsequent grand dissent that arose was around whether pure HTTP was sufficient to
build these services, or whether the ambitious multi-protocol abstraction for WS-*
would be needed. I think it’s fairly easy to declare the winner there. 
</p>
        <h3>Federated Autonomous Services
</h3>
        <p>
          <a href="http://vasters.com/clemensv/content/binary/Windows-Live-Writer/Utopia-ESB_87DD/image_2.png">
            <img title="image" style="BORDER-LEFT-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px; BACKGROUND-IMAGE: none; BORDER-BOTTOM-WIDTH: 0px; FLOAT: right; PADDING-TOP: 0px; PADDING-LEFT: 0px; DISPLAY: inline; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px" border="0" alt="image" align="right" src="http://vasters.com/clemensv/content/binary/Windows-Live-Writer/Utopia-ESB_87DD/image_thumb.png" width="240" height="213" />
          </a>Windows
Azure, to name a system that would surely be one to fit the kind of solution complexity
that ESBs were aimed at, is a very large distributed system with a significant number
of independent multi-tenant services and deployments that are spread across many data
centers. In addition to the publicly exposed capabilities, there are quite a number
of “invisible” services for provisioning, usage tracking and analysis, billing, diagnostics,
deployment, and other purposes.  Some components of these internal services integrate
with external providers. Windows Azure doesn’t use an ESB. Windows Azure is a federation
of autonomous services.
</p>
        <p>
The basic shape of each of these services is effectively identical and that’s not
owing, at least not to my knowledge, to any central architectural directive even though
the services that shipped after the initial wave certainly took a good look at the
patterns that emerged. Practically all services have a gateway whose purpose it is
to handle and dispatch and sometimes preprocess incoming network requests or sessions
and a backend that ultimately fulfills the requests. The services interact through
public IP space, meaning that if Service Bus wants to talk to its SQL Database backend
it is using a public IP address and not some private IP. The Internet is the bus.
The backend and its structure is entirely a private implementation matter.  It
could be a single role or many roles. 
</p>
        <p>
Any gateway’s job is to provide network request management, which includes establishing
and maintaining sessions, session security and authorization, API versioning where
multiple variants of the same API are often provided in parallel, usage tracking,
defense mechanisms, and diagnostics for its areas of responsibility. This functionality
is specific and inherent to the service. And it’s not all HTTP. SQL database has a
gateway that speaks the Tabular Data Stream protocol (TDS) over TCP, for instance,
and Service Bus has a gateway that speaks AMQP and the binary proprietary Relay and
Messaging protocols.
</p>
        <p>
Governance and diagnostics doesn’t work by putting a man in the middle and watching
the traffic coming by, which is akin to trying the tell whether a business is healthy
by counting the trucks going to their warehouse. Instead we are integrating the data
feeds that come out of the respective services and are generated fully knowing the
internal state, and concentrate these data streams, like the billing stream, in yet
other services that are also autonomous and have their own gateways. All these services
interact and integrate even though they’re built by a composite team far exceeding
the scale of most Enterprise’s largest projects, and while teams run on separate schedules
where deployments into the overall system happen multiple times daily. It works because
each service owns its gateway, is explicit about its versioning strategy, and has
a very clear mandate to honor published contracts, which includes explicit regression
testing. It would be unfathomable to maintain a system of this scale through a centrally
governed switchboard service like an ESB.
</p>
        <p>
Well, where does that leave “ESB technologies” like BizTalk Server? The answer is
simply that they’re being used for what they’re commonly used for in practice. As
a gateway technology. Once a service in such a federation would have to adhere to
a particular industry standard for commerce, for instance if it would have to understand
EDIFACT or X.12 messages sent to it, the Gateway would employ an appropriate and proven
implementation and thus likely rely on BizTalk if implemented on the Microsoft stack.
If a service would have to speak to an external service for which it would have to
build EDI exchanges, it would likely be very cost effective to also use BizTalk as
the appropriate tool for that outbound integration. Likewise, if data would have to
be extracted from backend-internal message traffic for tracking purposes and BizTalk’s
BAM capabilities would be a fit, it might be a reasonable component to use for that.
If there’s a long running process around exchanging electronic documents, BizTalk
Orchestration might be appropriate, if there’s a document exchange involving humans
then SharePoint and/or Workflow would be a good candidate from the toolset. 
</p>
        <p>
For most services, the key gateway technology of choice is HTTP using frameworks like
ASP.NET, Web API, probably paired with IIS features like application request routing
and the gateway is largely stateless.
</p>
        <p>
In this context, <em>Windows Azure Service Bus</em> is, in fact, a technology choice
to implement application gateways. A Service Bus namespace thus forms a message bus
for “a service” and not for “all services”. It’s as scoped to a service or a set of
related services as an IIS site is usually scoped to one or a few related services.
The Relay is a way to place a gateway into the cloud for services where the backend
resides outside of the cloud environment and it also allows for multiple systems,
e.g. branch systems, to be federated into a single gateway to be addressed from other
systems and thus form a gateway of gateways. The messaging capabilities with Queues
and Pub/Sub Topics provide a way for inbound traffic to be authorized and queued up
on behalf of the service, with Service Bus acting as the mediator and first line of
defense and where a service will never get a message from the outside world unless
it explicitly fetches it from Service Bus. The service can’t be overstressed and it
can’t be accessed except through sending it a message. 
</p>
        <p>
The next logical step on that journey is to provide federation capabilities with reliable
handoff of message between services, meaning that you can safely enqueue a message
within a service and then have Service Bus replicate that message (or one copy in
the case of pub/sub) over to another service’s Gateway – across namespaces and across
datacenters or your own sites, and using the open AMQP protocol. You can do that today
with a few lines of code, but this will become inherent to the system later this year. 
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4718bf97-cc2e-46ba-854a-f4a1d93fb2a9" />
      </body>
      <title>Utopia ESB</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,4718bf97-cc2e-46ba-854a-f4a1d93fb2a9.aspx</guid>
      <link>http://vasters.com/clemensv/2013/01/15/Utopia+ESB.aspx</link>
      <pubDate>Tue, 15 Jan 2013 18:56:36 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://en.wikipedia.org/wiki/File:ESB.png"&gt;&lt;img style="BORDER-LEFT-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px; BACKGROUND-IMAGE: none; BORDER-BOTTOM-WIDTH: 0px; FLOAT: right; PADDING-TOP: 0px; PADDING-LEFT: 0px; MARGIN: 2px 0px 2px 5px; DISPLAY: inline; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px" border=0 alt=File:ESB.png align=right src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/80/ESB.png/751px-ESB.png" width=300 height=240&gt;&lt;/a&gt;The
basic idea of the Enterprise Service Bus paints a wonderful picture of a harmonious
coexistence, integration, and collaboration of software services. Services for a particular
general cause are built or procured once and reused across the Enterprise by ways
of publishing them and their capabilities in a corporate services repository from
where they can be discovered. The repository holds contracts and policy that allows
dynamically generating functional adapters to integrate with services. Collaboration
and communication is virtualized through an intermediary layer that knows how to translate
messages from and to any other service hooked into the ESB like a babel fish in the
Hitchhiker’s Guide to the Galaxy. The ESB is a bus, meaning it aspires to be a smart,
virtualizing, mediating, orchestrating messaging substrate permeating the Enterprise,
providing uniform and mediated access anytime and anywhere throughout today’s global
Enterprise. That idea is so beautiful, it rivals My Little Pony. Sadly, it’s also
about as realistic. We tried regardless.
&lt;/p&gt;
&lt;p&gt;
As with many utopian ideas, before we can get to the pure ideal of an ESB, there’s
some less ideal and usually fairly ugly phase involved where non-conformant services
are made conformant. Until they are turned into WS-* services, any CICS transaction
and SAP BAPI is fronted with a translator and as that skinning renovation takes place,
there’s also some optimization around message flow, meaning messages get batched or
de-batched, enriched or reduced. In that phase, there was also learning of the value
and lure of the benefits of central control. SOA Governance is an interesting idea
to get customers drunk on. That ultimately led to cheating on the ‘B’. When you look
around and look at products proudly carrying the moniker ‘Enterprise Service Bus’
you will see hubs. In practice, the B in ESB is mostly just a lie. Some vendors sell
ESB servers, some even sell ESB appliances. If you need to walk to a central place
to talk to anyone, it’s a hub. Not a bus. 
&lt;/p&gt;
&lt;p&gt;
Yet, the bus does exist. The IP network is the bus. It turns out to suit us well on
the Internet. Mind that I’m explicitly talking about “IP network” and not “Web” as
I do believe that there are very many useful protocols beyond HTTP. The Web is obviously
the banner example for a successful implementation of services on the IP network that
does just fine without any form of centralized services other than the highly redundant
domain name system. 
&lt;/p&gt;
&lt;p&gt;
Centralized control over services does not scale in any dimension. Intentionally creating
a bottleneck through a centrally controlling committee of ESB machines, however far
scaled out, is not a winning proposition in a time where every potential or actual
customer carries a powerful computer in their pockets allowing to initiate ad-hoc
transactions at any time and from anywhere and where we see vehicles, machines and
devices increasingly spew out telemetry and accept remote control commands. Central
control and policy driven governance over all services in an Enterprise also kills
all agility and reduces the ability to adapt services to changing needs because governance
invariably implies process and certification. Five-year plan, anyone? 
&lt;/p&gt;
&lt;p&gt;
If the ESB architecture ideal weren’t a failure already, the competitive pressure
to adopt direct digital interaction with customers via Web and Apps, and therefore
scale up not to the scale of the enterprise, but to scale up to the scale of the enterprise’s
customer base will seal its collapse. 
&lt;/p&gt;
&lt;h3&gt;Service Orientation
&lt;/h3&gt;
&lt;p&gt;
While the ESB as a concept permeating the entire Enterprise is dead, the related notion
of Service Orientation is thriving even though the &lt;a href="http://msdn.microsoft.com/en-us/library/ff648318.aspx#SOATenets"&gt;four
tenets of SOA&lt;/a&gt; are rarely mentioned anymore. HTTP-based services on the Web embrace
explicit message passing. They mostly do so over the baseline application contract
and negotiated payloads that the HTTP specification provides for. In the case of SOAP
or XML-RPC, they are using abstractions on top that have their own application protocol
semantics. Services are clearly understood as units of management, deployment, and
versioning and that understanding is codified in most platform-as-a-service offerings. 
&lt;/p&gt;
&lt;p&gt;
That said, while explicit boundaries, autonomy, and contract sharing have been clearly
established, the notion of policy-driven compatibility – arguably a political addition
to the list to motivate WS-Policy as the time – has generally been replaced by something
even more powerful: Code. JavaScript code to be more precise. Instead of trying to
tell a generic client how to adapt to service settings by ways of giving it a complex
document explaining what switches to turn, clients now get code that turns the switches
outright. The successful alternative is to simply provide no choice. There’s one way
to gain access authorization for a service, period. The “policy” is in the docs. 
&lt;/p&gt;
&lt;p&gt;
The REST architecture model is service oriented – and I am not meaning to imply that
it is so because of any particular influence. The foundational principles were becoming
common sense around the time when these terms were coined and as the notion of broadly
interoperable programmable services started to gain traction in the late 1990s – the
subsequent grand dissent that arose was around whether pure HTTP was sufficient to
build these services, or whether the ambitious multi-protocol abstraction for WS-*
would be needed. I think it’s fairly easy to declare the winner there. 
&lt;/p&gt;
&lt;h3&gt;Federated Autonomous Services
&lt;/h3&gt;
&lt;p&gt;
&lt;a href="http://vasters.com/clemensv/content/binary/Windows-Live-Writer/Utopia-ESB_87DD/image_2.png"&gt;&lt;img title=image style="BORDER-LEFT-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px; BACKGROUND-IMAGE: none; BORDER-BOTTOM-WIDTH: 0px; FLOAT: right; PADDING-TOP: 0px; PADDING-LEFT: 0px; DISPLAY: inline; PADDING-RIGHT: 0px; BORDER-TOP-WIDTH: 0px" border=0 alt=image align=right src="http://vasters.com/clemensv/content/binary/Windows-Live-Writer/Utopia-ESB_87DD/image_thumb.png" width=240 height=213&gt;&lt;/a&gt;Windows
Azure, to name a system that would surely be one to fit the kind of solution complexity
that ESBs were aimed at, is a very large distributed system with a significant number
of independent multi-tenant services and deployments that are spread across many data
centers. In addition to the publicly exposed capabilities, there are quite a number
of “invisible” services for provisioning, usage tracking and analysis, billing, diagnostics,
deployment, and other purposes.&amp;nbsp; Some components of these internal services integrate
with external providers. Windows Azure doesn’t use an ESB. Windows Azure is a federation
of autonomous services.
&lt;/p&gt;
&lt;p&gt;
The basic shape of each of these services is effectively identical and that’s not
owing, at least not to my knowledge, to any central architectural directive even though
the services that shipped after the initial wave certainly took a good look at the
patterns that emerged. Practically all services have a gateway whose purpose it is
to handle and dispatch and sometimes preprocess incoming network requests or sessions
and a backend that ultimately fulfills the requests. The services interact through
public IP space, meaning that if Service Bus wants to talk to its SQL Database backend
it is using a public IP address and not some private IP. The Internet is the bus.
The backend and its structure is entirely a private implementation matter.&amp;nbsp; It
could be a single role or many roles. 
&lt;/p&gt;
&lt;p&gt;
Any gateway’s job is to provide network request management, which includes establishing
and maintaining sessions, session security and authorization, API versioning where
multiple variants of the same API are often provided in parallel, usage tracking,
defense mechanisms, and diagnostics for its areas of responsibility. This functionality
is specific and inherent to the service. And it’s not all HTTP. SQL database has a
gateway that speaks the Tabular Data Stream protocol (TDS) over TCP, for instance,
and Service Bus has a gateway that speaks AMQP and the binary proprietary Relay and
Messaging protocols.
&lt;/p&gt;
&lt;p&gt;
Governance and diagnostics doesn’t work by putting a man in the middle and watching
the traffic coming by, which is akin to trying the tell whether a business is healthy
by counting the trucks going to their warehouse. Instead we are integrating the data
feeds that come out of the respective services and are generated fully knowing the
internal state, and concentrate these data streams, like the billing stream, in yet
other services that are also autonomous and have their own gateways. All these services
interact and integrate even though they’re built by a composite team far exceeding
the scale of most Enterprise’s largest projects, and while teams run on separate schedules
where deployments into the overall system happen multiple times daily. It works because
each service owns its gateway, is explicit about its versioning strategy, and has
a very clear mandate to honor published contracts, which includes explicit regression
testing. It would be unfathomable to maintain a system of this scale through a centrally
governed switchboard service like an ESB.
&lt;/p&gt;
&lt;p&gt;
Well, where does that leave “ESB technologies” like BizTalk Server? The answer is
simply that they’re being used for what they’re commonly used for in practice. As
a gateway technology. Once a service in such a federation would have to adhere to
a particular industry standard for commerce, for instance if it would have to understand
EDIFACT or X.12 messages sent to it, the Gateway would employ an appropriate and proven
implementation and thus likely rely on BizTalk if implemented on the Microsoft stack.
If a service would have to speak to an external service for which it would have to
build EDI exchanges, it would likely be very cost effective to also use BizTalk as
the appropriate tool for that outbound integration. Likewise, if data would have to
be extracted from backend-internal message traffic for tracking purposes and BizTalk’s
BAM capabilities would be a fit, it might be a reasonable component to use for that.
If there’s a long running process around exchanging electronic documents, BizTalk
Orchestration might be appropriate, if there’s a document exchange involving humans
then SharePoint and/or Workflow would be a good candidate from the toolset. 
&lt;/p&gt;
&lt;p&gt;
For most services, the key gateway technology of choice is HTTP using frameworks like
ASP.NET, Web API, probably paired with IIS features like application request routing
and the gateway is largely stateless.
&lt;/p&gt;
&lt;p&gt;
In this context, &lt;em&gt;Windows Azure Service Bus&lt;/em&gt; is, in fact, a technology choice
to implement application gateways. A Service Bus namespace thus forms a message bus
for “a service” and not for “all services”. It’s as scoped to a service or a set of
related services as an IIS site is usually scoped to one or a few related services.
The Relay is a way to place a gateway into the cloud for services where the backend
resides outside of the cloud environment and it also allows for multiple systems,
e.g. branch systems, to be federated into a single gateway to be addressed from other
systems and thus form a gateway of gateways. The messaging capabilities with Queues
and Pub/Sub Topics provide a way for inbound traffic to be authorized and queued up
on behalf of the service, with Service Bus acting as the mediator and first line of
defense and where a service will never get a message from the outside world unless
it explicitly fetches it from Service Bus. The service can’t be overstressed and it
can’t be accessed except through sending it a message. 
&lt;/p&gt;
&lt;p&gt;
The next logical step on that journey is to provide federation capabilities with reliable
handoff of message between services, meaning that you can safely enqueue a message
within a service and then have Service Bus replicate that message (or one copy in
the case of pub/sub) over to another service’s Gateway – across namespaces and across
datacenters or your own sites, and using the open AMQP protocol. You can do that today
with a few lines of code, but this will become inherent to the system later this year. 
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4718bf97-cc2e-46ba-854a-f4a1d93fb2a9" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,4718bf97-cc2e-46ba-854a-f4a1d93fb2a9.aspx</comments>
      <category>Architecture</category>
      <category>Architecture/SOA</category>
      <category>Azure</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=d69897ff-32eb-4e44-9fea-0ee67005da75</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,d69897ff-32eb-4e44-9fea-0ee67005da75.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,d69897ff-32eb-4e44-9fea-0ee67005da75.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=d69897ff-32eb-4e44-9fea-0ee67005da75</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Head over to my Subscribe! blog on Channel 9 for the <a href="http://channel9.msdn.com/Blogs/Subscribe/Negotiate-Promise-Do-Transactions" target="_blank">latest
episode on Transactions</a>.
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=d69897ff-32eb-4e44-9fea-0ee67005da75" />
      </body>
      <title>Negotiate, Promise, Do. Transactions.</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,d69897ff-32eb-4e44-9fea-0ee67005da75.aspx</guid>
      <link>http://vasters.com/clemensv/2013/01/10/Negotiate+Promise+Do+Transactions.aspx</link>
      <pubDate>Thu, 10 Jan 2013 00:16:42 GMT</pubDate>
      <description>&lt;p&gt;
Head over to my Subscribe! blog on Channel 9 for the &lt;a href="http://channel9.msdn.com/Blogs/Subscribe/Negotiate-Promise-Do-Transactions" target=_blank&gt;latest
episode on Transactions&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=d69897ff-32eb-4e44-9fea-0ee67005da75" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,d69897ff-32eb-4e44-9fea-0ee67005da75.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=fcc97fd0-5035-4147-b323-5e2e8ead54a8</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,fcc97fd0-5035-4147-b323-5e2e8ead54a8.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,fcc97fd0-5035-4147-b323-5e2e8ead54a8.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=fcc97fd0-5035-4147-b323-5e2e8ead54a8</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A suggestion <a href="http://www.mygreatwindowsazureidea.com/forums/169381-messaging-servicebus/suggestions/3389608-support-distributed-transactions?utm_campaign=shorturls&amp;utm_source=www.mygreatwindowsazureidea.com">was
made on mygreatwindowsazureidea.com</a> for Windows Azure Service Bus to support distributed
transactions. The item isn’t very popular on the site with 7 votes, but I know that
that’s a topic near and dear to the heart of many folks writing business solutions.
We in the Service Bus team owning MSMQ and the Workflow team next door owns DTC and
we’re getting enough requests now that we’ll start working on better guidance around
transactions in the coming months, some of which will come in form of clips on my <a href="http://channel9.msdn.com/blogs/subscribe">Subscribe
blog on Channel 9</a>. 
</p>
        <p>
What’s not likely going to happen is that we will provide a magic “it just works”
solution that brings DTC and the 2PC model to the cloud. Why? Because 2PC isn’t doing
well in that world. Here is my reply to the post on mygreatwindowsazureidea.com for
better linking:
</p>
        <div style="margin-left: 20px">
          <p>
            <em>Hi, I'm on the Service Bus team and I very much appreciate the intent of this
suggestion. </em>
          </p>
          <p>
            <em>I wish we could enable that easily, but unfortunately this is a hard problem. </em>
          </p>
          <p>
            <em>The distributed transaction model with the common 2-phase-commit protocol with
a central coordinator is very suitable as a convenient error management mechanism
for physical single-node systems and for small clusters of a few physical nodes that
are close together. As you get very serious about scale, virtualization and high availability,
the very foundation of that model starts shaking. </em>
          </p>
          <p>
            <em>For 2PC to work, the coordinator’s availability both in terms of compute but also
in terms of network availability must be close to perfect. If you lose the coordinator
or you lose sight of the coordinator and you have resources in ‘prepared’ state, there
is no reasonable mechanism for those resources to break their promise and back out
in 2PC. On premises, the solution to that is to cluster DTC with the Windows Clustering
services on a shared, redundant disk array and have redundant networking to all resources.
Unless you do exactly that, you’re not likely building a solution that survives a
DTC hardware component failure without running in major trouble on the software side.
Once you step into virtualized environments, a lot of the underlying assumptions of
that cluster setup start to break down as the virtualization environment and placement
strategies introduce new risk into the relationship between the clustered resources. </em>
          </p>
          <p>
            <em>Likewise, the resource managers themselves are moved further away. You no longer
have a tightly controlled system where everything runs in a rack and is on the same
network segment with negligible latency. Things run scattered over many racks. The
bias in virtualization environments and the cloud is system availability (i.e. the
majority of nodes in a system is available) and not single-node reliability (i.e.
nodes don't go down). </em>
          </p>
          <p>
            <em>The 2PC model largely assumes that individual transactions go wrong due to intermittent
issues and not due to losing random nodes completely and without notice. It obviously
does provide a lifeline for when resource managers run into serious system issues
as transactions are in progress, but it’s generally not very suitable for a world
where workloads span many nodes and stuff goes up and down and moves all the time
for the sake of overall system availability when that also includes the coordinator. </em>
          </p>
          <p>
            <em>The result of using distributed transactions spanning multiple nodes in such an
environment is, at worst and as explained by the CAP theorem, a complete gridlock
as locks get placed and held and either take very long to resolve or end up leaving
transactions in doubt requiring intervention. </em>
          </p>
          <p>
            <em>Ultimately, MSDTC is a single-node/cluster and local-network technology, which
also manifests in its security model that is fairly difficult to adapt to a multitenant
cloud system. </em>
          </p>
          <p>
            <em>Mind that I am by no means looking to cast any doubts over anyone's use of MSDTC
within its design scope. MSDTC is proven and rock-solid reliable within those limits.
When all resources are on one node or are close together, belong to a single tenant/app,
and within a trust domain, it is and remains a great choice, because of the simplicity
it provides around failure management, even for work spanning multiple resources inside
a Windows Azure VM. </em>
          </p>
          <p>
            <em>Due to these considerations, it's hard for us to support classic distributed transactions
with DTC enlistment because people would justifiably expect them to "just work"
- and it's hard to see how they would. Beyond that, I have serious concerns around
system availability and security if locks on Service Bus' internal resources could
be impacted by third parties by ways of having them enlisted in a transaction even
if we were owning the coordinator. </em>
          </p>
          <p>
            <em>That all said, we do have DTC support for MSMQ, which is also owned by the Service
Bus team. The way to get DTC support for Service Bus is to proxy it with a local MSMQ
queue and then do a reliable handoff to Service Bus with a pump. We already have a
sample for that and we will framework that further:</em>
          </p>
          <p>
            <a href="http://code.msdn.microsoft.com/windowsazure/Service-Bus-Durable-Sender-0763230d">
              <em>http://code.msdn.microsoft.com/windowsazure/Service-Bus-Durable-Sender-0763230d</em>
            </a>
          </p>
          <p>
            <em>The considerations for Service Bus for Windows Server are similar.</em>
          </p>
        </div>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=fcc97fd0-5035-4147-b323-5e2e8ead54a8" />
      </body>
      <title>Distributed Transactions and Virtualization</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,fcc97fd0-5035-4147-b323-5e2e8ead54a8.aspx</guid>
      <link>http://vasters.com/clemensv/2013/01/02/Distributed+Transactions+And+Virtualization.aspx</link>
      <pubDate>Wed, 02 Jan 2013 16:14:55 GMT</pubDate>
      <description>&lt;p&gt;
A suggestion &lt;a href="http://www.mygreatwindowsazureidea.com/forums/169381-messaging-servicebus/suggestions/3389608-support-distributed-transactions?utm_campaign=shorturls&amp;amp;utm_source=www.mygreatwindowsazureidea.com"&gt;was
made on mygreatwindowsazureidea.com&lt;/a&gt; for Windows Azure Service Bus to support distributed
transactions. The item isn’t very popular on the site with 7 votes, but I know that
that’s a topic near and dear to the heart of many folks writing business solutions.
We in the Service Bus team owning MSMQ and the Workflow team next door owns DTC and
we’re getting enough requests now that we’ll start working on better guidance around
transactions in the coming months, some of which will come in form of clips on my &lt;a href="http://channel9.msdn.com/blogs/subscribe"&gt;Subscribe
blog on Channel 9&lt;/a&gt;. 
&lt;/p&gt;
&lt;p&gt;
What’s not likely going to happen is that we will provide a magic “it just works”
solution that brings DTC and the 2PC model to the cloud. Why? Because 2PC isn’t doing
well in that world. Here is my reply to the post on mygreatwindowsazureidea.com for
better linking:
&lt;/p&gt;
&lt;div style="margin-left: 20px"&gt;
&lt;p&gt;
&lt;em&gt;Hi, I'm on the Service Bus team and I very much appreciate the intent of this
suggestion. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;I wish we could enable that easily, but unfortunately this is a hard problem. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;The distributed transaction model with the common 2-phase-commit protocol with
a central coordinator is very suitable as a convenient error management mechanism
for physical single-node systems and for small clusters of a few physical nodes that
are close together. As you get very serious about scale, virtualization and high availability,
the very foundation of that model starts shaking. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;For 2PC to work, the coordinator’s availability both in terms of compute but also
in terms of network availability must be close to perfect. If you lose the coordinator
or you lose sight of the coordinator and you have resources in ‘prepared’ state, there
is no reasonable mechanism for those resources to break their promise and back out
in 2PC. On premises, the solution to that is to cluster DTC with the Windows Clustering
services on a shared, redundant disk array and have redundant networking to all resources.
Unless you do exactly that, you’re not likely building a solution that survives a
DTC hardware component failure without running in major trouble on the software side.
Once you step into virtualized environments, a lot of the underlying assumptions of
that cluster setup start to break down as the virtualization environment and placement
strategies introduce new risk into the relationship between the clustered resources. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Likewise, the resource managers themselves are moved further away. You no longer
have a tightly controlled system where everything runs in a rack and is on the same
network segment with negligible latency. Things run scattered over many racks. The
bias in virtualization environments and the cloud is system availability (i.e. the
majority of nodes in a system is available) and not single-node reliability (i.e.
nodes don't go down). &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;The 2PC model largely assumes that individual transactions go wrong due to intermittent
issues and not due to losing random nodes completely and without notice. It obviously
does provide a lifeline for when resource managers run into serious system issues
as transactions are in progress, but it’s generally not very suitable for a world
where workloads span many nodes and stuff goes up and down and moves all the time
for the sake of overall system availability when that also includes the coordinator. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;The result of using distributed transactions spanning multiple nodes in such an
environment is, at worst and as explained by the CAP theorem, a complete gridlock
as locks get placed and held and either take very long to resolve or end up leaving
transactions in doubt requiring intervention. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Ultimately, MSDTC is a single-node/cluster and local-network technology, which
also manifests in its security model that is fairly difficult to adapt to a multitenant
cloud system. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Mind that I am by no means looking to cast any doubts over anyone's use of MSDTC
within its design scope. MSDTC is proven and rock-solid reliable within those limits.
When all resources are on one node or are close together, belong to a single tenant/app,
and within a trust domain, it is and remains a great choice, because of the simplicity
it provides around failure management, even for work spanning multiple resources inside
a Windows Azure VM. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Due to these considerations, it's hard for us to support classic distributed transactions
with DTC enlistment because people would justifiably expect them to &amp;quot;just work&amp;quot;
- and it's hard to see how they would. Beyond that, I have serious concerns around
system availability and security if locks on Service Bus' internal resources could
be impacted by third parties by ways of having them enlisted in a transaction even
if we were owning the coordinator. &lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;That all said, we do have DTC support for MSMQ, which is also owned by the Service
Bus team. The way to get DTC support for Service Bus is to proxy it with a local MSMQ
queue and then do a reliable handoff to Service Bus with a pump. We already have a
sample for that and we will framework that further:&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://code.msdn.microsoft.com/windowsazure/Service-Bus-Durable-Sender-0763230d"&gt;&lt;em&gt;http://code.msdn.microsoft.com/windowsazure/Service-Bus-Durable-Sender-0763230d&lt;/em&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;The considerations for Service Bus for Windows Server are similar.&lt;/em&gt;
&lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=fcc97fd0-5035-4147-b323-5e2e8ead54a8" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,fcc97fd0-5035-4147-b323-5e2e8ead54a8.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=7d715945-1966-4672-bcd0-ad5fa7977cb0</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,7d715945-1966-4672-bcd0-ad5fa7977cb0.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,7d715945-1966-4672-bcd0-ad5fa7977cb0.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=7d715945-1966-4672-bcd0-ad5fa7977cb0</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Here’s <a href="http://channel9.msdn.com/Blogs/Subscribe/Push-vs-Pull">from my Channel
9 Subscribe</a> blog, an ad-hoc, single-take whiteboard discussion on "push" and "pull"
communication patterns. There's a lot of talk in the industry on push (see push notifications)
and pulling/polling (long polling vs. web sockets and messaging), so I'm dissecting
that space a bit and explore push vs. pull and various pattern nuances from UDP upwards. 
</p>
        <p>
          <iframe style="HEIGHT: 288px; WIDTH: 512px" src="http://channel9.msdn.com/Blogs/Subscribe/Push-vs-Pull/player?w=512&amp;h=288" frameborder="0" scrolling="no" align="center">
          </iframe>
        </p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=7d715945-1966-4672-bcd0-ad5fa7977cb0" />
      </body>
      <title>Push vs. Pull</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,7d715945-1966-4672-bcd0-ad5fa7977cb0.aspx</guid>
      <link>http://vasters.com/clemensv/2012/12/08/Push+Vs+Pull.aspx</link>
      <pubDate>Sat, 08 Dec 2012 12:35:13 GMT</pubDate>
      <description>&lt;p&gt;
Here’s &lt;a href="http://channel9.msdn.com/Blogs/Subscribe/Push-vs-Pull"&gt;from my Channel
9 Subscribe&lt;/a&gt; blog, an ad-hoc, single-take whiteboard discussion on "push" and "pull"
communication patterns. There's a lot of talk in the industry on push (see push notifications)
and pulling/polling (long polling vs. web sockets and messaging), so I'm dissecting
that space a bit and explore push vs. pull and various pattern nuances from UDP upwards. 
&lt;/p&gt;
&lt;p&gt;
&lt;iframe style="HEIGHT: 288px; WIDTH: 512px" src="http://channel9.msdn.com/Blogs/Subscribe/Push-vs-Pull/player?w=512&amp;amp;h=288" frameborder=0 scrolling=no align=center&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=7d715945-1966-4672-bcd0-ad5fa7977cb0" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,7d715945-1966-4672-bcd0-ad5fa7977cb0.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=4541fd70-3771-44ae-975f-65c22ba05756</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,4541fd70-3771-44ae-975f-65c22ba05756.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,4541fd70-3771-44ae-975f-65c22ba05756.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=4541fd70-3771-44ae-975f-65c22ba05756</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Over on my new Channel 9 blog I've started a series that will (hopefully) help novices
with getting started developing applications that leverage Windows Azure Service Bus
(and, in coming episodes also Service Bus for Windows Server)
</p>
        <p>
The first two episodes are up:
</p>
        <ul>
          <li>
            <a href="http://channel9.msdn.com/Blogs/Subscribe/Getting-Started-with-Service-Bus-Part-1-The-Portal">Getting
Started with Service Bus. Part 1: The Portal</a>
          </li>
          <li>
            <a href="http://channel9.msdn.com/Blogs/Subscribe/Getting-Started-with-Service-Bus-Part-2-NET-SDK-and-Visual-Studio">Getting
Started with Service Bus. Part 2: .NET SDK and Visual Studio</a> </li>
        </ul>
        <p>
There's much more to come, and the best way to get at it as it comes out is to subscribe
to the <a href="http://channel9.msdn.com/Blogs/Subscribe/RSS">RSS feed</a> or <a href="http://channel9.msdn.com/Blogs/Subscribe">bookmark
the landing page</a>.
</p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4541fd70-3771-44ae-975f-65c22ba05756" />
      </body>
      <title>Subscribe! - Getting Started with Service Bus</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,4541fd70-3771-44ae-975f-65c22ba05756.aspx</guid>
      <link>http://vasters.com/clemensv/2012/12/05/Subscribe+Getting+Started+With+Service+Bus.aspx</link>
      <pubDate>Wed, 05 Dec 2012 15:12:19 GMT</pubDate>
      <description>&lt;p&gt;
Over on my new Channel 9 blog I've started a series that will (hopefully) help novices
with getting started developing applications that leverage Windows Azure Service Bus
(and, in coming episodes also&amp;nbsp;Service Bus for Windows Server)
&lt;/p&gt;
&lt;p&gt;
The first two episodes are up:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://channel9.msdn.com/Blogs/Subscribe/Getting-Started-with-Service-Bus-Part-1-The-Portal"&gt;Getting
Started with Service Bus. Part 1: The&amp;nbsp;Portal&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://channel9.msdn.com/Blogs/Subscribe/Getting-Started-with-Service-Bus-Part-2-NET-SDK-and-Visual-Studio"&gt;Getting
Started with Service Bus. Part 2: .NET SDK and Visual&amp;nbsp;Studio&lt;/a&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
There's much more to come, and the best way to get at it as it comes out is to subscribe
to the &lt;a href="http://channel9.msdn.com/Blogs/Subscribe/RSS"&gt;RSS feed&lt;/a&gt; or &lt;a href="http://channel9.msdn.com/Blogs/Subscribe"&gt;bookmark
the landing page&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=4541fd70-3771-44ae-975f-65c22ba05756" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,4541fd70-3771-44ae-975f-65c22ba05756.aspx</comments>
      <category>Architecture</category>
    </item>
    <item>
      <trackback:ping>http://vasters.com/clemensv/Trackback.aspx?guid=8c63031d-2ac6-4dc2-be91-253e55c6d6e9</trackback:ping>
      <pingback:server>http://vasters.com/clemensv/pingback.aspx</pingback:server>
      <pingback:target>http://vasters.com/clemensv/PermaLink,guid,8c63031d-2ac6-4dc2-be91-253e55c6d6e9.aspx</pingback:target>
      <dc:creator>
      </dc:creator>
      <wfw:comment>http://vasters.com/clemensv/CommentView,guid,8c63031d-2ac6-4dc2-be91-253e55c6d6e9.aspx</wfw:comment>
      <wfw:commentRss>http://vasters.com/clemensv/SyndicationService.asmx/GetEntryCommentsRss?guid=8c63031d-2ac6-4dc2-be91-253e55c6d6e9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have a new (additional) blog. It's not a "write" blog, it's a "speak" blog. Over
on Microsoft's Channel 9 I started the "Subscribe!" blog last Friday night. 
</p>
        <p>
The goal for it is to be a way to talk about middleware and specifically about my
team's product Service Bus on Channel 9. Service Bus and the other middleware products
and features tend to require quite a bit of guidance and explanation because they
help solving complex problems. I'm trying to help providing a forum for that, not
only in the form of monologues, but also having our customers and my coworkers speak. 
</p>
        <p>
Here's the link <a href="http://channel9.msdn.com/blogs/subscribe/">http://channel9.msdn.com/blogs/subscribe/</a></p>
        <img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=8c63031d-2ac6-4dc2-be91-253e55c6d6e9" />
      </body>
      <title>“Subscribe!”</title>
      <guid isPermaLink="false">http://vasters.com/clemensv/PermaLink,guid,8c63031d-2ac6-4dc2-be91-253e55c6d6e9.aspx</guid>
      <link>http://vasters.com/clemensv/2012/12/04/Subscribe.aspx</link>
      <pubDate>Tue, 04 Dec 2012 19:52:14 GMT</pubDate>
      <description>&lt;p&gt;
I have a new (additional) blog. It's not a "write" blog, it's a "speak" blog. Over
on Microsoft's Channel 9 I started the "Subscribe!" blog last Friday night. 
&lt;/p&gt;
&lt;p&gt;
The goal for it is to be a way to talk about middleware and specifically about my
team's product Service Bus on Channel 9. Service Bus and the other middleware products
and features tend to require quite a bit of guidance and explanation because they
help solving complex problems. I'm trying to help providing a forum for that, not
only in the form of monologues, but also having our customers and my coworkers speak. 
&lt;/p&gt;
&lt;p&gt;
Here's the link &lt;a href="http://channel9.msdn.com/blogs/subscribe/"&gt;http://channel9.msdn.com/blogs/subscribe/&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://vasters.com/clemensv/aggbug.ashx?id=8c63031d-2ac6-4dc2-be91-253e55c6d6e9" /&gt;</description>
      <comments>http://vasters.com/clemensv/CommentView,guid,8c63031d-2ac6-4dc2-be91-253e55c6d6e9.aspx</comments>
      <category>Blog</category>
    </item>
  </channel>
</rss>