Author Archives: kenny

Tracing Tidbit: Getting Callstacks Automatically

When you get an Exception traced in Indigo, part of that trace includes the callstack which is naturally traced as part of Exception.ToString(). However, callstack information is generally useful for other non-Exception traces (for example, trying to track down who is Aborting a socket). Part of the beauty of our tracing infrastructure is that it’s really easy to modify your trace listener. It turns out there is a built-in option for emitting callstacks. Simply add:

traceOutputOptions="Callstack"

to your listener config.

The relevant line of config then looks like:

<add name="multifile"
     type="System.Diagnostics.XmlWriterTraceListener"
     traceOutputOptions="Callstack"
     initializeData=".Whatever.xml" />

Happy debugging!

La Rua (Whistler, BC)

Rating:

After a full day of snowboarding on Whistler mountain followed by a two hour nap, we were ready for our walk across the river to the Upper Village. Most visitors stay in the main village (with good reason), but in doing so they miss a culinary delight hidden near the base of Blackhomb: La Rua.

I had fond memories of my only previous meal at La Rua, 6 years ago. Tonight was a pleasant refresher for those memories. Upon entry, we were greeted warmly by the hostess and seated in a quiet corner of the restaurant (thankfully a safe distance away from the unruly family at the center table). Our waitress Kim was very sweet, helpful, attentive, yet discreet.

We began with the special of the day, a seared scallop atop a pea-vine ravioli with white truffle sauce. A fantastic opener — the scallop was reminiscent of Zoe’s, the ravioli delicate, and a sauce you would love to bottle and take home with you:

Special of the Day

Next was a duck spring roll — crispy (yet not greasy), with orange peel in the sauce to counterbalance the full flavor of the duck+mushrooms (and make for an attractive presentation):

Quack quack

For our main course we tried a local catch — B.C. Sablefish. For a second night in a row we were graced with top-notch fresh fish. The sablefish was firm, bursting with flavor, and embraced the Pacific Rim influence of its soy/miso preparation:

Wild cod!

La Rua’s desserts were the weakest part of the meal. The profiteroles were filled with a nice creamy homemade ice cream, but the pastry and chocolate were not particularly distinctive. Though I did get a nice shot of Lauren in one of her favorite sweaters:

Lauren enjoying dessert

La Rua Restaurante
4557 Blackcomb Way
Whistler, BC
604-932-5011

Daily 5:30PM-late (Dinner only)
Tidbit: Complimentary parking available

Quattro (Whistler, BC)

Rating:

Seattle is in the Superbowl this weekend and Lauren and I snuck away to Whistler. All week I’ve been looking forward to the conditions from January’s record snowfall of 15.6 feet (with little sign of slowing down). I’ve also been looking forward to a weekend of fine dining in the evenings. Whistler has a ton of restaurants. Some are amazing and others are overpriced tourist traps, so where should you begin?

This weekend, Lauren and I began at Quattro (in the main village, across from the Delta Whistler Hotel). It’s a cozy restaurant that does a great job with both couples and large groups. Last year we had a group birthday dinner for 10 in their private Tasting Room. Tonight it was a fireside dinner for two.

Along with our Pinot Grigio we started with Dungeness crab & scallop cakes. They were generously filled (the breading was kindly restricted to the outside of the cakes), and the crab and scallop was a tasty pairing. Some wild mixed greens on the side (just to make you feel healthy), and more importantly a topping of moscato & chive aioli:
crab and scallop cakes

For our main course, Lauren ordered the “Rotolo Farcito”. It had been described as pasta rolled with ricotta cheese, sweet peppers, spinach, and mushrooms in a creamy tomato sauce. What we got (while tasty enough) was not at all what we expected. The filling was low on ricotta, high on mushrooms, and overall the closest comparison I can engender is mini-lasagna filling. The “creamy tomato sauce” meant that 2 of the four pasta rolls were in cream sauce and the other two were in tomato sauce. It was well prepared, but Quattro has much stronger items on their menu.

Which is a perfect segue into a perfect dish: “Branzino alla Crosta”. Quattro can really knock your socks off with their fish preparations. 4 years ago I had a Chilean Sea Bass that was so succulent…but I digress. The Branzino is a baked black cod with a pistachio crust. Soft, but not too mushy. Rich flavors without being overpowering. Topped with a fire roasted sweet pepper sauce that is possibly more addictive than crack. We certainly used the homemade foccacia to ensure not a drop was wasted. Heaven on a plate.
the best cod ever

Quattro at Whistler
4319 Main Street
Whistler, BC
604-905-4844

Daily 5:30PM-late (Dinner only)

Enabling E2E Tracing for WCF

Tracking down bugs in distributed systems can be really difficult. One of the technologies we’re using in Indigo to help make this easier is known as “E2E Tracing” (for End to End Tracing). Of course, this technology is only as good as the traces that a system emits. In Beta 1, we weren’t so good about our traces, but in the past few months we’ve made a concerted effort to improve them. And we need your feedback on what is easy to track down and (just as importantly) what was a pain in the butt to figure out. I recommend starting at “Warning” level. Verbose traces are very, well, verbose and can often be hard to navigate through.

