Statistics

Total Posts: 34
This Year: 0
This Month: 0
This Week: 0
Comments: 161


RSS 2.0

Recent Posts


On this page....

The Running Mate - Code available at Codeplex
Performance Talk at Swenug in Göteborg
The Running Mate – What is it and why?
The Running Mate - An Introduction

Archives

 Full Archives By Category
 2007 Calendar View

Categories


Admin

Sign In

Acknowledgments

DasBlog Theme Design by: Tom Watts
E-mail: Send mail to the author(s)
Theme Image by: dreamLogic

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

 Friday, October 31, 2008

This blog post is part of a series of blog post that starts here.

Well, to be honest, it has been available all since this Monday before the Swenugpresentation. But I just added some missing files too so now it actually compiles too... Sorry about this if someone chose to download the code right after the presentation.

As perviously stated in this blog post series, I initiated the creation of the Running Mate mostly because I needed a demo application for a performance talk. It served its purpose well I think, and I think I can make use of this applications in upcoming presentations. However, being a demo application, it is far from complete in functionality:

  • There is no PDA based version of this code built yet. I.e. the device that tracks and sends the GPS ticks as you run to the server. Obviously without this, there is no purpose of the Running Mate. So I hope that I or someone else will have the time to build this eventually.
  • There is no real Graphical User Interface built yet. I built a test load client for simulating the load and I also built a windows client application for inserting the test data into the database which both are available. But the real GUI is not built yet. I have some ideas for this and hopefully someone will help out with this GUI eventually since GUI is not my cop of tea...

As for all the source code it is available here: http://www.codeplex.com/runningmate. It is published under the GNU GPL v2 license model.  You can quite easily use Subversion (TuroiseSvn client) URL at https://runningmate.svn.codeplex.com/svn or the TFS Server URL at https://tfs05.codeplex.com.

I am usnig SVN myself and unfortunately, the throughput is very low. I suspect Microsoft is actually to blame here since Codeplex is a very popular open source repository these days. Microsoft don't seem to have scaled codeplex to meet the demand. If it does not improve or if I see it is a problem I might move to another availble code repository. We'll see.

The current file folder structure in the repository looke like this:

TheRunningMate_filestructure.JPG

Although this most likely will change in the future, the idea is that a working, non-demo version of the code will be available in parallell with the DemoVersion folder. Eventually..

In the VisualStudio folder, all the C# 3.0 code is placed. I am using Visual Studio.NET 2008. Currently, I am running MySql as the data persistance provider, but I might make more options available too. After all, MySql requires a MySql server to be installed in some way or another (there are quick ways to install it) so it is a bit too much of a hassle to get the application up and running if you are not using MySql. The DB folder has everything you need here though for the application script wise, but please let me know if something is missing.

Hmm, that's it for know I think. I'll back on the topic of design and architecture in an upcoming blog post.  

Friday, October 31, 2008 4:37:03 PM (GMT Standard Time, UTC+00:00)
 Sunday, October 26, 2008

Ok, so this is my third blog post today. Gotta be a record for me I think. :-)

On Tuesday I will be presenting on the topic of performance optimization at Swenug in Göteborg. This last year I have been working quite a lot with this focus at Admeta. The topic of this talk is: 1 billion web request - response time 50 milliseconds. This is actually not a lie since we have these types of requirements at Admeta. One billion request is quite a high number so I do understand if there is a mild hesitation if it really can be true. But asynchronous requests from multiple high load pressure web sites can stimulate this type of requirements, trust me.

I believe the presentation will be approximately 2 hours, but there will be room for some discussions. I've been at a number of Swenug presentations by now here in Göteborg and I think the atmosphere is very relaxed and nice. I hope for the same nice athmosphere on Tuesday with lots of interesting questions and discussions. So this is what I planed and prepared for my presentation:

1. Load testing process and demonstration

Load testing is of vital importance in order to understand how the load pressure will affect your web site. Scaling with more machines is not always something that you can do hastily if the need arises and it sure does cost a lot of money to do it. So it's good to know a little of what you application could behave in production before you launch it. In this part I will go through the load testing procedure, what to look out for, what data to collect, and give various other hints based upon my experience in the area.

2. Performance Profiling with the Running Mate application

For profiling och optimising, I will demo with a new hobby application that I just recently built: The Running Mate. The special thing about this application is that I have built the domain very loosely coupled with regards to the application layer making it possible to switch the domain layer at runtime. I am basically providing these different types of implementations:

a) The Super Hack: this was the running mate application as easy as I could possibly implement it. Not much design work. But fast?

b) The Overkill Design: This application is a bit overkill since the domain model is interchangeable in runtime. I would say that in most cases, this is not how you would normally decouple the domain layer since the need for it often just isn't there. However, it is very useful if you would like to profile performance with regards to different types of domain model implementations. The architecture pattern is that one of the Domain Driven Design (as described by Eric Evans) which gives the system a very nice Separation of Concern I think. One of the provided domain models is using a traditional Data Access Layer implemented in DDD repositories. The other provided domain model is using the Mindscape LightSpeed O/R mapper which we have used at Admeta for quite some time. As you can see in the link it is providing a bunch of nice features and it is very nicely DDD oriented.

