status 0913.2005: mostly accurate. however, this isn't much of a lesson, more of a broad description of the cornerhost control panel.
Michal Wallace Thu, 9 May 2002 03:23:26 -0400 (Eastern Daylight Time)I changed my mind. Instead of talking theory for the first ten lessons, let's start with a real app.
My current project is a control panel for cornerhost. The idea is to give customers more power over their accounts, and cut back on the number of routine support tasks I have to handle personally.
I'll try to focus on the technology and the development process, and gloss over the control-panel-specific details. Still, it's important to know where you're going, so let's talk a bit about how the app will be laid out.
When I build a web app, it usually has several tiers:
Sometimes, you have more or fewer tiers, so it's called n-tier for short. Here are two things to remember about n-tier applications:
It's often extra work to follow these principles, but if I ignore them (eg, writing a quick script with everything in one file) I almost always have to go back and clean up.
The control panel, we'll be dealing with each of these tiers. We'll look at each in detail later. For now, let's consider the requirements.
I like to design my apps up front, so I know where I'm going, but I also know that as I work, I'll keep coming up with better and better ideas. So I'm happy with a rough design.
Basically, I want to know:
Whatever answers we come up with, we'll probably be wrong about some things. That's okay. If we're good, we'll make sure our software is easy to change as we go along. That means we can get started with a very rough idea.
So.. On to our two questions.
I'll probably add to this list eventually, but here are the most important features of the control panel. (They're most important because they're the most common requests I get):
Finally, I want it centralized. In other words, there's one control panel and it manages accounts all the hosting machines. So we'll also need a secure way to communicate with those machines.
The front end of the control panel will be your basic web app. There will be a login page, and several forms that ultimately control records in a database.
That's the easy part, and using python and a good web framework, it's less work than you might think.
Then there's some scripts that generate configuration files for the web, DNS, and email servers. I've already done a lot of the work here: I've been tweaking my command-line python tools for the past few months.
Since these scripts require restarting various long-running programs (like web and email servers), it's important to make sure that changes are queued up and done in batches. This will require some sort of periodic scheduler.
Finally, to communicate between the control panel and the actual servers, I plan to use a custom XML-RPC server on each machine. (Again, python makes it easy.)
As far as software specs go, this was pretty painless. Still, it's enough to get started. In the next lesson, start writing code.