Friday, March 27, 2015

Mongoose value defaulting

Pretty neat way of defaulting object values in mongoose. Say you want to have a default proximity uuid assigned to one of your documents. Simply enclose this in a type and default definition like the one below. Added bonus of being quite readable as well.

beaconProximityUUID: {type: String, default: BEACON_PROXIMITY_UUID}

Saturday, February 21, 2015

Synology DS1513+

Synology DS1513+

Been researching on a good backup solution for the home to keep up mostly with the photos we snap from time to time. Am currently using a WD MyBook thats about to be full.

Yeoman and the Angular Fullstack Generator

If you have not heard of this yet and you are developing Angular JS applications, now is the time to take it for a spin

This single-handedly takes the sting out of developing javascript web applications generating the boiler plate code required to have something up in running in literally a couple of minutes. You get a Bootstrap, a Passport.js backed authentication layer, a mongoose framework for your mongodb data store and the pre-requisite glues for your angular and node to talk to each other.

Wednesday, October 08, 2014

3 Point Architecture

Just a quick mental dump for today. Modern architecture simplified.
  1. Information Flow
  2. Separation of Roles
  3. Immutable, whenever possible

Tuesday, October 07, 2014

Adventures in micro-cluster land

The past few months I had been busy tinkering with a micro-cluster during weekends to have a more in-depth peek at the Hadoop 2 eco-system. Six Odroid U3s stitched together by an el-cheapo DLink DGS-1008A gigabit switch. This is by far much more better than spinning Amazon EC2 instances or the two node Hadoop 1 cluster I tried a few years back.

One thing that keeps bugging me however is the intermittent connectivity am having with the cluster. A bit odd am getting a far more stable connection doing an ssh from the laptop into the cluster, than from one of the nodes in the cluster trying to ping or ssh another node.

This makes the master namenode unable to start properly and causes intermittent timeouts whenever it tries to start-cycle the host listings on the slaves config. And toying around ethtool with half/full duplex settings doesn't help either -- out of despair I tried even the 10 base half duplex but it still didn't work. The ODroid are using an smsc95xx USB 2.0 module and is purported to work in 100 base full duplex mode.

Am suspecting its either the cables or the network switch. Also looking at getting a powered USB charging hub to make setup a little bit more tidy. Alright, back to some other stuff for now.

Wednesday, September 03, 2014


The rise of BigData is now prompting engineering teams around the world to graple the last mile that comes along with huge data sets: how do you turn them to actionable insights? A picture is worth a thousand numbers, naturally, data visualization is the preferred medium.

If you start separating the tiers required for managing tons of data for visualization, the need for a fast searchable data store with analytical capabilities will emerge. This is where elasticsearch comes into the picture. Its a swiss army knife stack that can be used as a regular lucene backed data store, or call in the power of aggregations (facet replacement) and you have a decent analytical engine.

The question is where does Hadoop/Teradata maps into this in the overall scheme of Big Data. I'd say if your data set is only in the few GBs a clustered Elasticsearch is all that you need. If your data is running in terrabytes then its probably worth to have that in a Hadoop cluster and run your jobs there that either feeds in back to Elasticsearch or use Elasticsearch as one of the inputs to your favorite Hadoop script.

On one end, I can't believe this prompted me to write a three paragraph blog post!

Monday, January 13, 2014

Two weeks into 2014

Wow. Time flies ridiculously fast. 

Still got a ton of things to do. Liking the steady pace of stuff I had been itching to do but didn't materialize last year. The family settling in the new place is helping a lot to make schedule for some things.

Finished my first book for 2014. Still a lot on my reading list. Not to mention my impossible long Pocket list and the a dozen or so Safari reading list. 

On the personal side of things, managed to run consistently at a 7/kph pace for 30 mins in recent attempts. 

All in all a good start. A good start indeed.

Tuesday, December 31, 2013

Happy New Year! Welcome 2014!

2013 has been pretty tough. Relocating from one country to another is never easy. The kids had to take a break for 6 months since they came in after the middle of the school year coming from an international school.

Malaysia had been our home for the past 6 years. Lots of fond memories. The laid back way of life specially on the weekends. It was harder for the kids who had already develop long term friends among school mates. But alas, life is a journey. 

Singapore is now our new home. The past 8 months just went by pretty quick. We had to adapt quickly and scramble to gear up the kids for getting into a local school. The first thing my wife did was find a good tuition teacher to adjust the kids level to the intended year (P4 and S1 respectively). We were quite relieved when the results came in! My boy got into a mainstream school and my elder girl managed to get into the express stream. Huge sigh of relief. Official school days start tomorrow. Let the adventure begin.

On a professional level, I have to adapt managing teams remotely and really switch gear from getting things done hands-on style to a more coaching style to spread the technical leadership to varying teams. Pretty challenging no doubt to be thrown far out of your comfort zone. But change is always an opportunity to take things to a different level. So bring it on.

2013 also opened our eyes to the wonders of travel. We realized the kids are in an age where they could really appreciate traveling. Its a way for them to see portions of the world and be exposed to other cultures. This is far better than buying them toys. The memories of traveling with family has more deeper staying power than material things we provide. Those memories will last their lifetimes. Added bonus, each can now carry their own carry on baggage. Gone are the days we have to haul the baby bottles and diapers and have one bag just full of stuff toys. We can travel light and that makes traveling with the family more enjoyable. :)

I have rekindled my love for photography as well. And had taken quite a few images that am pretty proud of. Its a great way to exercise the creative part of the brain and a welcome respite from the hard hitting and fast paced technology world at work. 

All in all, am thankful to God for 2013. While you learn from mistakes, its always important to count your blessing and be grateful. Everyday is a gift. Don't take it for granted. 

So I guess thats it for a new year blog post. Again happy new year! Looking towards 2014 and all the challenges and excitements it may bring! :)