Category Archives: TulsaTechFest

Tulsa TechFest 2012 Code

Here is the code from my talk at Tulsa TechFest on SignalR. Thanks to those of you who came to the talk, I hope you learned enough about SignalR to determine if it’s the right technology for you. Be sure you have enabled NuGet to restore packages on build so the required references all get downloaded and installed from the NuGet site.

TulsaTechFest2012.zip

 

Tulsa TechFest Wrap Up

This past Thursday and Friday, the Tulsa TechFest was held at OSU Tulsa in Tulsa (could I write Tulsa one more time, I knew I could). Attendance was high and most of the sessions I attended were in rooms full of people. The day started off early Thursday morning, but that’s not the start of the story.

The night before, Dru and Rob came by the house for a little pre-conference warmup (and by warmup, I don’t mean this). Rob went through his presentation on continuous integration one last time while Dru and I worked through our presentation on messaging (and how to do it with MassTransit, of course). The night ended early for me, but Rob and Dru met up with Ben at the hotel and closed the bar (and by closed, I mean walked in at last call and got one beer).

The next morning we all met up and caught up on things since the last gathering. Since the last time we saw Ben, he’d been through a hurricane and granted the MVP Award from Microsoft. We then planned out our day of sessions based on the information currently available to us.

The speaker for the CSS talk was unable to attend, so the four of us convened an open-space session on CSS. The discussion in the fishbowl was good with a lot of interesting topics. Ben gave an on-screen demonstration of CSS from the ground up for those in the room that were new to it, providing context for the audience. CSS is extremely important considering it is the best (only?) way to layout and style websites consistently across browsers. I think everyone brought up how much of a turd IE 6 is when it comes to CSS compatibility.

After lunch, it was time for Dru and I to present our session on message-driven architecture (using MassTransit). You can see the first hour of the session on video here. The crowd really got into it, asked a lot of questions, and hopefully came away with an understanding of asynchronous application design and messaging.

After that session, we sat down with a guy that works for Sun and talked about enterprise application architecture. It was interesting comparing the mature open-source nature of Java to the budding open-source landspace in .NET. After the closing session and prize giveaway, there was a speakers dinner (Rib Crib, good stuff). Once we had eaten, we went to the hotel and did a little code sharing and Dru and Ben went through ASP.NET MVC some more. Then we went over to Dirty’s Tavern for some post-day fun. I was worn out, so I went back to my car and called it a night.

The next day was full of interesting stuff. A nice introduction to ASP.NET MVC by Ben, some extensive coverage of log4net by Dru, and I gave a presentation on iPhone development. Outside of the actual sessions there were a lot of great conversations about development and tools in general. We also recorded Ray Lewallen’s session on Behavior Driven Development, which can be viewed here.

My iPhone development session was purely introductory to show the tools and how they are used to build and deliver applications for the iPhone. The room was absolutely packed and hopefully everyone walked away with some good information. I know at least one guy did, he left two seconds after I said that building iPhone applications requires a Mac!

To wrap it up, the event was a huge success. There were a ton of people there, the vendor room was always alive with activity (likely due to Chris Koenig and his Rock Band setup giving some much needed ADHD relief between sessions). Chris also had a couple of great sessions on Silverlight and the new features in 2.0 that should really improve the use of Silverlight for Rich Internet Applications (RIAs).

MassTransit 0.4 Released

I’m happy to say that we’ve just tied a bow around the latest release of MassTransit. Release 0.4 includes a number of new features and some tweaks to the internals as well. I’m going to describe a few of those features below, but you can grab the latest from the trunk or download the 0.4 release.

Building MassTransit

Since Visual Studio 2008 has been out for almost a year, it is now required to open the updated solution for MassTransit. In the main folder, the MassTransit-2008.sln is the one to use to build and run the unit tests. Many of the samples solutions are also 2008 solutions. The assemblies, however, are still targeting the .NET 2.0 framework, making them usable on both 2005 and 2008 projects. With only the .NET 3.5 framework installed, you should be able to run the build.bat to build the project without Visual Studio (our CI server does this).

Timeout Service

To enable automated support for timeouts in sagas, a new timeout service is available. This is a general service that can be used to schedule timeouts for whatever purpose may be needed. To schedule a timeout, the application should publish a ScheduleTimeout message with the duration or time when a response should be sent. The application/service can then consume the TimeoutExpired message, which will be published by the timeout service when the timeout period expires.