Indigo also includes a Trace Viewer (svcTraceViewer.exe) which allows you to make heads (or tails) of the Xml files that are generated. Again, feedback on the tool is highly encouraged.

Here’s a sample config file snippet that will enable tracing in Indigo Applications and will generate Xml file with the traces.

The generated file can then be opened with svcTraceViewer.exe

<configuration>
 <system.diagnostics>
  <sources>
   <!-- The 'switchValue' determines the level of traces that will
             be outputted, e.g. 'Verbose', 'Warning', 'Error', etc -->
   <source name="System.ServiceModel" switchValue="Warning, ActivityTracing"
                 propagateActivity="true">
     <listeners>
     <clear />
     <!-- The 'initializeData' attribute determines to which file
              the traces will be written -->
     <add name="xml" type="System.Diagnostics.XmlWriterTraceListener"
                initializeData="e2eTraceTest.xml" />
     <!-- To log to a Console, use this instead of previous Node:
     <add name="console" type="System.Diagnostics.ConsoleTraceListener" />
     -->
    </listeners>
   </source>
  </sources>
  <!-- Setting he 'autoflush' attribute to 'true' ensures that the trace
            sources flush to disk after each trace -->
  <trace autoflush="true" />
 </system.diagnostics>
</configuration>

Migrating ASMX to WCF

One question I was often asked last week was: “I have a bunch of ASMX services today, what is the best way for me to prepare for and/or migrate to Indigo”? (also asked as “can you tell me more about this ASMX migration thing?”). There are a number of ways to go about this, but Kirk and I came across a compelling approach that I will elaborate on here. Before we begin, if you need some background on the differences between ASMX 1.0, ASMX 2.0, and WCF, check out Aaron Skonnard’s MSDN article.

First we assume that you have a ASMX service implemented using CodeBehind. If you don’t, then your first step is to move your inline .asmx code into a .cs file 🙂

Now, let’s say you have the following ASMX service:

