Posts Tagged Tadmap

A limitation of shared hosting and a push toward cloud computing

Today I ran into one of the limitations of shared hosting.

I’ve been struggling for the last few weeks to handle large files in my application. I published to the server earlier this week but with no success. All my tests failed after 10 minutes with a ‘Request timed out’ error. I was testing with an 80mb file but with a slow broadband connection (thanks to Ice). I had increased the timeout and max request length for the upload handler like so in the web.config:

   <location path="Upload.mvc/Upload">
      <system.web>
         <httpRuntime  maxRequestLength="2097151" executionTimeout="10800" />
      </system.web>
   </location>

I ruled out any setting that I had control over, so the next step was to talk to my hoster, Blacknight, to see if they could help me out. They replied saying that they could not support the uploading of large files stating that:

It ties up too much system resources to upload huge files like that through asp and would cause problems for other users on the shared server.

Of course they’re right and I can’t really complain but it’s bitterly disappointing none the less.

For the foreseeable future, a couple of file uploads a month is all I require so I don’t want to pay for more expensive hosting packages. So back to the drawing board…

Cloud computing

I’m already using the Amazons S3 service for the storage of the images and I think I can upload directly from the client to S3. So I just need a high spec PC for a few minutes to process the files after the user has uploaded them. Once processed I will only ever have to deal with smaller versions or tiled sections. This looks like an ideal candidate for the Amazon Elastic Compute Cloud (EC2). Where I can pay by the hour for a high spec machine.

I was hoping to dip my toe into some cloud computing at some point but I didn’t want to be pushed. This is going to be a lot more work than I hoped and will need some effort just to cordinate between the web server, client machine and a cloud computer.

I haven’t decided on the final architecture yet, just thinking out loud, but looks like a lot of fun (and hard work) ahead…

Tags: , , , , ,

What's up with the Tadmap project?

If you’ve been following the Tadmap blog then you might be wondering why there haven’t been any updates since November. Well here’s why.

Before Christmas I decided to try out the new ASP.Net MVC framework, for no other reason than wanting to learn more about it. My initial impression was that it would be ideal for Tadmap, so I decided to go for it. The change over meant refactoring all the pages I already had into controller and views, and I got 90% there very quickley. As I had never used MVC before I started following Rob Conery’s MVC Storefront series to make sure I was doing things right. This may or may not have been a mistake.

First, he was using a fancy new version of the Repository pattern which I liked the look of very much, this lead to even more refactoring and learning more about LINQ on the way.

I tried to ignore the Test Driven Development aspect of what Rob was doing, but eventually I downloaded Nunit just to try my hands at writing an automated test. Straight away I was hooked on TDD. I tried limiting TDD to just new code but to make the new code testable meant refactoring the old code to reduce dependencies.

It’s taken a lot longer then I wanted but I am having a lot of fun doing it. My code is clean and loosely coupled and I have over a hundred unit tests and a bunch of integration tests that I can fire with one click.

Even though I have no boss and as yet no users, I have still run into the age old problem of doing it right versus getting it done. There is the ultimate balance to be made between making things perfect while achieving the goals and real world features that help our moral and motivation. It’s starting to bother me that I haven’t been able to add any new features in over a month.

So in the next few weeks I hope to get an, albeit imperfect, ASP.Net MVC version of the application up on the live server. I’ll then be in a position to iron out the last few post refactoring bugs or implement a cool new feature when I need the motivation to keep going.

Tags: , , ,

More blogging in 2009

It’s a new year, a time to start those good habits again. One thing I want to start doing this year is to write more blog posts. Four blog posts in November, that’s pretty good going for me but then nothing in December. The reason I hesitate when it comes to publishing stuff is that I’m not very good at writing. But that’s not going to change with out some practice.
The other reason not to publish something is the feeling that it’s not worth saying unless it’s going to contribute something that other people actually want. But as you can see from this post, I don’t care about that anymore.  I’m just going to say stuff and get things off my chest.
So what am I going to write about? I will try to keep it somewhat technical in nature. Professionally I work with ASP.Net 2.0 but on my Tadmap project I’m getting to work with some cool new stuff like C# 3.0, ASP.net MVC, LINQ and Test Driven Development. All of which may be food for future blog posts.
As you can see on my blog page, I have added my twitter updates. I’ve had a twitter account for a while now but just started using it lately. This is just another way for me to practice writing. I think this whole twitter lark maybe just a fad but I’ll give it go for while and see what happens.

Tags: , , ,

ASP.Net MVC on Blacknight

Update: SP1 is now installed for ASP.Net 3.5. So now the only DLL you need to upload is ‘System.Web.Mvc.dll’.

I was reading a little bit about the new ASP.Net MVC stuff. I think it would be ideal for my Tadmap (image hosting) project. Before I started any major development re-work I needed to check that my hosting provider, Blacknight, could host it.
So I uploaded the sample MVC application. Of course it didn’t work at first but I don’t give up that easily and it is now up and running. I think the following steps will work for anybody else trying the same.
As Blacknight do not have SP1 installed for ASP.Net 3.5 you have to upload the new DLLs when you deploy. Simple instructions can be found here, Bin Deploying ASP.NET MVC.

My windows account on Blacknight is using IIS 6.0 which does not automatically support MVC. In order to handle URLs the MVC way you will need to follow the instructions here, ASP.NET MVC on IIS 6 Walkthrough. Basically, you just need to grab the code for the Global.asax.cs file and add a ‘.mvc’ file mapping using your Blacknight control panel.
To add the file mapping, just go to the ‘Web’ tab of your domain and add ‘mvc’ to the ASP.Net 2 mappings. It should look like the image below and make sure that ‘Script Engine’ is ‘On’ and ‘Verify File Exists’ is ‘Off’.

One small (cosmetic) problem is that the URLs aren’t as clean as they should be because the ‘mvc’ extension is needed. So the URL for the About action of the Home controller that should look like ‘http://trevorpower.com/Home/About‘ instead looks like ‘http://trevorpower.com/Home.mvc/About‘. I have seen solutions to this problem as well but that’s for another day. Right now I have the not so small task of converting an existing ASP.Net application to an ASP.Net MVC application.

Tags: , ,

Tadmap – Image Hosting for Map Collectors

One of my interests is in early maps. I don’t have a big collection or anything but I would like to be able to browse them on my computer or show them to other people. One of my hobby projects is to provide a website that does just that.

The technical aspects of developing Tadmap I will probably write about on this blog, but I am also writing on the Tadmap blog if you are interested in learning more about it.

Tags: , ,