WsDualHttp and Faults

May 6th, 2008

The other day a customer was sending unauthenticated messages to a service and the requests were timing out over WsDualHttp. When using WsHttpBinding or NetTcpBinding, the customer received an authentication MessageFault.  Why was there no Fault returned over WsDualHttpBinding?

The reason has to do with securing composite-duplex channels. WsDualHttp uses two HTTP connections to provide its duplex nature, and messages are correlated between these two connections based on WS-Addressing (ReplyTo/MessageId).  Because of this, the server behavior is entirely dependent on data received from the client. If this client is malicious, then he can cause the server to do a couple of things:

  • Initiate arbitrary outbound connections
  • Cause a "bouncing DOS" attack. For example, consider a server A that can send messages to server B that’s behind a firewall. Suppose that client C can send messages to A, but cannot send messages directly to server B (due to the firewall). Now suppose that the client sends a badly secured message to server A, with a ReplyTo equal to server B. If we send back a fault for unsecured messages over WsDualHttp, this would result in C being able to DOS server B due to bounce-assistance from server A.

In addition, since these are two one-way channels, the HTTP response (202 Accepted) has already returned prior to the Security channel (or any higher-layer in the channel/dispatcher stack) being called. So we cannot simply piggy-back the fault over the HTTP back channel.

WCF and TIBCO

April 30th, 2008

Integration has arrived!

http://www.tibco.com/company/news/releases/2008/press900.jsp

When to use Async Service Operations

April 29th, 2008

I was recently asked about the motivation for choosing asynchronous service operations in WCF (i.e. [OperationContract(AsyncPattern = true)]).

If you have an operation that is blocking (accessing SQL, Channels, etc) then you should use AsyncPattern=true.  That way you’ll free up whatever thread we’re using to call your operation from. The general idea is that if you have a blocking call then you should use the async version and it should transparently play well with us.

Put another way: if you are calling a method that returns an AsyncResult (i.e. you’re accessing SQL, or using sockets, files, or channels), then you can wrap that IAsyncResult and return it from the BeginXXX call (or return the raw asyncresult depending on your scenario).

If you aren’t doing something that’s "natively async", then you shouldn’t be using AsyncPattern=true. That is, you shouldn’t just create a thread just for the sake of performing "background work" as part of an asynchronous operation. Note that it is legitimate to spawn a thread because your operation happens to kick off work that is outside of its completion scope (though in that case you should just have a synchronous method, not an async one).

Saint Honoré Boulangerie (Portland, OR)

April 13th, 2008

Rating:

Lauren and I went to Portland yesterday to help out the Obama campaign register voters in time for the May primary.  We got up early this morning to check out a recommendation from Mike, St. Honoré Boulangerie in Northwest Portland.

We arrived at 9AM, and there was already a line almost out the door. But that gave us time to check out all the pastries on display and peruse the breakfast menu.  And while we waited we could also peek at the activity in the open kitchen behind the counter.

Lauren ordered the Quiche Jardinere, with spinach, roasted red peppers and roasted leeks. The pastry shell was of medium thickness, making a crunchy and buttery edible bowl for the fluffy egg mixture inside.

StHonoreQuiche

The quiche was quite tasty, but the star of the breakfast was the Champignon Frittata Croissant. A mix of eggs, mushrooms, chicken apple sausage and fresh herbs served in a croissant with béchamel. This was a fork and knife croissant dish. It looks like a melted lump here, but the taste more than makes up for the visual :)

In the background is a Cranberry Hazelnut Roll that we had for a snack later in the afternoon. It was a hearty wheat roll with a touch of tart-sweetness from the cranberries.

StHonoreFrittata 

 

While I waited on line to order our meal, Lauren had scored the best seats in the house. There is a counter top with 4 stools directly in front of the bread-maker. We watched baguettes, brioches, rolls and pastry shells made while we dined. The oven was enormous. The wheel on the left rotated a lazy-susan inside of the oven so that the baker could access different parts of the oven over time.

 

 StHonoreBaker

We also tried a raspberry jam croissant and a Pain au Chocolat. I enjoyed the raspberry jam croissant, but the chocolate croissant was ho-hum. It has been raved about on the web, but I personally thought it was the weakest item we tried. Not that we didn’t polish it off mind you, but there are much better things available at Saint Honoré.

Overall we had a very enjoyable breakfast and I will definitely swing by again on a future Portland trip!

St. Honoré Boulangerie
2335 NW Thurman Street
Portland, OR 97210
503-445-4342

Daily: 7:00AM-8:00PM (Breakfast, Lunch, and Dinner)

Tidbit Bistro (Seattle, WA)

April 6th, 2008

Rating:

Tonight I checked out Tidbit Bistro with Lauren, Gio and John. Tidbit is on the very north end of Broadway in a space formerly occupied by Cassis and then XO Bistro. Gio and I used to frequent Cassis, and though I only dined at XO Bistro once I did enjoy the meal. Unfortunately, it closed before I got around to uploading my photos/posting a write up.

