The
Ultimate
Business Machine

Technology, business
and innovation.

And, not least, about
the Mac.

Weblog Archive Cutedge

by: Bernard Teo








Creative Commons License

Copyright © 2003-2012
Bernard Teo
Some Rights Reserved.

Sun 03 Apr 2005

The Weightless World

Category : Commentary/weightlessWorld.txt

Looking through the log files, with my new-found ability to decipher which country the hits are from, in the last two hours, Postfix Enabler has been downloaded by people in Japan, Sweden, France, United States, Canada, and Spain.

These bits are flying all over the place. If only I could do that myself - de-materialise, shoot through the ether, and re-appear at the other end in seconds. That would be a great way to fly.

Posted at 3:59PM UTC | permalink

WebServer Monitor 1.0.6

Category : Technology/WebServerMonitor106.txt

I love the way the Mac OS X Cocoa API's work. It has, what I call, expressive power. You could think of an idea and find the constructs in Cocoa to express them and make them come alive, and it doesn't fight you or make you go through hoops. It's great.

I'm now just one step away from being able to do customisable log formats (if I can figure out how the interface should work). And being able to allow the user to set up the webserver, the way Postfix Enabler allows you to set up mail services.

Setting up PHP would be trivial. But setting up WebDav - that will allow you to use the webserver to store and share your iCal calendars, and from there, you'll start to see how all these little elements start to work in concert.

This 1.0.6 release will pave the way because it will give me the framework to turn features on or off the webserver in an orderly way, again much like Postfix Enabler.

This release also brings you, in conformance to the Apache "combined" log format that I'm adopting, the ability to track virtual hosts, traffic in the form of bytes served, status of hits (success or re-direct or page not found), as well as the ability to show or hide columns selectively.

You can download it now and use it while I figure out how to do the interface for customising the log format (among other things).

It'll still only read the log records from /var/log/httpd/access_log, though. Sorry, but if I solve this, I may be encouraged to think further about how to read the log records from anywhere else.

