{ Make this readable }

Wednesday, July 30, 2014

Summer tech reading (things that I thought were worth sharing)

  Some system and Java concurrency stuff:
 Profilers, Java safe points and related topics:
Lambas, closures, Java 8 Streams and some Scala "love":
Some miscellaneous but interesting stuff:
Things I didn't know about that was available in Bash - traps, logger, paste etc:
Until next time!

Sunday, July 13, 2014

Portland - Columbia River Gorge - Mt Hood - Mt St Helens - Mt Rainier trip

Our July 4th trip to Portland and nearby places.

Multnomah falls:

Sunset over Columbia river:

 Mt Hood:

Mt St. Helens:

Mt Rainier:

Until next time!

Sunday, June 01, 2014

Memorial day trip to Sequoia and Yosemite

We did a 3 day, last minute trip to what is very likely the most popular "long weekend destination" in California. Consequently, we spent most of our time in bumper to bumper traffic both outside and inside (!) the national parks. When we were not stuck in traffic, we were going round in circles looking for a place to park.

In spite of all that, it was 3 days well spent, out in the open (at least the times when we were not in the car)

The next time we do this, we decided that the only way to enjoy Sequoia is to camp by the river, just sit back and relax. This means planning and booking campsites. This time we didn't plan in advance and we also missed visiting Moro Rock and Crystal Cave (which I'd done in a previous trip).

If you don't go camping and are just visiting, remember to carry lunch with you. The delis/restaurants are at one end of the main road. If you don't carry something with you, it'll be late afternoon by the time you reach the visitor area that has the deli, which is near the river campsite.

Also, if you like Thai food, don't miss dining at this little restaurant called Thai Basil in Visalia. The food is excellent and beats any South Bay Thai place hands down.

General Sherman:

Now, Yosemite requires one long, multi-day trip or multiple short trips. We did neither and chose the worst time to visit, which is any long weekend. It looked like the whole of Silicon Valley was in Yosemite Valley.

Again, remember to carry lunch with you. It gives you the freedom to pull out of traffic at Bridal Veil falls or Cathedral Beach and enjoy lunch instead of waiting in traffic. The only place to buy lunch in the park is in the Yosemite Lodge area or Curry Village. And both places have mostly pizza and not much else.

If you go during Summer/late Spring, remember to carry mosquito repellant (ouch!). Very useful if you want to hang out near streams and Mirror Lake (Why would you not?).

We also spotted a mama bear with cub just outside Yosemite. The photo is not very clear though.

Until next time!

The month of May's misc tech reading (note to self: title too officious)

Java stuff I found interesting last month: 

Misc distributed systems and other clever stuff:
A quick nod to better documentation:
Until next time!

Tuesday, April 08, 2014

April tech reading

Here's a bunch of stuff I found to be of some interest and relevance. Happy reading!
An Apache HTTP client "bug"/weirdness I ran into recently, which would end up consuming a large number of ephemeral ports (client side) instead or reusing connections - fix description. The ports would end up waiting in TCP_WAIT state for a long time and the client would eventually stop, unable to make any new requests.

Big data stuff. Naturally, any list is incomplete without big data: 
IntelliJ 13.1 and Git weirdness:
Random, clever tech stuff:
Until next time!

Wednesday, January 29, 2014

This month's good tech reading

(Many of these links I discovered in my Google+, Twitter, HN or RSS feeds. I don't take credit to be the first to find them)

Until next time!

Sunday, January 19, 2014

Rsync in Java - a quick (and partial) hack

Over the years I've been (mildly) fascinated by how various version control tools and file backup utilities work. Especially the core algorithm that drives many of these file send/diff/backup/de-duplication programs.

Rsync being the most widely used tools and the basis for many extensions, I naturally tried to wrap my head around it's working. But I thought the details were somewhat hazy. Maybe it was just me but I was looking for a simpler, clearer implementation of the algorithm and not a fully functioning program.

Recently, I gave it another shot. I waded through some of the material available on the interwebs and bravely set out to implement it to see how much of I had understood.

So, here is the basic implementation in Java. It may not be a faithful implementation of the paper but the gist is:

  • Create a summary out of fixed blocks of input text (original)
  • Use these blocks as reference against another text (modified)
    • This modified text is slightly different from the original text
    • Hence the assumption that the original text can be transformed to the modified text without having to send the entire modified text back
  • The modified text can now be transformed into a combination of:
    • References to those original blocks where there were no changes
    • And any differences as simple text
The code is available here and the same is embedded at the bottom of this post.

Some notes on the implementation:
  • It only handles Java Strings
  • It uses a combination of Rabin-Karp rolling hash for quick, incremental hashing of blocks and CRC32 for hash conflict resolution. In reality a much more robust hash should be used instead of CRC32
  • It assumes that the list of generated "blocks" is available on the other side to generate the patch. In reality there has to be a more clearly defined mechanism/protocol to exchange these blocks
  • The overall algorithm to identify common/repeating hashes should be smarted than this
Until next time!