Our boat over-turned ... It was close

>> Monday, June 30, 2008

This should have been a continuation of my "Place to visit in Seattle" series, but this was much more than that.

Couple of my friends working together in the same block within MSR, decided to go on canoeing in Lake Washington. We hired canoes from UW recreation center. Me and David Koop were on the same canoe. I was bit reluctant to take my camera, but I really wanted to take a panorama shot of 520 bridge, (one of??) the longest floating bridges.

We went towards the bridge and crossed the shipping lines to go underneath the bridge. We had to face waves coming up about 3-4 feets high, but all of us managed to get through. Then we went to Arboretum and had some rest.

Since it seemed much safer, I removed my life jacket also.

Then we head back to UW rental center. Both me and David leaned towards the same side of the boat, at the same time, and that over-turned the boat. I had no option but to jumb in to the deep water, and I thought I had the life jacket, but it was not. Some how I came up and my head then hit against the boat, as David was trying to get the boat to proper side. (I think I went down once again). Some how we figured we can not turn the boat and we swimmed about 10-15 meters, pulling the boat also to the shore. At that point only I took out my camera.

My camera is still not working but we were saved (I think it was too close). I dried it, but some water seemed to be leaked in to the lenses.

These some of the last photos I took from my camera.

Panoramic view of 520 bridge

View of Mt. Rainier from with 520 bridge

View of Mt. Rainier from Lake Washington

Me and David in the unlucky canoe

The canoing gang


Places to visit in Washington State - Snoqualmie Falls

>> Saturday, June 21, 2008

Location : Snoqualmie Falls, WA

Directions : Google Maps. About 30 mins from Bellevue, WA

For GPS : 6501 Railroad Ave Se, 98065 (closest Address)

Link : http://www.snoqualmiefalls.com/

This is one of the spectacular waterfalls, I have ever seen. Due to the melting of ice these days, on the mountains, the waterfalls is full of water. I think this is one of the easiest to see, with about 100 feet walk.
But going down the trail, for about 3/4 mile, you will be able to goto the base of the waterfall.
One of the amazing things in this waterfall is that, there is a hydro-power plant at the top of the falls. And the water coming out from that plant, is going through a the rock, through a man made hole, and comes out at the base the waterfall. According to a veteran I met, this was done prior to World war II.
The beauty of the waterfall and the view of the surrounding area is great. If I were to recommend the best places to visit, Snoqualmie falls will be one of them for sure.

If you have time, don't forget to visit the factory outlets in North Bend, which is like 15 mins away.

Panoramic View of the waterfall

View of the waterfall from the top

View of the waterfall from the base


Places to visit in Washington State - Little Si Hike

Location : Little Si, North Bend, WA

Directions : Take I-90 and take exit 31. You will get in to Bendigo Blvd. Go straight till you find SE North Bend way and you wanna take a right when you meet North Bend Way. Go till you find Mount Si Road and turn left. Once you pass the bridge over Snoqualmie river, turn right and follow the directions for Little Si parking lot.

For GPS : 47.49867, -121.756228 or 434th Avenue SE and SE Mt Si Road, North Bend, WA.

Links : http://www.mountsi.com/

We went on a hike today to Little Si (North Bend, WA) with my friends in MSR. It was like 30 mins drive from Bellevue through I-90 and getting there was pretty easy.

The hike was abt 5 miles (round-trip) to about 1600 feet. I took my 22 months old kid with me, and it was hard, but was doable. It was just that my body resisted for a hard workout after a long time.
We were passing a nice forest on the way and it was nice to see all those rock climbers working hard to get to the summit. When we reached to the peak, we could see the fascinating view of Snoqualmie river and North Bend area.

Panoramic view of the cascades, from the middle of little Si

Panoramic view from the peak of Little Si

View of Mount Si and Little Si from I-90

Tough Hike, Ha ...!!

The Gang


Uploading Files with JSP

>> Tuesday, June 17, 2008

I was fed up with some of the resources available on the net to do this.

This is how I got this done.

1. Enable your html to upload files
<form action="http://www.mysite.org/fileUpload.jsp" enctype="multipart/form-data" method="post">
Please specify a file, or a set of files:

<input name="datafile" size="40" type="file">
<input value="Send" type="submit">

2. Use commons file upload

Then follow Apache commons file upload article to handle the file within your jsp. This is the code snippet to do that, extracted from commons file upload user guide.

// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);

// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory();

// Set factory constraints

// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);

// Set overall request size constraint

// Parse the request
List /* FileItem */ items = upload.parseRequest(request);
// Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();

if (!item.isFormField()) {

// Process a file upload
if (writeToFile) {
File uploadedFile = new File(...);
} else {
InputStream uploadedStream = item.getInputStream();

For more information on commons file upload, use the their user guide.
  • http://www.cs.tut.fi/~jkorpela/forms/file.html
  • http://commons.apache.org/fileupload/using.html


Multi Language Reference

I was searching for a programming language for some time, for languages other than Java.

I started using java2s.com for my C# needs and it is pretty good too. The interesting thing with that is, it has code snippets for other languages as well. Pretty neat for me.


Top Papers on Distributed Systems

I wanted to list some of the pioneering and important papers on distributed systems, but I kept forgetting to do that.
Most people only use some books to teach/learn distributed systems, but I feel these papers really captures the essence of the field. I strongly recommend to anyone in this field to read these papers and feel free to suggest other relevant papers.
(Thanks to Professor Beth Plale for selecting these great papers for our distributed systems course. )

"Time, Clocks, and the Ordering of Events in a Distributed System", L. Lamport, Communications of the ACM, 21, 7, pgs. 558-565, July 1978.

End-to-End Arguments in System Design, J.H. Saltzer, D.P. Reed, and D.D. Clark, ACM Transactions on Computer Systems, Vol. 2, No. 4, Nov 1984

"Myths around Web Services", G. Alonso, Data Engineering, vol 25, no. 4, December 2002

"A Note on Distributed Computing", Jim Waldo, Geoff Wyant, Ann Wollrath, and Sam Kendall, Sun Microsystems Laboratories Technical Report TR-94-29, November 1994

Scale in Distributed Systems, B. Clifford Neuman, Readings in Distributed Computing Systems, IEEE Computer Society Press, 1994

The Google File System, Proceedings of 18th Annual ACM Symposium on Operating Systems Principles. October 2003

"NFS Sensitivity to High Performance Networks", Richard P. Martin and David E. Culler, ACM SIGMETRICS, 1999

Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications, Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan, ACM SIGCOMM, 2001