Archive of October 2008

Unix: Pipes

Pipes or pipelines in Unix are arguably the most singularly useful elements of the console. It allows you to combine one command with another.

By doing this you are open to a vast variety of other things. Here's an example:

ls | grep 'Palin'

Of course, there is no need to limit this to one result either. The next example is entirely valid too.

ls | grep 'Palin' | less

To understand how this works, it is important to understand what each function itself does.

ls

This stands for list and essentially just lists the files in the current directory you are in.

grep

grep allows you to search for items containing a certain string. In this case it is used to only show the items which contain the string "Palin".

less

This ensures that the data will fit into to the size of the terminal. Although it is less of a problem with a terminal held within a GUI, where you can scroll back, on a traditional display you do not have this.

Hitting space or the arrow keys allow you to scroll up or down.

The Final Solution

When all of this is coupled together the output is all of the files contained within the current directory which contain the string 'Palin' set to fit within the current screen size.

Why it's Useful

Instead of searching through a big directory of files you can specify exactly what you desire to see.

I used this to search through a directory containing a mass of video files, I only wanted to see the one relating to Michael Palin, thus the Palin search string.

More

Pipes can of course be used for a lot more. Last night I watched a talk given by Linus Torvalds on the history of Linux, he uses a mixture of pipes and grep to filter through the mass of information held within the Linux Kernel Mailing list.

October 31 @ 12:01 AM | 0 Comments

Cloud Computing and Traditional Hosting

The trouble with this big push for Cloud Computing is that people have stopped talking about the basic way that you need to get your site/app/blog hosted. It is all well and good to be able to export your hosting to a limitless list of providers but none of them seem to stand out any more. Which made me think.

There is a space there for a provider which fills both needs. The need to be expandable and the need for a basic service.

Unless you are going to use Amazon EC2 (functionally it is like a virtual machine) to constantly host your site, then where do you turn for basic hosting? Do you turn to the "old fashioned" provider selling you on capabilities or do you turn to a big name just for some of it and do the rest through the cloud?

Small Use, Big Options

In terms of scale, the projects that I am involved in do not stretch that far. They have the capability to, but they don't. I am not moving a large amount of data around so therefore I go with something simple to provide a backbone for everything. It's not great, but it works.

For the "small fry" - the people which do not push out much data nor require many CPU cycles then the options are limitless. There is no requirement for a provider which can react to the way you operate neither a provider that can be there 24/7.

This is because your requirements do not change that vastly. From one month to the next the changes are minimal and for that costs should be low and your provider being friendly should be enough.

Regardless of the fact that certain backward providers probably aren't that friendly when you leave or use more than they allow (meaning that they suspend your account) there usually isn't much of a need to be that complacent about providers. If you fall within this gap, like a lot of people, this is likely the reason why your provider stays afloat. They are giving you Web 1.0 in a Web 2.0 world. Not being flexible will be their eventual down turn. But enough on this.

The Full Cloud Providers

The trouble with these is routed in their initial reasoning. Instead of being there to provide you with a full service, they provide the overflow. The likes of Amazon S3 (web storage) is a good example.

They won't host your site. But it's good for hosting your images and scripts.

You can think the same of Google Apps for Your Domain. I'm about to set this up for mine (a review will probably follow shortly), and whilst it will give you Mail, Chat, Calendars and Docs (just like Google Apps normally). It won't host your site though.

For Developers?

The Cloud is usually talked about in a developer centric way. Your casual web user won't know what S3 or EC2 is, but they're using it. This developer-centric methodology seems to easily evaporate in the traditional hosting model where the company explicitly states what level of support they provide.

By not targeting the novices of the web world you are left with the lack of requirement for support. Many have done this rather badly, one hosting company comes to mind (a British one), which aims at the experienced user-group but in their marketing, this backfires instead putting off people.

To me, this suggests that instead we have a requirement for a solution that can fill this gap, providing a standard hosting model which is open to the cloud but still personal enough to not spend more time on support than running the service properly.

An Unproven Model

