Monday, June 10, 2013

Big Data is About Speed Instead of Just Size

Article: http://www.guardian.co.uk/news/datablog/2013/may/20/big-data-critics-overlooked-speed-not-size

The main point of the article provides an insightful reminder for us not to be fixation with just the volume aspect of big data. There are many cases characterized by a high-velocity stream of data that needs to be processed and acted on immediately.

Google Launches "Mobile Backend as a Service"

Google launches "Mobile Backend as a Service" starter kit. It's called "Mobile Backend Starter" and runs on top of Google App Engine.

It's mainly a client-to-client networking and communications stack. It supports storage of state data on the server side and also Google Authentication. However, no customized server logic or extensions are supported.

References:

Wednesday, May 29, 2013

Application Management for AWS

Currently, the following application management frameworks are available for AWS (excludes third party solutions):

  1. AWS Elastic Beanstalk
  2. AWS OpsWorks
  3. AWS CloudFormation

Something they didn't mention in the above web-page is that OpsWorks is a technology acquired in an acquisition, and does not integrate into all of AWS's services yet, the most important being ELB (OpsWorks uses HAProxy). Leaving CloudFormation as the framework of choice if this is an issue.

Forum post about this: https://forums.aws.amazon.com/message.jspa?messageID=426226

On the other hand, the downside of CloudFormation is the lack of automated failover.

Sunday, April 7, 2013

BASH IO Redirection

In bash, by default, only stdout gets redirected to a file when you use the ">" operator.

To redirect stderr to a file, use the "2>" operator.

To redirect both, use "&>"

Reference:http://www.cyberciti.biz/faq/redirecting-stderr-to-stdout/

Git Undo Staging a File for Commit

If a file has already been staged for commit i.e. via the "git add" command, use the following command to unstage the file:

git reset HEAD <filename>

Monday, April 1, 2013

The "spi" Package in Java Projects

It's quite common to find a package called "spi" in Java projects.

Here's an explanation of what it means and what it's for:

Monday, March 18, 2013

C# Start New Process

This is how it's done:http://stackoverflow.com/questions/258416/shellexecute-equivalent-in-net

If you need to start multiple processes asynchronously, you'd need to first start multiple threads and then within each thread, each process is started.

Reference for this: http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C

How to add arguments: http://msdn.microsoft.com/en-sg/library/system.diagnostics.processstartinfo.arguments.aspx

Tuesday, March 12, 2013

C# Getting Time Since Epoch

Many things are simpler in C# than e.g. in Java, but getting the Epoch time is an exception, and this is how it's done.


TimeSpan timeSpan = DateTime.UtcNow - new DateTime(1970, 1, 1);
double currentTime = timeSpan.TotalSeconds;

Tuesday, February 5, 2013

Friday, January 25, 2013

iOS How to Close an App

With multi-tasking, apps no longer really close when you press the home button. It stays in the background and the OS automatically closes them when the device is low on memory and when it thinks the app is unlikely to be used in the near future. To force it to close for e.g. development testing purpose, follow the instructions on this page: http://support.apple.com/kb/ht5137

Thursday, January 24, 2013

AWS DynamoDB Java API Gotcha

If you don't set the end-point, it will default to the US East Virginia region, resulting in an error saying the table can't be found.

The error message you'll get varies. If you have IAM setup to limit access for the user account to this specific DynamoDB table, then you'll get an "AccessDeniedException". Otherwise, you'll get a "ResourceNotFoundException".

If your DynamoDB is configured in the other regions, you'll have to set the End Point after creating the client e.g:

client = new AmazonDynamoDBClient(awsCredentials);
client.setEndpoint("https://dynamodb.ap-southeast-1.amazonaws.com");

AWS DynamoDB ARN for IAM

To give access via IAM to a specific DynamoDB resource, define the ARN as follows:


arn:aws:dynamodb:<region>:<accountID>:table/<tablename>

AWS IAM Account ID

The account ID is needed to construct the ARN for IAM entries. AWS isn't being very clear about how to retrieve the account ID. It's actually the Account Number (with the hypens removed) that you see under your name in the "Manage Your Account" page (accessed via the "My Account" link in a drop down menu under your name on the top-right of the console).

Thursday, January 17, 2013

Mac Show Hidden Files in Finder

I usually don't need this feature, as I can use the Terminal to work with hidden files, but when I needed to restore some hidden files from Time Machine, I needed to get Finder to show hidden files.

Here's a couple of links showing how it's done:

Monday, January 7, 2013