Wednesday, December 30, 2009

What is the web service language/framework Barbara Liskov mentioned

In her talk titled "The Power Of Abstraction" given in OOPSLA2009, Barbara Liskov mentioned that she started to learn web services programming, and the language or framework she used has many global variables. I really wonder what she was using.

The talk is good and especially reveals the history of development of abstract data type by the list of influential papers.

Friday, December 11, 2009

Zero copy for Java HTTP file server

This makes it impossible for normal Java-based HTTP service to take the advantage of zero copy.

in reference to:

"It is not possible to create a channel for an arbitrary, pre-existing socket, nor is it possible to specify the SocketImpl object to be used by a socket associated with a socket channel."
- SocketChannel (Java 2 Platform SE 5.0) (view on Google Sidewiki)

Friday, December 4, 2009

Free DNS servers

Maybe some ISP's like this. The last time I tried to find a free DNS is two years ago when the ISP DNS was down. I like the ip they choose, easy to remember.

Maybe DNS is the first place that browsing statistic can be collected.

in reference to:

"To try it out: Configure your network settings to use the IP addresses 8.8.8.8 and 8.8.4.4 as your DNS servers or Read our configuration instructions."
- Google Public DNS (view on Google Sidewiki)

Friday, November 27, 2009

Rich Hickey on function, time, and process

All the concurrency and timing puzzles suddenly become reasonable after listening to his talk titled "Are we there yet". I borrowed the book of "Process and Reality" from the library, and started to learn Whitehead's system.

If you do multithreading programming, or play with JavaScript and XHR, or like Erlnag, Clojure, or Scala, then you would perhaps enjoy his talk.

Wednesday, September 30, 2009

/bin/perl^M: bad interpreter

After digging for a while, it turns out the cause is the perl interpreter on Linux cannot recognize the end of line character CRLF in windows files. What it expects is LF.

Using EOL as end of statement is not system independent.

Wednesday, September 16, 2009

Slides for TRLab Erlang workshop

These are the slides I prepared for the last session of the workshop.

Friday, May 15, 2009

Ubuntu 9.04 on Dell Optiplex 760

The issue was reported as Bug #348694.

I experienced the same problems reported there. When installing from liveCD, during the first stage you have to push the power switch to generate interruptions until the keyboard is on. Then you can start to strike a key. When the mouse is on, you can move mouse to keep the system awake. I am not sure if there is way to keep the mouse always busy in that way you will save time for installation.

The next day morning, you will find installation is finished, and you need to restart. Then you need to set the kernel options when the grub screen is on.
  • hpet=disable helps, but does not solve the problem.
  • acpi=off solve the problem, but you will lose a CPU.
  • acpi_skip_timer_override is the best solution.
Update: Dell has released a bios fix available here http://ftp.us.dell.com/bios/O760-A03.EXE
You need to have windows system installed to fix though.

Friday, March 13, 2009

Google search is the biggest server-side mashup

Each search result page is a mashup of multiple pages, their snapshots, and possibly different representations. Of course, some contents are old, but some "important" pages are refreshed constantly in Google's index. Now they even add features like SearchWiki to personalize it. Maybe people will like the idea of SearchWiki more and more. In fact, we have used a personal mashup for a long time --- the Google Reader.

Monday, February 23, 2009

HP printer on Ubuntu 8.10

The lessons I learned by trial and error about my Laserjet 1020.
  1. foo2zjs works sometimes, but will have problem when CUPS is updated.
  2. HPLIP always works if you install the latest version, not the one in repository.

Friday, February 20, 2009

A page about the wide finder

I have published the page of wide finder, which was created for a group discussion on Erlang.

The problem of wide finder was coined by Tim Bray, and is summarized in http://www.tbray.org/ongoing/When/200x/2007/09/20/Wide-Finder

The task is to read an Apache logfile and figure out which pages have been fetched the most.

The reference Ruby code

# 11 lines

counts = {}
counts.default = 0
ARGF.each_line do |line|
if line =~ %r{GET /ongoing/When/\d\d\dx/(\d\d\d\d/\d\d/\d\d/[^ .]+) }
counts[$1] += 1
end
end
keys_by_count = counts.keys.sort { |a, b| counts[b] <=> counts[a] }
keys_by_count[0 .. 9].each do |key|
puts "#{counts[key]}: #{key}"
end

Bray's original idea was to check if Erlang is good option for this problem on multi-core platforms.
Read more ...

Friday, January 9, 2009

The reverse C10K problem

The original C10K problem studies how to provide reasonable service to 10,000 simultaneous clients or HTTP requests using a normal web server. I call the following problem the reverse C10K problem, or RC10K --- how to support 10,000 simultaneous outbound HTTP requests running on a web server. The RC10K problem can be found in scenarios like service orchestrations and server-side mashups. A server-side mashup needs to send several simultaneous HTTP requests to partner services for each inbound request.

Many approaches to improving the performance and scalability of HTTP servers can be applied to tackle the original C10K problem. However, whether these approaches can tackle the reverse C10K problem needs to be verified. My recent paper discussed the RC10K problem, and presented some experiment results got from a prototype mashup server application.