The interior space hasn’t changed, which is a good thing. It’s a small setting, but fun lighting and intimate tables. Our server was very nice, friendly, and attentive.  He also made a good wine recommendation, a reasonably priced Grüner Veltliner that as a bonus arrived in a 1L bottle! Unfortunately the food was on the whole unremarkable :( 

Given the tapas-heavy menu with four people, I was able to sample a broad array of plates. The best items we had were the Crespelle (crepes filled with mushrooms and a mix of melted mozzarella, goat cheese, blue cheese, and béchamel) and the Potato Crocché (fried whipped potato-filled "poppers").

The Crostino con Prosciutto and Papas Dulces (sweet potato fries) were decent. Next time I would pass on the paella, the sauteed prawns, and the albondigas (lamb meatballs).

Overall Tidbit is a fine place to stop for a glass of wine or to sample one of their many *cellos, but I wouldn’t arrive hungry.

Tidbit Bistro
2359 10th Ave E
Seattle, WA 98102
206-323-0840

Jamjuree (Seattle, WA)

March 30th, 2008

Rating:

When it comes to Thai food, we are very fortunate: less than 2 blocks from our condo is arguably the best Thai food in Seattle. Yes, I’ve done a tournament for Thai Tom, and I enjoy Thai Tom and all of their unique flavors.  But if I was given a choice and forced to eat at only one Thai restaurant for a year, I would choose Jamjuree. They have a broad variety of fantastic dishes, very friendly service, rotating specials, and (as a bonus) a selection of local microbrews on tap. They can also handle large parties, such as my extended family descending upon Seattle or a hungry crew for Yom Kippur break-fast.

It’s really shocking that I haven’t written about Jamjuree yet. Lauren and I eat at (or take out from) there a few times per month. After a vacation, it’s almost a given that I’ll return with a huge Jamjuree craving (perhaps coming back from Thailand will be an exception there :)).

Tonight we remembered to bring the camera and enjoyed a few favorites.  On the spice level, I order everything here at "3 stars".  In addition, we request the "spices" (a trio of Thai flavors) on the side for selective added flavor. First up, we always order their amazing Pad See Iw.  I have a soft spot for wide rice noodles, and Jamjuree’s rendition of Pad See Iw is the best I’ve ever had.

jamjureePadSeeIw 

Dish#2: Panang Curry. A little creamy from the coconut milk with a peanuty overtone (though I’ve been assured there aren’t actually any peanuts in the curry).

jamjureePanang

Dish #3: In honor of the write-up, we ordered a third item for dinner - "Green Bean" with tofu. It’s a nice contrast to the curries, and has more of a soy-pepper base. Lots of sauce, but the green beans remained nice and crunchy.

jamjurreeGreenBeans

Other recurring favorites include "Basil", Cashew Chicken, and Lime Light Chicken.

Overall, another highly satisfying meal at Jamjuree. And the leftovers will make for a great snack tomorrow!

Jamjuree
509 15th Ave. E. (between Republican and Mercer)
Seattle, WA 98112
206-323-4255

Sun-Thurs: 11:30AM-9:30PM (Lunch & Dinner)
Fri-Sat: 11:30AM-10:00PM (Lunch & Dinner)

Specialty’s Cafe and Bakery

March 26th, 2008

Rating:

I had my first Specialty’s experience downtown with my buddy Mark. I was on jury duty and the weekday lunch rush was controlled mayhem in action. I don’t recall the sandwich I ordered that day, though I will never forget the Wheatgerm Chocolate Chip cookie. I wouldn’t have ever chosen it from the description, but at Mark’s recommendation I gave it a shot, and wow! It’s very possible that they have crack in them. They really will make your day brighter.

Specialty’s makes all of their own cookies (and bread and other baked goods) on site. They sell soups, salads, and sandwiches.  The salads and sandwiches are made fresh to order.

Lauren and I were at Bell Square tonight after work, so we stopped off at the Specialty’s branch there for dinner.  While I’ve gone through a number of their sandwiches, I always come back to "The Chairman", a stacked sandwich with (deep breath now):

Alfalfa Sprouts, Herb, Mayonnaise, Stone Ground Mustard, Roasted Turkey Breast, Swiss, Green Leaf Lettuce, Tomato, Red Onion, Cucumber, Dill Pickle, Avocado, Italian Vinaigrette, Ranch Dressing, Black Pepper.

All served on herbed bread with a soft middle and a crisp crust.

 specialtiesKennyChairman

If you have a hankering for a good sandwich (or cookie) and are near a Specialty’s, you should definitely check it out!

 

Specialty’s Cafe and Bakery
Multiple Locations

Breakfast, Lunch, and Dinner

 

P.S. I’ve been lobbying the Microsoft powers that be for a Specialty’s stand at one of our cafeterias. Unfortunately that process is stalled since they aren’t considered a "local" business (nevermind that 40% of their locations are in Seattle). Perhaps this will get corrected if they here from more Specialty’s fans :)