Message Deferral Service

One of the scenarios I often find in our systems is the need to poll a remote resource to determine if an operation has completed. To support this behavior without custom code in each instance, a new message deferral service has been added. This can be used to defer the delivery of a message until a period of time expires. The deferral services leverages the timeout service for scheduling and we republish a message after that timeout expires.

For example, we have a CheckRemoteResponseStatus message in one of our systems. This is initially published after a request is submitted to a remote system and a remote transaction id is returned. The first time the consumer gets the message, it checks the remote system for a response. In most cases, the response is immediately available and the saga continues. However, sometimes the remote system is too busy to respond and returns a pending status. In this case, the same CheckRemoteResponseStatus message is published within a DeferMessage. The deferred message service handles that message and will republish the original CheckRemoteResponseStatus message when the timeout expires. The saga will then handle the message to see if a response is now available. The saga keeps track of how many times the remote status has been checked and uses a sliding interval that increases as the retry count increases. Eventually, the final retry results in a failed transaction and is handle appropriately.

The nice thing about this is there was no custom retry logic required, and a common timeout and message deferral service were used. There are likely other cases within the application that will benefit from this shared functionality.

Transactional Queue Support

With 0.4, the entire method of reading from the endpoints has been redesigned. Previously, a single receive thread was used to receive from the endpoint which then dispatched the message handling to the dispatcher inside the service bus. This has been redesigned to use the dispatcher threads to perform the actual receive from the endpoint, using a transaction (ala System.Transactions) to handle the message reception. This keeps the transaction to a single thread while at the same time allowing concurrent message reception.

The transaction carries over into actions that are part of the message consumer. If a database update is part of the consumer, that database update can cause the entire message to rollback if it fails. If any exception is thrown, the entire reception of the message, any additional database operations, new messages sent, etc. will all be rolled back with the transaction.

Performance Improvements

Dru spent some time in NYC with Ayende Rahien reviewing the MT source code and Oren recommended changing from using locks to ReaderWriterLocks to improve concurrency. The changes in the threading system, along with the elimination of a lot of locking in favor of reader/writer locks has nearly doubled the throughput of messages when using a multi-core system using MSMQ. There have been a number of other internal tweaks as well to improve the concurrency of the bus dispatcher.

Control Bus

To enable competing consumer in a publish/subscribe environment, the control messages need to be on a separate bus from the data messages. To allow multiple services to compete against a single data channel (single MSMQ) in order to load balance and handle failure scenarios, the services cannot compete on the control messages such as subscriptions. The subscription client has been tweaked to allow it to operate on a separate bus from the data bus, at the same time notifying the subscription service of messages handled by the local endpoints of the service.

It’s easy to setup a single service that consumes messages from multiple buses (which in turn each have a specific endpoint being serviced). When a component is created to consume a message, the specific bus/endpoint that received the message is injected into the component (via setter injection) so that any subsequent messages can be published to the appropriate bus.

Health Service

The health service has been added making it easy to monitor endpoints and identify when an endpoint goes down. Periodic heartbeats are sent to the service and when a heartbeat hasn’t been received in a while, it marks that endpoint as down and attempts to directly ping it to get a response. The heartbeats can be subscribed, so a monitoring tool can keep track of which endpoints are there and what they are handling.

Configuration Model

To make it easier to use the bus in different containers, a new configuration model has been added to build and configure a service bus instance. This will ultimately result in moving a lot of the code used by build a service bus out of the container-specific facilities (such as the Windsor container).

Host Improvements

The ability to create and deploy Windows services has gotten easier with the updates to the Host assembly in MassTransit. With only a few files to define the lifecycle of a service, it is easy to get the ability to run, test, install and deploy a service. This includes services that are using the service bus. There is little to no coupling between the host and service bus, making it usable for a variety of purposes.

Learning MassTransit

A lot of requests have come for information on how to learn to use MassTransit. During Tulsa TechFest this week, we’re going to record our presentation and make it available online within a few days. This should give at least some introduction on how to use MassTransit (the presentation is mainly on distributed architecture, but we’re using MT for the demo bits). We’re also talking about doing a couple of podcasts on how to use it as well. Depending upon how that goes, we’ll try to do a couple of screencasts on “creating your first project with MT.”

The best way to discover how to use the code is to review the samples. The WinFormSample gives an overall example of how a variety of features are used. The HeavyLoad shows how many of the pieces work as well. The samples folder has a few others that demonstrate how to use MT in other scenarios.

