Archive for the ‘Backend’ Category

OpenDNS and Google Working with CDNs on DNS Speedup

A group of DNS providers and content delivery network (CDN) companies have devised a new extension to the DNS protocol that that aims to more effectively direct users to the closest CDN endpoint. Google, OpenDNS, BitGravity, EdgeCast, and CDNetworks are among the companies participating in the initiative, which they are calling the Global Internet Speedup.

The new DNS protocol extension, which is documented in an IETF draft, specifies a means for including part of the user’s IP address in DNS requests so that the nameserver can more accurately pinpoint the destination that is topologically closest to the user. Ensuring that traffic is directed to CDN endpoints that are close to the user could potentially reduce latency and congestion for high-impact network services like video streaming.

The new protocol extension has already been implemented by OpenDNS and Google’s Public DNS. It works with the CDN services that have signed on to participate in the effort. Google and OpenDNS hope to make the protocol extension an official IETF standard. Other potential adopters—such as Internet ISPs—are free to implement it from the draft specification.

It’s not really clear in practice how much impact this will have on network performance. It’s worth noting that GeoIP lookup technology is already used by some authoritative DNS servers for location-aware routing. The new protocol extension will reportedly address some of the limitations of previous approaches.

This article originally appeared on Ars Technica, Wired’s sister site for in-depth technology news.

Google’s New Cloud Storage Service Takes on Amazon S3

googlecodeGoogle plans to go head to head with Amazon’s popular S3 cloud storage service with the new Google Storage for Developers. Like S3, Google’s new service offers developers a cheap, scalable way to store data online.

While it isn’t exactly the fabled “GDrive,” Google Storage for Developers certainly lays the groundwork for Google to create a user-friendly online storage service.

Google Storage for Developers offers a RESTful API, backups across multiple data centers and even has support for storing large files up to hundreds of gigabytes in size.

Google Storage for Developers is currently an experimental Google Labs project. For now the service is available by invitation only and limited to U.S. developers. You can head over to the sign up page to request an invite which will give you access to 100GB of data storage and 300GB per month of data-transfer bandwidth.

After your application hits those limits a pay-as-you-go scheme kicks in. The pricing is roughly analogous to Amazon’s S3 service. Google’s version will run you 17 cents per GB per month for simple storage, 10 cents per GB for uploading data and 15 to 30 cents per GB for downloads. There’s also a fee for the number of requests — $.01 per 1000 PUT, POST or LIST requests and $0.01 per 10,000 requests using GET or HEAD.

Unfortunately that’s just different enough from Amazon’s pricing structure (which decreases the per GB price as your usage goes up) that it’s hard to say which is cheaper. At first glance Amazon’s S3 service looks marginally cheaper for storage, but in the end the total cost — and which is cheaper — will vary depending on the nature of your web app and how you use either storage service.

Hopefully, now that there’s some competition in the cloud storage space, both services will eventually become even cheaper.

Google does offer some extra tools that Amazon doesn’t have — the BigQuery API and the Prediction API.

According the Google Code announcement, BigQuery is designed to explore the history of your data, and the more interesting Prediction API gives you access to Google’s machine learning algorithms which are designed to “make your apps more intelligent.”

The Prediction API can help make real-time decisions “such as recommending products, assessing user sentiment from blogs and tweets, routing messages or assessing suspicious activities,” says the Google Code blog.

For now there is no charge for using the extra APIs, though noting that in the announcement seems to indicate that, when Google Storage for Developers moves out of Labs, there will be an additional charge.

Because Google Storage for Developers is a beta Labs project, you won’t want to switch from Amazon’s services just yet, but if you’d like to take Google Storage for Developers for spin, head over to the sign up page and request an invite.

See Also:

File Under: Backend

FTP for Beginners

It was in the dark ages of the Reagan era when I logged my first encounter with the File Transfer Protocol. I was involved in some nefarious video game-trading ring of the innocently naive variety, and a friend of mine had that hot new copy of Vladivostok Putting Challenge that I wanted oh so badly. The only problem was that he lived all the way on the other side of Orange County. Being too young to drive, neither of us had access to a car, and snail mail was just too darned slow. I wanted to lay down sloping fifteen-footers and rub it in the face of the Reds today, not in a week. “No problem,” my friend assured me. “Just log in to my server and grab it with FTP.”

“FTP? What is that?” I asked. My friend let out an Oscar-worthy sigh and gave me the quick run down of the Internet protocol that would forever transform my life.

Last I heard, my friend is collecting Galaxie 500s in Michigan, so calling him up with your FTP questions isn’t really an option anymore. Lucky for you, I’m here to give you a holier-than-thou sigh of my own and send you down the dharma path. For those of you who are entirely new to this whole game, we’ll start with a basic primer on the most comely of acronyms.

Continue Reading “FTP for Beginners” »
File Under: Backend, UI/UX

Site Optimization Tutorial – Lesson 1

A picture’s worth a thousand words. An old saying, but true enough on the web where you can transfer chapters of text in the time it takes to download just one big image. Ever notice how pictures are always the last thing to show up when you’re surfing? That’s because the biggest hunk of download time comes from the image files.

Over the next four days, we’ll be looking at all the different ways to get pages down to their leanest and meanest. Today we start with the most egregious and most obvious culprit: images.

By the way, a lot has changed since the first edition of this tutorial – there’s more to optimizing image performance today than just knowing your GIFs from your JPEGs. (Though we’ll review that, since this may be your first time around.) There are now other file formats (like PNG) worth considering, and improved weighted-optimization techniques to throw into the mix.

And, hey, quite a bit hasn’t changed. For one, web users haven’t gotten any more patient. It doesn’t matter how ice-cool your images may look – if they can’t be downloaded quickly over a 56K modem, very few people without broadband will stick around to see them.