So, I think there is enough substance here for a two hour session with discussion. All code demonstrated during the evening will be provided at CodePlex at http://www.codeplex.com/runningmate very soon.

Sunday, October 26, 2008 10:24:03 PM (GMT Standard Time, UTC+00:00)

     This blog post is part of a series that starts here.

I have long distance running as a small interest of mine. It is far from a passion, but I try to get out in the forest and run a distance of approximately 10 km every weekend. I usually run in a park called Hisingsparken here in Göteborg which is a beautiful and peaceful forest to run in. With the courtesy of shapelink.com , here is a map of the 10 km lap that I usually run.

hisingsparken.jpg

Well, beautiful and peaceful isn’t all, is it? The current condition and health situation surely makes running a lot more enjoyable. And in order to get in fit which makes running a great sensation, you have to run faster and push yourself a bit.  So this blog post is basically about finding this motivation with something called the Running Mate.

In order to motivate myself to run a bit faster, I clock the time it takes to run the distance. But unfortunately I seem to be stuck at about 55 minutes for 10 km run which is a bit too long time I think... I know. There are various good ways to improve the time: run more often, vary with shorter distances etc. If lowering the time would have been of really strong importance to me, these ways of doing would probably suffice for me. But as it, my level of interest makes me look in the direction of technical tools to help me out…                          

My problem when I run is probably motivation and focus at the running process itself. I let my mind wonder and I think of everything except keeping the correct pace. Running is great for problem solving by the way. Anyway, the clock does not give me this feedback since I have no idea of what time I am supposed to have when I am looking at the clock during the run. Naturally, this can be solved by having a number of part times at specific distances. And I do, but I don’t really want to keep track of too many of these part times since it disturbs my thoughts on other things. I would like to be able to know instantly, at the time of interest, what my pace is compared with a previous run at that exact spot of the run.

So the answer is obvious: The running mate application. It has been possible for quite some time now to buy a GPS equipped watch with this type of applications. The main idea is that it should be possible to run against yourself, i.e. being able to compare your current running time against a previous time you have had in a previous run at each and every spot of the run.

So I could have gone ahead and bought this GPS device. But something has stopped me so far. Of course it would be cool and exciting to fabricate this tool myself with the help of a mobile phone and a GPS device. Not that I know if I will ever get around constructing the whole thing, but I intend to build something in code and blog about it. I do this partly because it is a fun thing to do, but also since I think this application could be the basis for future examples both on the blog as for presentation I do.

So next blog post, coming up soon I hope, will be about the mathematical geometry needed complete such an application. Fun stuff I think.

Sunday, October 26, 2008 9:39:54 PM (GMT Standard Time, UTC+00:00)

For quite some time now, I’ve been thinking of the design of a so-called Running Mate application. I decided that it was time to implement it and the trigger that set me of was to have a fun example to use at a performance tuning presentation. So beneath is what I have in mind as blog topics although it can change somewhat as I go ahead:

  1. The Running Mate – What is it and why?
    This is a personal touched blog post with the background story as to why on earth I think the Running Mate application is a nice thing. Off course, this blog post also lets you know what the application is actually doing
  2. The Running Mate – Code available at Codeplex
    Source code available and some words about what is provided and what is not provided in the repository as well as some file structure information.
  3. The Running Mate – The geometry calculations
    In order to implement this application some interesting geometric calculation is needed. This blog describes these calculations.
  4. The Running Mate – The Super Hack implementation
    Sometimes I start off by doing a rather quick and dirty implementation of the application and then refactor my way into a more nice design. I didn't actually do this for this one, but I needed super hack implememntation for my presentation. So this is breif presentation of a quick and dirty implementation.
  5. The Running Mate – The Domain Driven Design approach
    In this blog post I transform the application into a design that is closer to a Domain Driven Design.
  6. The Running Mate – The O/R Mapper Repository
    The repositories built in the previous blog post uses a classical database access layer wrapped in repositories with inline (ad hoc) SQL. Here’s an alternative approach with the MindScape LightSpeed O/R mapper.
  7. The Running Mate – The loosely coupled Domain Layer
    Most O/R mappers integrate into the Domain Model rather tightly and make it a bit more difficult to switch from one O/R mapper to another one. This is a bit strange since O/R mappers themselves make the choice of underlying database very flexible. In this blog post I describe how you can decouple a domain model from the application so that you can have several different versions of domain layers that the application can utilize. The loosely coupled domain model is not always that useful in reality, but it is a nice experiment.   

I may change the topic names slightly as I go ahead and write about them, but I hope you can live with this. There are actually many more blog posts that I can write based on this application. For instance I would like to write some more about the LightSpeed O/R mapper and how you can wrap the basic CRUD stuff to make these methods really easy to access with a simple API. Also, there is a lot of stuff on performance tuning this application that I would like to write about eventually. But I better not promise too many blog topics in advance since you never know what lies round the corner.

So. Basically, I am back in the blogosphere for another round.

Sunday, October 26, 2008 9:12:12 PM (GMT Standard Time, UTC+00:00)