Archive for the 'Mac' Category

MudTyper 2.0

Sunday, January 10th, 2010

Like I mentioned earlier, Village 2.0 features the all new MudTyper Version 2. MudTyper 2 has two components: MudTyper Server, a light weight Cocoa HTTP server and MudTyper Renderer, the font renderer. On the Village website, MudTyper is integrated behind the rails application.

The Architecture

An overview of the architecture is shown below:

mudtyper-diagram

A POST request from the browser is sent to a Rails Metal URL periodically (as opposed to responding to keystroke events). The Rails Metal method verifies sessions, and request parameters and forwards them over to the MudTyper Server. The MudTyper Server then sends a request to MudTyper Renderer to create either a file that is saved to disk or a base64 encoded string depending on the user’s browser. The browser receives the image as a response and includes the rendered image into the page.

Scalability

With this architecture, it is possible to scale for increased load. We can run multiple instances of MudTyper Server+Renderer, and use mod_proxy to get Apache to handle the load balancing.

Font Rendering

The new Renderer adds a lot of new support, including support for OpenType fonts with full kerning support, as well as many OTF features. For instance, we can now render Galaxie Cassiopeia’s contextual alternates, adding smooth transitions between letters.

Logic Board replacement and Time Machine

Monday, March 30th, 2009

I recently sent my MacBook Pro to the Apple Store for repair, and it came back all fixed up. A new display for the backlight banding problem, a new top case for a failing keyboard and a new logic board for replacing the nvidia card. I have a Lacie 2Big Triple that I use as a Time Machine backup for this computer, but I realized the backups kept failing.

Time Machine apparently uses your MAC address to keep track of which machine your backup corresponds to. So of course if you get your logic board replaced, you’ll have a new MAC address and Time Machine will think this is a different computer.

I did some google searching, but this method did not work for me. I had to combine this other method to make it all work. Anyway, here’s the list of what you have to do. First, make sure you go into System Preferences and turn off Time Machine. Then fire up the Terminal and run:


$ cd /Volumes/NameOfTMDrive/Backups.backupdb
$ xattr -p com.apple.backupd.BackupMachineAddress NameOfMac

This should spit out your old MAC address. In the backup drive, you will have a hidden file with the values of this MAC address. Now, look up your new MAC address with:


$ ifconfig en0

Write the new MAC address down. What you will now do is rename the hidden file from the old MAC address to the new one, then tell backupd your new MAC address. In this example, your old MAC address is aa:bb:cc:dd:ee:ff and new address is 00:11:22:33:44:55, and your computer name is My Computer. We also turn off ACL and turn it back on after we make the changes.


$ sudo fsaclctl -p /Volumes/NameOfTMDrive -d
$ cd /Volumes/NameOfTMDrive
$ sudo mv .aabbccddeeff .001122334455
$ cd /Volumes/NameOfTMDrive/Backups.backupdb
$ sudo xattr -w com.apple.backupd.BackupMachineAddress 00:11:22:33:44:55 "My Computer"
$ sudo fsaclctl -p /Volumes/NameOfTMDrive -e

Now, you just need to remove your drive, then remount it. Go into Time Machine, and turn your backup back on. This will start indexing your drive again and for a long while, it will say “preparing…” It took my computer about 20mins to complete the initial backup. If it begins creating a new backup with “My Computer 2″ you did something wrong because it’s starting a new backup.

Apple should probably make this easier since I’m sure a lot of people are going to have their nvidia cards replaced.