Fortunately, there’s still a host of tricks and optimizations that web designers can implement to speed image downloads. Let’s start with the easiest thing in the world.

Continue Reading “Site Optimization Tutorial – Lesson 1″ »
File Under: Backend

Gather Users Data From Server Logs

Hey, you! What are you doing? Where are you going? More importantly, what are you clicking on?

If only it were that easy. But no, most users like to travel the web incognito. They come to your site, poke around a few files, download a PDF or two, and then — poof — disappear, leaving nothing but questions in their wake:Where did they come from? Which browsers are they using? Are they experiencing any errors?

The most thorough method of tracking users is by planting cookies, which some folks consider rude or invasive, and, oh yeah, you need to know how to program them. Not to worry — there is an option that requires very little technical know-how, comes at no (or nominal) cost, and may already be a part of your site’s backend. I’m talking about logs!

Continue Reading “Gather Users Data From Server Logs” »
File Under: Backend

Learn Enough Unix for Your Resume

On the resume that convinced Wired to hire me, I said that I knew enough about Unix that it didn’t scare me anymore. This wasn’t exactly true. Unix was still a chilling concept for me when I arrived at the San Francisco office armed with a copy of Unix for Dummies. The managing editor steered me to my desk and instead of the Macintosh I was hoping for, there sat a purple SGI machine.

I realized then that I needed to learn a lot about Unix fast. Initially I tried using SGI’s graphical user interface, which mimicked the Macintosh desktop fairly well, but soon realized that it was just too damn slow. So I stole some better Unix books from the engineering staff and found a nice Unix expert to help me. Soon I was cp-ing, mv-ing, and chmod-ing like lightning. Unix still gives me the occasional nightmare, but basically I love it. It’s fast, it makes sense (most of the time), and anyone can figure it out with a little work. Plus, it looks great on a résumé. If you can convince a prospective employer that you have a working knowledge of Unix, you’re one step ahead of everyone else who is too scared even to try figuring it out.

I’ve put together a very basic explanation of Unix to get you started. But first, a warning. Unix is very powerful. The wrong collection of keystrokes can blow away files that you’ll probably never be able to recover, so practice on sample files before you move on to anything important.

Continue Reading “Learn Enough Unix for Your Resume” »
File Under: Backend, Security

Set Up a Linux Firewall on Your Network

Go outside and pop the hood of your car. You should see a thick metal barrier at the back of the engine compartment. This is called the firewall. To see how it works, poke a small hole in the fuel line so that a tiny amount of gasoline starts dripping on the engine block. Now close the hood, start the car, and head out on the highway (Some of you may choose to save life and limb (and time!) by merely visualizing this exercise).

If you have positioned the puncture correctly, within a few minutes the escaped gasoline should ignite and cause a small engine fire. At this point you may see smoke emerge from the engine compartment. Continue driving. You should be able to proceed a considerable distance before the heat becomes uncomfortable and toxic fumes and flames start to enter the passenger compartment.

The reason you can drive so far with a flaming engine is because the firewall is a highly effective barrier between the engine compartment and the passenger compartment. If your car had no firewall, the engine fire would have already melted the dashboard electronics and plastic, destroyed the upholstery, and toasted you to a crisp.

Now. Pull over and very carefully extinguish the fire.

A similar principle can be applied to networked computers. Picture your machine as the cozy, tricked-out interior of your automobile, and the outside world as the dirty but powerful engine that makes it go. It won’t do to have the vulnerable components of your network exposed to the engine’s maliciously raging heat — it’s best to install a firewall.

Let us abandon our weakening metaphor here before it carries us into a ping-pong tournament without a paddle. A firewall, in the networking sense, is a machine that straddles the interface between a private network and the Internet at large, and follows predetermined rules for allowing certain traffic to pass, while blocking traffic that’s unwanted.

So, how to get yourself one of those disaster-averting firewalls? You can start by reading on.

Continue Reading “Set Up a Linux Firewall on Your Network” »
File Under: Backend, Programming, Software

CVS for Beginners


OK. You and ten of your closest pals have decided to work on the greatest-ever web page/Perl script/whatever. You all want to work on the same file from the same location at the same time. Then when you’re good and ready, you’ll roll out releases of the code.

Does it sound like a logistical impossibility? Well it’s not if you have the right tool — a source control system.

A good source control system is the secret behind any successful web development project. If you look at any large-scale software development project, you’ll see a source control system at work.

Continue Reading “CVS for Beginners” »
File Under: Backend

Set Up Dynamic DNS

Now that everybody* has a home broadband connection, the need for IP addresses is a growing concern. With the rollout of IPv6 still pending, IP addresses are a limited resource. ISPs are understandably reluctant to hand a static IP address to every US$50/month subscriber. Some ISPs do, and some allow you to pay extra for one. For the most part, though, they’re a bit of a pain to get.

* not everybody

This is not a problem for the majority of home broadband users. Their needs — efficient web browsing, quick downloading of large files, “always-on” service, productive hours spent on WoW or AIM — are met admirably by the service provided. Giving them a static IP address, if they even noticed, would just result in increased security headaches as their insecure Windows machines suddenly had fixed addresses, making them easier to break into.

Continue Reading “Set Up Dynamic DNS” »
File Under: Backend

Set Up a Home Server

Setting up a home server running an open-source operating system is a popular and useful activity. Useful in what ways, you may ask. You could use it to run a website, collect and send e-mail messages, store your OpenID credentials or serve your music around the home.

As you can guess, we have a great many tutorials on Webmonkey for getting the most out of that machine in your closet. But here are some guidelines for the hardware side of it.

Continue Reading “Set Up a Home Server” »