It is, in it's nature rather unproven. I'm not sure if it is practical to provide users with a small core hosting model which is then backed up with Cloud-based services. Sort of like a conjoined twin. To survive as a whole each child is needed. Remove one and there is the risk that the other dies.

A Case Study

Smugmug

This is always shown at the good example of a service which is split across the traditional model (well, they host themselves) and the use of the Cloud, in this case Amazon S3.

They were an early adaptor (among major projects) of S3 and showed that it was a viable solution. Instead of paying through their teeth for hardware they output it all to the cloud. Saving upfront and continual costs as they use someone else's infrastructure.

This limits their requirements for Mail, Serving their Site and CRM which vastly reduces what they practically need to provide for themselves.

Like electricity, once a reliable form is found, it is adapted as a service and people start to pay for the product of the service, rather than trying to run it all themselves. You don't have a generator, do you?

Conclusion

What I can see is a slight gap in the market. Maybe it is just for people like myself which feel like they should stop hosting the projects themselves and should instead "do it properly". But I can see that maybe there is the need for the conjoined variety. One that is still aimed at developers, but knows that the cloud can help, rather than break down their hosting service.

This is a reflection from watching nearly all of day one of the Future of Web Apps Conference videos. You can see them here.

October 30 @ 02:02 AM | 0 Comments

Finishing my iBook and Leopard

Quite a long time ago I finished my iBook. I had originally broken it one Sunday afternoon whilst changing out the HDD. I had broken the power connector so that from then on, you couldn't use the power button to switch it on. My original plan had been to upgrade it to Leopard which had then only recently come out. It didn't quite go as well as that of course, leading me to take a rather long time to actually get it up and running.

Although there was no reason why it wouldn't work, there was also no documented evidence of Leopard running nicely on an iBook G4 1.33. My plan was to show that it could be done.

So, to honour my original aim, it works perfectly with no real problems at all. It has been serving this blog since going back into service and seems to have fitted that bill rather well too.

My only major gripe is that I never did really finish it. I had hoped to put it into service fully by repairing it, once that had gone out of the window I hastily reassembled it and have left it like it ever since. The honest truth here is that I have to leave it on constantly, and have it set to wake after a power cut. When it comes to rebooting after upgrading, this can turn into a scary procedure as if it does not come back online again I have to take it apart to short the contacts together.

So, in the spirit of a project that has taken far too long to complete, I am going to start hunting down a logic board. With the age of the machine it is hopefully coming to a time where getting one, either through a spares and repair machine or individually shouldn't cause too much of a problem. Or be too expensive.

When I last looked into this, I was looking at around £300, for which the logic board comprises of most of the machine, with everything loaded onto it.

The reason for doing this is to turn it back into a Laptop. That's what it is, and it seems a bit silly having it laying around (with a new battery) functioning as a Server that cannot be switched back on if it goes completely.

I am going to call this a close to the very long "series" that I ended up posting about it, as the next stage comprises of a new project. Hopefully one that won't take nearly a year to complete.

October 29 @ 11:25 PM | 0 Comments

Connecting my Touch to a Nokia E51 for Internet Access

Following on with yesterday's post with me trying out mobile operator Three/3, I thought that I would start to explain how to connect a Nokia E51 to an iPod Touch. Although it will not give you full connectivity, this method is free, and tested, by me.

What You'll Need

  • A compatible Symbian S60 phone, like the Nokia E51
  • Joikuspot
  • A WiFi enabled device, such as the Touch

Limitations

The best way to start such a thing is to explain what you can't do with this setup. Explicitly with the free version of Joikuspot.

  • Your battery won't last long.
  • You can only access HTTP and HTTPS.
  • It's not that secure. (Only WEP).
  • It may not work on every UK mobile network. For one, O2 PAYG does not.

Regardless of these, it does work to a good degree and for a reasonably decent amount of time. If you were planning on using it for hours on end, like half a day, I wouldn't recommend planning to use either device afterwards.

What It Does

