Nov 132009
 

I’ve deployed Cassandra to my development environment, running on 4 servers with replica 2. I picked the number 4 and 2 because it’s more like a real world thing, and it is the requirement from my friend. I can test fail-over etc later on.

I’ve also composed some scripts to do service stuffs – the script I composed can start/stop/restart Cassandra gracefully, it can also tell status of the node and the cluster, it’s a simple Shell script, I will make it a service under Fedora, and a init.d script under Ubuntu (I’m running only these two platform now). Cassandra was upgrade from 0.4.1 to 0.4.2 days ago, and I used that as a chance to test my deployment stuffs, seems pretty good. I think I just need to be careful with 0.4.x => 0.5.x upgrade since it may break compatibility on configuration and command line.

I’ve converted my PowerBook to a dedicated client machine running Fedora … it’s a pretty old machine and seems Apple does not want to roll out new software (such as JDK 1.6) for it, so I did some survey around and picked Fedora (Ubuntu is not ppc friendly – the support is community based).

And finally I have Thrift/PHP up and running. At the very beginning I was thinking I should use Java as the client but later one found that I have no idea how to develop Java based web application, and since Thrift mentioned it supports all C/C++, Java, Perl, PHP, Ruby, Python pretty well, I should just pick my favorite language to do the test and then let real clients pick what theyย  want to use (where is my client, BTW? ๐Ÿ™ ).

And yes, I confirmed the schema (though Cassandra is schema-less thing), I’m going to test the schema with PHP client today. After that I will have to find a place to hold all my codes/configuration, etc, in a subversion, and based on what I found so far, github.com is the best candidate.

Will update here today or tomorrow.

Oct 282009
 

Seems the PowerBook is the last Unix system that does not have the right uid for myself, but obviously changing uid is totally different from Linux/FreeBSD.

Here is the source and it tells using dscl, and found dscl can do almost all user/group management, and could be more, but I don’t need more :P.

 Posted by at 21:37  Tagged with: ,
Aug 172009
 

Some guy showed me how to use GarageBand to create fancy music thing during a open house event of a piano school, it was pretty impressive and he told me the software is free from Mac, so I decided to give it a try.

Pity once I got home, after checking the PowerBook (but it’s running the latest Leopard), I found no GarageBand at all. It seems it’s part of iLife, which is not free – It could be free for new Mac buyers but obviously I’m not.

Then someone post a review on Apple’s new Snow Leopard, there are only two things I got from the article – 64-bit support, and office usage. I don’t think my old PowerBook qualifies to either of them, so most likely it will run current Leopard forever.

May 232009
 

Finished HelloWorld with Objective-C on Mac using Xcode, everything seems fine, though I know hello world is always simple and easy.

It seems to me Objective-C is something similar to smalltalk, but I’m not quite sure as I’m not familiar with smalltalk either. Anyway the syntax is sort of weird to me, as it does not like a procedure/function oriented language, but more like a functional one.

I will keep play with Xcode for sometime during this long weekend, and back to my PPCam (Ada on Windows using GNAT) next week – again, it is not just as simple as hello world, get to spend more time to get things done.

May 212009
 

I don’t quite understand application types under Mac (OS X), I remember I stopped trying out XCode just because I cannot determine which one to use, and I also made wrong assumption that Java is the way to go as I can share (some) source codes cross platforms.

Now I got a book talking about how to build Mac applications with XCode, and it clearly stated:

For Carbon:

The Carbon template defines a pure Carbon application. Carbon is the C interfaces to Aqua and the legacy support for applications written using the APIs in Mac OS 9 and earlier. Use this template if you are porting an application from OS 9 to OS X, or you want to create native applications using only C or C++. The main.c file includes a skeletal application that loads the main.nib file, creates the application’s window, and starts the main event loop. See http://developer.apple.com/carbon/ for more information about Carbon applications.

For Java/Cocoa:

Mac OS X includes an extensive bridge between the Java programming language and the Objective-C APIs defined in the Cocoa framework. These Java proxy objects make it possible to use most of the Cocoa and Foundation frameworks as though they had been written in Java. If you need to create a native Cocoa application and prefer, or require, the Java programming language, create a Cocoa-Java application. The template sets up a Cocoa application whose native executable is the Cocoa-Java stub. This stub application creates a Java runtime, that loads and starts the Java classes which constitute the application. Read more about mixing Java and Cocoa at http://developer.apple.com/documentation/Cocoa/Java-date.html. Apple has recently announced that it will no longer be updating in the Cocoa-Java bridge beyond Mac OS X 10.3, so the future of this technology is murky.

For Cocoa:

Cocoa is the preferred application development technology for Mac OS X. It is based on the Objective-C programming language. The Cocoa framework is the Objective-C interfaces to Aqua and most other Apple technologies. If OS X has a “native” development environment, Objective-C and Cocoa are it. A few technologies are only available using Cocoa interfaces. The Cocoa template creates a minimal Cocoa application. The only functional part of the project is the main.m file which does nothing but create and start the generic NSApplication object. It does provide generic handling of the About This Program menu item, but it does not include a Credits.rtf file.

From three paragraphs above, it is clearly Java is NOT the way to go, it will be dropped by Apple sometime in the future, also Carbon is for legacy applications.

So, the right way is indeed doing Cocoa application with Objective-C, I get to read around to see if I can get some tests done.

I’ve upgraded my PowerBook months back with latest OS X (Leopard), plus makek it 2G memory, so that I’ve been able to install XCode, however, the machine had been idle since the upgrade, I should do something so not to waste my money (I have enough time now, not using my time is just a waste).

May 182009
 

Got this site from co-worker, pretty good. Now I need to test the speed of connecting from China, and once it works I will install it on my parents’ computer so that I can help checking their computer problems once there is any.

Better than remote desktop or VNC, as it does not need port forwarding nor firewall holes.