One more thing, WebServer Monitor will show only the records that have come in since you updated it to track the new log format (essentially the "NCSA extended/combined log format" with the addition of the virtual host field - "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %v". For the ones that came before, it will (should) politely ignore them.

What's next - provide a way to filter by virtual hosts, and by page views (rather than page hits), and to show only the downloads. And the customisable log format stuff. And who knows? Stats and graphs - once I've learned how to draw graphs with Cocoa. Or figure out a way to accept plug-ins, so other people can supply the graphs.

Joe Mullins sent over some suggestions, including a mock up of how it all might work. Thanks. Step by step. I'll try to get there.

Posted at 3:33PM UTC | permalink

Tue 29 Mar 2005

WebServer Monitor 1.0.5 - New Features

Category : Technology/WebServerMonitor105.txt

The Search Field remembers your most recent searches. You can now double-click on a log record line to launch the web page of a referrer. And, there's a new Country Field when you look at a log detail. (Download 1.0.5 from here).

I've always wanted to be able to do this - thanks to Hai Hwee who supplied me with the SQLite Cocoa framework to store the country data in.

The user I have in mind is one who's just bought a Mac mini, say, to use as a server, and he turns on Remote Login at the Mac mini, and then uses some of the stuff that I'm writing now, running them on an iBook, remotely, to turn on a variety of services at the server.

I'm assuming that he doesn't know how to do any custom configuration, and that he doesn't care about Apache httpd.conf files, etc. In fact, that's better for me because it gives me a predictable target to aim my code at.

I'm trying to take that user through the shortest possible route towards using that server as a foundation for running his business. For building the ultimate business machine.

From my experience with both Postfix and Sendmail Enablers, I've come to the conclusion that it's impossible to work around all the modifications that people could possibly make to their config files. So I'm going to assume that the code is running on a freshly installed un-(hand)-modified Mac. That's the tradeoff that one has to accept. Otherwise, roll your own.

Posted at 3:59PM UTC | permalink

Fri 25 Mar 2005

Oops. Forgot to turn off ZeroLink

Category : Commentary/zeroLink.txt

If you've downloaded the latest WebServer Monitor 1.0.4 and it wouldn't launch, please download it again. I forgot to switch to the Deployment build in Xcode and so the version you downloaded will refuse to launch. Sorry. More haste, less whatever.

Posted at 9:50AM UTC | permalink

WebServer Monitor 1.0.4

Category : Technology/WebServerMonitor104.txt

It's been bumped up another notch. You can download it from here.

While using it, I realised I wanted to "hold on" to the current log record line, when I'm re-sorting the columns or when I'm doing a search. I find it especially useful to be able to mark a log record after I've done a search, and then hold on to it, when I clear the search field, so that I can see it in the context of other activity that happened around the time that page got hit.

For example, I did a search for ".zip" and noticed a download of DNS Enabler, and I want to know how that particular user got to that page - e.g., was it through Google or what? And did he/she go anywhere else?

This seems like a key step. You need to know what people want in order to keep up your end of the dialogue - if marketplaces are like conversations, as someone said.

Actually, this is a little piece of software but it fits within a larger scheme of things. I was re-reading a couple of articles I had written on the right ("How Businesses Could Use Macs" and "A Mac Business Toolbox") and they're written two years ago, like they're "Bernard's Manifesto", but the pieces are starting to come together now.

Posted at 8:56AM UTC | permalink

Thu 24 Mar 2005

WebServer Monitor 1.0.3

Category : Technology/WebServerMonitor103.txt

I've added a search field to WebServer Monitor. (Download? Click here.) I'll keep changing the interface while I figure out what I want to add to it, but this is what it looks like now :

I'm surprised Sendmail Enabler is still being downloaded. And I've never really known how many times people are downloading Postfix Enabler, or any of the other stuff, each day. Now I know.

Posted at 5:34PM UTC | permalink

Wed 23 Mar 2005

Brendan at Five

Category : Commentary/brendanAtFive.txt

Our kid's five today. He figures in these pages because he's the reason why I'm doing the things I'm doing these days. We used to work six or seven-day weeks, my wife and I, but we've had to change the way we lived ever since he arrived.

I've mentioned Michael Gerber's "The E-Myth Revisited" a few times in these pages. I've lived through the horrors that many entrepreneurs go through and on Brendan's second birthday, I decided that there must be a better way. Otherwise, I wouldn't be around to watch him grow.

I talked to a friend the other day, who's running his own company, and he often sleeps over at his office. And so nothing has changed. If you don't make your business work like a machine, you're going to run yourself into the ground.

So these pages are a chronicle of my journey to build a business machine of my own. It could be a business that helps other people build business machines of their own, through the systems that I can design, the software that I can write, or the ideas that I can share. Or it could be that we finally found a business that we can run, using the systems that we've built ourselves.

Whatever it is, I'm still finding my way there.

You know those Rich Dad, Poor Dad books? Don't laugh at them. There's power in some of those ideas. If I had known at 20 the things that I understand now, I would be where I want to be a lot sooner than I have - and that is to live a life of some leisure so that I can work like a demon on the things that interest me.

Rich Dad? Poor Dad? I guess I should just aim to be a good dad, after all.

Posted at 2:49PM UTC | permalink

WebServer Monitor 1.0.2

Category : Technology/WebServerMonitor102.txt

OK, release 1.0.2 of WebServer Monitor is up for download. You can now sort the columns, rearrange the column order any way you want, and when you export the log records out (in comma-separated-values format now and possibly tab-delimited and what else later), it'll open up in, say Excel, in the exact same order you have on your log window.

Cocoa programming is really so much fun. I like the way a lot of its power remains hidden and unobstrusive and you can just reach out and use them and put them away when you're done.

I'm going to re-do some of the things using Cocoa Bindings now and see if I can add in a search field.

Throw away your 4th Dimension, FileMaker Pro, Real or Visual Basic. Cocoa is it.

Posted at 12:33PM UTC | permalink

Sun 20 Mar 2005

On the cusp of ...

Category : Commentary/cusp.txt

Cusp - NOUN. 1. A point or pointed end. 2. Anatomy a. A pointed or rounded projection on the chewing surface of a tooth. b. A triangular fold or flap of a heart valve. 3. Mathematics A point at which a curve crosses itself and at which the two tangents to the curve coincide. 4. Architecture The point of intersection of two ornamental arcs or curves, such as the inner points of a trefoil. 5. Astronomy Either point of a crescent moon. 6. A transitional point or time, as between two astrological signs.

Already, there have been a few downloads of WebServer Monitor. I hope they're all doing fine.

Actually, it's a really simple (and, maybe, limited) application but it represents a few opportunities.

For a long time, I was hoping to be able to configure my server remotely, through the Remote Login/SSH secure shell mechanism (and a Mac-like interface), but in such way that the same code will work whether I'm doing something remotely or working locally on localhost.

So, WebServer Monitor is actually a technology demonstration - that the idea can work - you use the same application to configure a server locally, as well as remotely (where the application runs on a remote roving machine).

Actually that's how it works with the Admin application on OS X Server but I'm not sure how they did it - the important thing to me is that I know how to do it myself, too.

Now, this opens up a few opportunities. One, WebServer Monitor can be improved no end - provide log analysis, graphs, real-time monitoring of the activity, etc. I'm sure I will get suggestions soon.

Also, now that we can do something to the Apache config file remotely via the user fiddling with a graphical interface, why not do more? Turn on PHP, virtual hosting, WebDav, etc...

Why stop with Apache? Do DNS, Mail, the whole ISP-in-a-box idea. I'm thinking about the Mac Mini. Once you've turned on Remote Login in the Sharing Preferences, you may never need to touch that machine anymore. You can do everything from a Mac-like interface remotely. Make it dead easy for a normal human being.

I come back to the Ultimate Business Machine idea - the Mac Mini as the Ultimate Business Machine - one that a small business can base their complete operations on.

So, we may be on the cusp of great things ...

Posted at 4:35PM UTC | permalink

WebServer Monitor

Category : Technology/WebServerMonitor.txt

I've been using this for about two years. I built this, in AppleScript Studio, even before I built Sendmail Enabler, and way before Postfix Enabler.

I've been using it to monitor my web server log (i.e., the Apache log file) remotely from wherever I happen to be. It's been quite useful, knowing which pages people find useful on my site, as well as all the places that happen to refer to something that I've written.

But I've never released it because it was slow (if you're trying to load in more than 3000 lines of server log records using AppleScript Studio). And, also, because I think it'll bring me even more queries than I have time to answer, e.g., in order to use this, you'll have to know how to set up an auto SSH (Remote Login) connection on the command line first. Even though you only have to do it just once, it's really too difficult to explain.