Volunteer Park Café (Seattle, WA)

March 22nd, 2008

Rating:

Just over a year ago, a new restaurant/coffee-shop opened on the north side of Capitol Hill, in the location of the former Café Europa. It wasn’t until early summer that I made my first stop at Volunteer Park Café. It was to be the first of many tasty visits.

Fast forward to October 10th. Lauren and I attempted to have dinner at Lark, but were greeted with an hour wait.  So we decided to check out how VPC handles dinner.  I still remember the Fig and Gorgonzola Pizza we had that night. We returned last night and the waits were running over an hour. Fortunately we had called ahead for a table, as it seems reservations are a must over the weekend (the weeknights we’ve been there have been much more sedate). VPC rotates their menu weekly, though it always includes a daily bruschetta that is worth checking out. Last night’s variation was a garlic spread with butternut squash, red peppers, kale and a little pecorino cheese. On top of freshly grilled bread of course. A hearty and tasty beginning!

vpcGarlicBruschetta

Next was a mixed beet salad (with all local vegetables), with chevre, arugula, and a light vinaigrette. The chevre was fantastic, and a little bit of salt in the dressing brought together all the flavors perfectly.

vpcBeetSalad

Another regular appearance on VPC’s dinner menu is their selection of pizzas. We’d already had the "Roasted Mushroom" (with truffle oil) and the "Bianco", both of which were fantastic (though not quite as good as the heavenly Fig and Gorgonzola). Last night we branched out and tried the Spinach Pesto, with oven roasted tomatoes, red onion, feta, and oregano. The pizza was decent, but not in the same league as the rest of the pizzas I’ve had there. Maybe it was the pesto base, maybe it was the thickness of the crust, or maybe it was the greater number of toppings or the higher than usual ratio of bread to toppings. Whatever the reason, I’d pass on the Spinach Pesto pizza in the future, especially given the solid alternatives.

On weekends Volunteer Park Café offers both breakfast and lunch options well into the afternoon, and in the summer they have (slightly rickety) tables flanking the sidewalk in front of the café.  For those with a sweet tooth, definitely try the Caramelized Banana Brioche French Toast. It’s heavenly.  Other breakfast highlights include the Brie and Apple Panini (on croissant, not baguette) and the quiche of the day.  A running theme is that the pastries are sinful, but oh so flaky and buttery.  Orders take a long time to complete, so make sure you’re not ravenously hungry when you arrive (or if so, grab yourself a scone or croissant while you wait).

For lunch, the Herb Roasted Mushroom Panini is my current favorite.

vpcMushroomSandwichKW

Though I also frequently order the Chicken Salad Sandwich.

vpcChickenSaladSandwich 

Overall, Volunteer Park Café is a relaxed, enjoyable, friendly place that consistently turns out great food for all meals. Add a reasonably priced wine list (which seems to be rarer and rarer these days) and super-friendly staff and it’s no surprise that the lines can be out the door!

Volunteer Park Café
1501 17th Ave E
Seattle, Washington 98112
206-328-3155

Tues-Fri 7:00AM-4:30PM (Breakfast, Lunch)
Sat-Sun 8:00AM-4:30PM (Breakfast, Lunch)
Tues-Sat 5:30PM-9:00PM (Dinner)

Notes on lifetimes of Channels and their Factories

March 18th, 2008

One question I get from custom channel authors has to do with the various lifetimes of the components involved. Especially since, as per best practice, their heavyweight resources are attached to ChannelFactories and ChannelListeners and simply referenced from the Channel. Nicholas covered the basics in this post. Which to summarize is:

  • ChannelFactory created Channels cannot outlive their creator
  • channelFactory.Close/Abort will Close/Abort all Channels created by that factory
  • ChannelListener created Channels can outlive their creator
    • channelListener.Close/Abort simply disables the ability to accept new channels; existing channels can continue to be serviced

    Which makes life on the ChannelFactory end pretty straightforward.  On the ChannelListener side, there are a few subtleties. 

    First, a Channel is owned by the listener from the time of creation until the successful completion of channel.Open.  So if you are writing a custom listener that has offered up channels, you should clean them up if and only if they haven’t been opened.

    Second, in order to perform eager disposal, you will need to track active ownership of your heavyweight resources. If there are opened channels, then you need to make sure that the shared resources that they leverage have their ownership transferred from the listener to your active channel(s). This can be accomplished through ref-counting, active transfers, or other mechanisms.

    Butternut Risotto

    March 17th, 2008

    In our quest to go through the myriad of squash that we’ve gotten from Pioneer Organics, tonight’s experiment was butternut squash risotto (base risotto with shitakes, cream, and butternut squash). And we doubled down on new recipes; tonight we also tried the George’s Bank scallops (frozen) from Trader Joe’s.

    Verdict: The risotto was fantastic. The scallops had a good texture but tasted a tad fishy. They did look nice though :)

    KLscallopRisotto