In effect what it does is share your mobile's internet connection over WiFi, in effect turning it into a mobile hotspot. This means that both the cell module and the WiFi will be on, most likely to their almost full capacity.

How to do it

This can quite easily be split into a few stages.

  1. Install Joikuspot.
  2. Configure it.
  3. Connect it to the Touch (or other device).
  4. Setup the proxy settings.
  5. Enjoy.

You can get the free version of Joikuspot from the site here. Once you have downloaded that, bluetooth it over to your phone and install it.

Once it is installed, stop it from running at first so you can configure it properly. You will want to enable Encryption, but you may like to test it without this first.

Setting the Access Point should be regarded as the most critical part. Without setting this properly, it just won't work. If you have a WAP connection, this also will not work as full data packets need to be sent. This is in regards to O2 UK, which only provide a WAP connection and not a full packeted internet connection.

Generally, the rest of the settings are fine as default.

A selection of screenshots which show the Joikuspot settings

Final Step

The Touch itself requires a slight bit of extra work to get it to work perfectly. You need to set a proxy under the WiFi settings and this allows HTTPS to work properly, which for some apps, like Twitterrific do not work without.

Settings for the iPod Touch with Joikuspot

The full URL is

http://192.168.2.1/wpad.dat

All in all it does work out to be a reasonable solution to browsing on the Touch where you can't find open/free WiFi. All of the apps will work with this solution, providing that you set the proxy setting on the Touch itself. Whilst it won't entirely replicate the iPhone, it is a good shortcut to having internet, in a good way, everywhere.

October 28 @ 05:54 PM | 0 Comments

Trying out Three

After finding out that I was unable to (as I had planned) share my phone's internet with my Touch, I came to the conclusion that the next step was to try another network.

Three or 3 seemed the best bet, they had the best prices around, but the SIM wasn't free. Just trying it out wouldn't be an option, I'd have to give it some thought.

So eventually, once thinking it through I ordered a SIM. It arrived the next day. I stuck it in. It worked. Nice and simple, and, with the credit already on board, I wouldn't have to fumble about with trying to get the thing topped up before I could register it. That's the trouble with free SIM's. It's somewhat catch-22. To use it, you need to call out and to do that, you need credit. You can't top up a phone which isn't active. It is possible of course, but it's not that much fun.

Half of the troubles regarding registering the cards revolves around poor instruction, this regardless and with me up and running though I started to check it out.

For £5 per month, I had myself a fair-usage mobile browsing package, far enough to connect up to my Touch, browse on my Phone and the odd occasion to my MacBook. This was £2.50 cheaper than O2 and it worked the way I wanted.

I haven't used Three/3 for very long, a couple of days infact, but seemingly their internet service is quite good. Although it is hardly up to the standards of my home connection, for browsing on the road it should be quite adequate.

Three/3 Speed Test Sheet

The screenshot above shows speeds of just around 100kb/s down. Even with the high ping rate and somewhat slow upload it does make for an attracting backup line too. I know that I can rely on my phone for if the phone line went down, even if it were just on my Touch.

This aside, it is quite important to cover the signal strength and range. Three are notoriously bad when it comes to getting a signal. Most of this is down to peoples perception of it as a service.

Although when they launched they were far ahead technically of every major network in the UK, they were a bit thin on the ground. For launch they concentrated on ensuring a good coverage in the major town centres for this new fangled 3G.

For some it worked out quite well, they had a good price, a good single and something that resembled the much better connections in Asia. Unfortunately, they are still labelled with the "toy provider".

Myself, I have not had any signal issues. For most of the time with O2, I was going back to old GPRS to browse the internet on, during most of my journey. So, even if this was fallen back upon, it would be no better than the much larger provider O2.

This will show over time of course, but, for the most part I have been rather happy with them. The web interface could do with some work, expecting me to place alphanumeric characters in passwords is rather backward and causes more of a user headache than an "extra layer of security". If this were sorted, everything would be much nicer.

In the coming months, I'll update on this to see if my experiences have changed.

October 27 @ 01:04 AM | 0 Comments
Next → Page 1 of 5