But, now, I think I've solved it. Both questions. Firstly, I've re-written it in Objective-C and it's fast enough to load in, say, 10000 lines of log records reasonably quickly.

Then I've also, finally, found the time to write a utility that will help a user set up the SSH (which means Secure Shell) connection from whatever machine (an iBook, say) he wants to use to monitor his server from - with just one click and without knowing any Unix. All he needs to provide is his password for the administrator account on his server machine.

He does this in the Preferences Window in WebServer Monitor, which appears automatically when the program launches, if an SSH connection to a server machine is not yet set up :

As shown, in the picture above, you can set up a Remote Login connection to your server machine from your roving iBook, with just one click.

Once you're done, you can do one more thing from your iBook - set up the server's Apache log file so that it'll report referrer information (i.e., the pages that refer to pages on your web site). The Apache log file is not set up that way, by default, but you can change it.

With the WebServer Monitor set up to show the referrers' URLs, you're just one click away from knowing how your pages have been referred to from elsewhere :

This is one of the fun things about looking up your referrers. You never know what might turn up. For example, that referrer URL above will lead me to :

Have fun, using WebServer Monitor. You can download it from here, right now.

A couple more things. One, you can open up more than one window and get the server logs from more than one site, so long as you have a Remote Login connection set up to each of these servers.