[WebService(Namespace=”http://kennyw.com/sampleservices/”)]
public class MyService : System.Web.Services.WebService
{

[WebMethod]
public string Hello(string name)
{

return string.Format(“Hello {0}.”, name);

}

}

Which is referenced from an .asmx file containing the reference directive such as the following:
<%@WebService Language=”C#” class=”MyService” %>

You can expose this ASMX service to WCF in 3 simple steps.

  1. Annotate your ASMX service with WCF attributes.
    Add [ServiceContract] to the classes you want to expose through WCF, and [OperationContract] to the methods. Our modified class looks like:

    [ServiceContract(Namespace=”http://kennyw.com/WCFservices/”)]
    [WebService(Namespace=”http://kennyw.com/sampleservices/”)]
    public class MyService : System.Web.Services.WebService
    {

    [WebMethod]
    [OperationContract]
    public string Hello(string name)
    {

    return string.Format(“Hello {0}.”, name);

    }

    }

  2. Create a .svc file in your virtual directory that contains the following declaration (which is very reminiscent of your .asmx file :)):
    <%@ServiceHost Language=”C#” Service=”MyService” %>
  3. Add a snippit to your web.config file (create one if you don’t already have one in your vdir) to add an HTTP binding for your service:
    <system.serviceModel>
      <services>
        <service type=”MyService”>
          <endpoint binding=”basicHttpBinding”
            contract=”MyService”
          />
        </service>
      </services>
    </system.serviceModel>

Viola! Now you can access your service file using both Indigo clients (using the .svc file) and ASMX clients (using the .asmx file). This will get you started on the migration path. You can add more functionality to other methods and expose those methods to new Indigo clients, and if you aren’t using any “HTTP-isms” (i.e. HttpContext.Current and friends) then you will also be able to add net.tcp and/or net.pipe bindings on Vista.

There are of course many more details to cover on this topic. For those going to VSLive! next week, Steve Maine will be covering this topic in much greater detail at the WCF for ASP.NET Developers session. Hopefully he will post some of his wise words following the talk on his blog 🙂

IDuplexSession.CloseOutputSession

When writing an IDuplexSessionChannel, one of the pieces that needs to be implemented is (as you might expect) IDuplexSession. IDuplexSession has one additional requirement on top of ISession, and that is the ability to perform a “half-close”. Semantically this is the same as Shutdown(Send) in sockets-speak.

When you call IDuplexSession.CloseOutputSession(), this signals to the other side of the session that it should return null from outstanding and subsequent calls to Receive(). CloseOutputSession() is also idempotent (just like ICommunicationObject.Close() and ICommunicationObject.Abort()).

CloseOutputSession() is also a little tricky, because it’s a session method that can interact with the owning IDuplexSessionChannel that owns the session. In particular, if your session lifetime is coupled with your channel lifetime (like it is for TCP and RM and Security):

  1. If CloseOutputSession() is called before channel.Close(), channel.Close() should wait for CloseOutputSession() to finish.
  2. If the channel is in the Created or Opening state, CloseOutputSession() should throw new InvalidOperationException(...).
  3. If the channel is in the Faulted state, CloseOutputSession() should throw new CommunicationObjectFaultedException(...).
  4. The channel should fault if CloseOutputSession throws.
  5. channel.Close() should call CloseOutputSession() and then verify that Receive() returns null (i.e. CloseOutputSession was called from the other side of the session).

Liuzza's by the Track (New Orleans, LA)

Rating:

Last night we went down to the French Quarter to see “…And the Ball and All” — a comedic farce about Mardi Gras. The evening started with some classic New Orleans fare: gumbo and poorboys. “Poorboy” (or “Po’ Boy”) is the locals term for a french roll filled with meat or seafood. A New Orleans hoagie if you will. According to the locals, the best places for po’ boys are all “hole in the wall”s. Liuzza’s is no exception.

It’s a dive near the train tracks a few blocks from where Jazz Fest is held. We squeaked in just before close (at 5PM), crowded around a small table, and ordered a bowl of gumbo and a pair of po’boys (fried oyster and barbeque shrimp). The gumbo was spicey and loaded with goodies (andouille sausage, chicken, shrimp, and oysters). The poorboys were definitely not for the feint of heart (medically speaking :)), but were tasty as can be. I was pleasantly surprised to discover “barbeque shrimp” in New Orleans doesn’t involve a tangy or vinegar-based sauce. Rather it’s more of a garlic-pepper sauce — think scampi on steroids with some extra pepper.

Liuzza’s by the Track
1518 North Lopez
New Orleans, LA 70119
504-943-8667

The Dakota Restaurant (New Orleans, LA)

Rating:

I flew into New Orleans yesterday to see my Dad who lives in Slidell, on the north shore of Lake Pontchartrain. Since he had just gotten a new tarp for the roof, all was clear for my visit.

After five months of rebuilding, things are starting to clean up. Not to say there isn’t a TON of work left, I can’t even begin to explain the extent of the devastation — a topic for another post.

The primary reaction I had gotten in Atlanta when I told them I was headed to New Orleans was “wow…the food there is amazing…” If the Dakota Restaurant is any indication, I can see why the cuisine in this city would make a lasting impression.

The ambience is romantic with a touch of chic. Dad told me that the dishes were moderately sized (i.e. I would actually be able to finish a soup and/or salad plus an entree). I started with one of their signature dishes: Lump Crabmeat and Brie Soup. It was thick and creamy and sinfully good.

I then got to sample two salads (fortunately my entire family encourages the “wandering fork syndrome”). Lynn ordered the Asian Ahi Tuna Salad — sushi grade ahi, sesame crusted, with a touch of soy and ginger. It was like they had taken a play from Wasabi Bistro’s cookbook and then upped the ante:

Asian ahi tuna salad

Dad’s roquefort salad was a finely executed version of LL’s salad template: [greens]+[nut]+[fruit]+[cheese] (in this case baby greens + roasted cashews + apples + roquefort).

Roquefort salad

For the main course I ordered the scallops. I can honestly say I’ve never seen scallops anywhere near as large. And yes, they were as yummy as they look — meaty and finely seared on top, served with wild mushroom ravioli in a foie gras sauce that added to the tastebud indulgence:

Monster tasty scallops

To complete the round up, Dad had the Parmesan crusted Tilapia (with crabmeat and fried artichoke), and Lynn had the grilled redfish. Both were very well executed and tastefully presented, with the sides complementing the fish (and our Gruner Veltliner) quite nicely. Overall a fantastic meal and a gastronomically sensational beginning to my weekend in New Orleans. This will be fun 🙂

The Dakota Restaurant
629 North Highway 190
Covington, LA 70433
985-892-3712

Mon-Fri 11:30AM-2:30PM (Lunch)
Mon-Th 5:00PM-10:00pm, Fri-Sat 5:00PM-11:00PM (Dinner)

Azio (Atlanta, GA)

Rating:

Outside of my hotel is a McDonald’s, a Hooters, and a Hard Rock Cafe. Not exactly the pinnacle of haute cuisine.

Tonight is my last night in Atlanta, and so I was determined to find a decent bite to eat. After circling a few blocks in different directions I only found a Steak and Ale, a chinese restaurant who’s sign was on the floor, some out of business retail spaces, and a number of people hitting me up for cash. Finally I turned the corner, walked past a seedy looking bar, and came upon a swank looking place with a decent looking menu. I decided to go inside and check out Azio’s.

I took a seat at the bar, and got to know KJ, the very friendly bartender. I started with the “insalada tricolore”, which was a mixed wild green, endive, gorgonzola and walnut salad with a slice of bruschetta. Yum.
insalada tricolore

I followed the salad with a very thin crust florentine pizza (spinach, mushroom, and Italian sausage). They bake their pizzas in a brick oven, which make the crust good and crispy. Overall a very tasty meal in a friendly environment. Thank you Azio!

florentine pizza
Azio
229 Peachtree St
Atlanta, GA 30303
404-222-0808

Mon-Fri 11:30AM-10:00PM, Sat-Sun 5:00PM-10:00pm
(Lunch and Dinner)