So, check out the new release and give us some feedback on how the new features are working. We’ve already got a few backlog items that we’re slating for 0.5 based on some other contexts that have come up in our applications. Feel free to post on the message group or send either Dru or I an e-mail or tweet if you have any questions.

Prelude to Tulsa TechFest 2008

In two weeks, the 2008 installment of Tulsa TechFest will be upon us. For two days, Tulsa is going to unleash an impressive array of sessions on all aspects of IT, security, and software development. As I review the broad list of presenters I can’t help but see conflicting sessions where I’m going to have to make some tough choices.

If you are going to be anywhere near the Tulsa area and can manage to slip away from work for a couple of days I highly recommend making an appearance. The breadth of learning opportunities at the unbelievable price ($2/day) make this an incredible way to learn some new skills and sharpen your existing ones.

I will be presenting in two sessions this year. The first session will be on building distributed application using MassTransit (co-hosted by Dru Sellers) and other open-source frameworks for .NET. This is doing to be a deep view on how to build loosely-coupled systems on top of a messaging service (in this case, MSMQ). Advanced topics include asynchronous messaging and sagas (long-lived transactions).

The second session will be an introduction to iPhone development. I’m not a seasoned expert here, but I’m impressed with the platform provided by Apple (Xcode) free of charge for building applications for Mac OS X and the iPhone. This introduction will cover the tools and application structure for building iPhone applications in Objective-C.

If you happen to see me there, feel free to stop me and say hello.

Tulsa Tech Fest 2007 Is Over

The 2007 edition of the Tulsa Tech Fest has finally ended.

Today I went to a couple of different sessions. The first was about balancing agile development and plan-based development. I was expected to come out of the session with some good information, but I didn’t feel I gained any new knowledge. I got some clarity on a few issues, so it wasn’t a complete waste of time.

After that I attended Evan Hoff‘s presentation on TDD. This was very useful information and it was great to see some real TDD/Resharper usage in action. Evan is a great presenter and made a great case for TDD using [whatever]Unit and Resharper. At the end, Evan gave away a copy of Resharper (likely donated by jetBrains) and my friend Debuke snagged it — grats David.

After that, I hung out in the green room with Laribee and a few others folks and listened to them talk about some of the various services they used (like Amazon S3, etc.). It was interesting, I certainly know the pains of getting smaller applications hosted on the web. Of course, most of my work ends up in one of our corporate data centers so I haven’t had to deal with that too much lately.

The Hartford threw down a speaker to talk about Enterprise use of open source technology. I honestly felt this was a horrible way to end the conference. The speaker didn’t ring a bell with me at all, and we use a ton of open source code in our products. Many of our internal systems are built on JBoss, GlassFish, Castle, etc. and nothing said really made any sense. I felt like the presenter was really on a different page compared to my experience.

Last were announcements and giveaways. I snagged a copy of dotTRACE, another Jetbrains product. My friend Alan managed to score the grand prize, a quad-core 3gb desktop machine with Vista on it. Very cool, I bet he’s glad he came to the event now!

This year, the TechFest was a major step up compared to last year. The initial year had some problems but the event was still great (I presented twice last year, only once this year). This year, the content was excellent, attendance was huge, and I think everyone had a good time. I think it helped that I knew more people this year as well. David Walker did a great job and I can’t wait to see what happens next year!

That’s a wrap!

Tulsa TechFest Live

Tulsa TechFest 2007 started this morning (well, last night if you’re a speaker) and there is a huge turnout for the event. There are so many people spread out amongst all the tracks — much more than last year.

I started off the morning with a game of Guitar Hero II in Chris Koenig’s booth. Nothing says happiness like pounding out a couple of tracks to start the day. A majority of the morning activities consisted of registration, sign-in, announcements and keynotes. The first session started at 10:30 AM, which is when I gave my talk on MonoRail.

I had a decent turnout for an obscure framework and was happy with the talk. There was some good discussion on the parts around the framework (Windsor, NHibernate, ActiveRecord), and a lot of good questions. I forgot to put together an example on ViewComponents, so I’ll likely write a blog post in a few days about how to build one.

Lunch was quick, I think the pizza to developer ratio was slightly underestimated, but we could all use on less slice of pizza now and then. This afternoon looks to be packed, so I’m on to the next event.