To access the server log on the local machine, just enter "localhost" as the server.

Also, like true document-based Cocoa applications, you can save each log file and open them again later, just by double-clicking on them. That'll launch WebServer Monitor. No icons, as yet. There are lots more things we can do with this, once we've managed to get ourselves up to here.

Posted at 3:37PM UTC | permalink

WWDC

Category : Technology/wwdc2005.txt

Leon Chen at Apple WWDR (Developer Relations) asked me if I would have any problems putting this up on my web page.

Unfortunately, I won't be able to go. Have a great time, those who are going.

Posted at 12:01PM UTC | permalink

Thu 10 Mar 2005

Macs in Labs

Category : Technology/MacLab.txt

I'm still thinking about that Makmal 10 Mac Lab. It was originally meant for conducting multimedia courses.

But you could use the machines to teach the Unix stuff. Like teaching students about how mail servers work - by downloading the pieces and compiling from source, where the binaries need to go, and how the config files need to be set up. I know I've learnt a lot about Internet technology by tracing the pieces this way.

There's so much good stuff going on in the Open Source world. This is the best time to learn - on a Unix machine that's also so easy to set up, tear down, and pull apart, from a software point of view, that is.

I can visualise the process. For example, you can learn how SQL databases work by starting on a smaller project like SQLite, reading the code, and then moving on to something heavier, like MySQL.

Same for JDBC drivers. You can read the code and learn so much. Plus, DNS, BIND, Apache, PHP, SSL, etc.

You can make the training materials on the Mac, too. Keynote slides, and InDesign-produced manuals and workbooks, all exported to PDF, with hot-links to the relevant URL's for background information, and code snippets all ready to be copied and pasted into software development projects.

And you can use Apple Remote Desktop for administering the machines. And Unix scripts to keep all the machines synchronised, in terms of materials.

And organise the students into projects - to write code that will eventually be used to run and administer the training program - on-line access to academic schedules, calendaring systems, room bookings, course registrations, feedback forms, etc. - a totally paperless workflow. Because we ourselves (me and Hai Hwee) have done all that.

Better still - you can get the graphic artists and the programming geeks to pair up and work together on projects - to build systems that are nice to look at, nice to touch, yet work like a well-oiled machine.

You know, you can do a lot with all those Macs sitting in that lab. I know that I already have a lot of fun just thinking about designing just such a curriculum.

Posted at 3:28PM UTC | permalink

Read more ...

Mac@Work
Put your Mac to Work

Sivasothi.com? Now how would you do something like that?

Weblogs. Download and start a weblog of your own.

A Mac Business Toolbox
A survey of the possibilities

A Business Scenario
How we could use Macs in businesses

VPN Enabler for Mavericks

MailServe for Mavericks

DNS Enabler for Mavericks

DNS Agent for Mavericks

WebMon for Mavericks

Luca for Mavericks

Liya for Mountain Lion & Mavericks

Postfix Enabler for Tiger and Panther

Sendmail Enabler for Jaguar

Services running on this server, a Mac Mini running Mac OS X 10.9.2 Mavericks:

  • Apache 2 Web Server
  • Postfix Mail Server
  • Dovecot IMAP Server
  • Fetchmail
  • SpamBayes Spam Filter
  • Procmail
  • BIND DNS Server
  • DNS Agent
  • WebDAV Server
  • VPN Server
  • PHP-based weblog
  • MySQL database
  • PostgreSQL database

all set up using MailServe, WebMon, DNS Enabler, DNS Agent, VPN Enabler, Liya and our SQL installers, all on Mavericks.