Monday, October 19, 2015

Serverless architecture.... What?


As Werner Vogels, CTO Amazon puts it "No Server is Easier to Manage than No Server" which in essence sums the move towards Server-less architecture.

Server-less architecture is the natural extension of reactive event driven design with Cloud infrastructure such as AWS. What it means is that servers or containers are spawned in response to events on the fly to execute a piece of code and then are shutdown with just a tiny bit of latency.
It has obviously lot of advantages such as:

  1. Very small and easy building blocks for complex applications of today
  2. They react to events and are on need basis.
  3. Low cost since one doesn't run the servers to execute code all the time, pay only for compute time.
  4. No maintenance.
How is it getting popular?
The likes of AWS is making it popular by providing on demand infrastructure at fraction of costs. One such service from AWS is AWS lambda(https://aws.amazon.com/lambda/). Basically IaaS and PaaS providers are making it easier to build such applications and architectures hence they are becoming extremely popular



Wednesday, June 24, 2015

Options of using CDNs while keeping assets in AWS S3

When you develop a public facing portal or webpage its always a good idea to keep your static assets such as js, css, jpg files in a CDN(Content Distribution Network). The advantages of CDNs are that they provide fast response time for these assets by caching them and then distributing them across the edge servers. The edge servers are usually globally distributed and are usually closer to user's devices which reduces the latency.
If you use AWS (Amazon Web Services) S3 to store your static content then their are multiple options for you to pick CDNs. The first and most obvious one is to go with AWS Cloud front which is AWS's CDN and is easy to integrate with S3. It also provides authentication and distribution control using Origin Identity.
If for some reason you cant use Cloudfront then the other option is to use Akamai kind of CDN. You can still use S3 and point Akamai to the S3.

Wednesday, April 1, 2015

7 habits of leaders

My son is in second grade and his school is really focused on building leaders of tomorrow, they want kids to really learn the good habits of leader.
When I saw the principles of the leadership, I was first surprised as to how such a complex and subjective topic can be an education goal at such level but when I saw what it was and how it was told to them I was pleasantly surprised. I actually liked the idea and the foundation it would put in my son's mind. All those principles sounded very relevant and to be used by adults in their life as well and I see some of the principles not even followed by matured adults including me some times.

Here are the 7 habits he is being taught.


Habit 1 — Be Proactive You're in Charge

Habit 2 — Begin with the End in Mind Have a Plan

Habit 3 — Put First Things First Work First, Then Play

Habit 4 — Think Win-Win Everyone Can Win

Habit 5 — Seek First to Understand, Then to Be Understood Listen Before You Talk

Habit 6 — Synergize Together Is Better

Habit 7 — Sharpen The Saw Balance Feels Best


So as I see these are lifelong habits he need to cultivate and would help him all his life both personally and professionally.

Even I also try to keep them in mind all the time. 

Tuesday, February 10, 2015

How to upload the security certificate and terminate SSL at AWS ELB for your website

As most of AWS users are well aware that ELB can be an SSL termination point for the incoming traffic to your website, today I will show step by step how  you can build, upload and save the SSL certificate on an ELB.
There are three parts to doing this:

Step 1: Build

As most of SSL certs of a corporation is handled by a dedicated team which maintains and creates the signed and verified certificate, they usually provide the certs on asking in standard format. They basically provide three things

    • A ".crt" extension file say acme.com.crt
 Sample crt file
-----BEGIN CERTIFICATE-----
jytdlhdxcz77dfd67idfefhend,

iuhfdfjhw8094kmdlksj88d9
.
.
.
kjdskjshkdshdskhsa7rri23l;j
-----END CERTIFICATE-----
    • A ".key" extension file say acme.com.key
Sample key file
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,672767RTE

re87e8eetr7ettewew7
ew68w68ere7e6rewr
.
.
.
yeiurwyireuyrere8987
-----END RSA PRIVATE KEY-----
    • And a password string for it('password')
On the other hand AWS needs these certificates as 'pem' encoded. so first step is to convert these files into format which AWS ELB needs. To do that you need to have openssl installed which on linux machines is installed by default most of the times but on windows you may have to install it.
After installing you have to generate two pem encoded files as ELB needs, one public another private.

To generate public file use the following command(If prompted for password provide the password as mentioned above)
openssl x509 -inform PEM -in acme.com.crt > public.pem
To generate the private file use the following command(If prompted for password provide the password as mentioned above)
openssl rsa -in acme.com.key -text > private.pem

In private.pem file you will have a lengthy certificate chain which is optional in ELB but at the end the file would look something like this.

-----BEGIN RSA PRIVATE KEY-----

yre7tet78etew8euyue
ew68w68ere7e6rewr
.
.
.
,n,xn,xcmnc7v7cyc7nn
-----END RSA PRIVATE KEY-----


The public.pem file will most likely remain same and would most likely look like your .crt file but whatever the result your sample public.pem would looks like this

-----BEGIN CERTIFICATE-----
jytdlhdxcz77dfd67idfefhend,

iuhfdfjhw8094kmdlksj88d9
.
.
.
kjdskjshkdshdskhsa7rri23l;j
-----END CERTIFICATE-----


 Step 2: Upload and Save

On the AWS console navigate to ELB page and click on ELB where you want to apply this certificate. On the bottom pane click on Listener tab(see image) and click on change link(as marked by arrow)


On clicking the change or upload button you would see the a modal where you would copy paste the content of the private.pem and public.pem file we generated (see attached image) In private.pem just copy paste the bottom part starting with -----begin private key-----


 This two step process will terminate your ssl at ELB and will provide enable your website to be secure on https protocol


Sid
http://dailytechscape.com

Sunday, January 25, 2015

SQL vs NO SQL ... Concluded

In this concluding post of SQL vs No SQL technologies I would like to call out various No SQL technologies available in the market place today. I would not go in to SQL as this has been well established and well understood theme. I would also conclude with some use cases of picking up No SQL over SQL or vice-versa.

The three most common operational No SQL db which are used today are Mongo DB, Cassandra and Couch DB. There are a lot more No SQL dbs available and I would point the readers to following link by Kristof Kovacs who does a pretty good job of outlining them for reading and understanding all of them in detail instead of trying to repeat it here.
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis

Regarding some specific use cases of No SQL vs SQL, I think No SQL with all its advantages as outlined in previous posts addresses most of use cases for general use and in my opinion is prefered over SQL technologies. But there are some very specific uses cases and industries where traditional DBs are still preferred. One such use case is around heavy transactional applications such as banking or financial transaction applications. The ACID properties of SQL dbs as discussed in my previous post is very important to such applications and the out of box 2 phase commit protocol and rollback makes SQL stand out. But as I said most of other use cases can be addressed better by No SQL dbs.

Thursday, January 8, 2015

SQL or No SQL- Operational vs Analytical

Happy new year to you all!

Last time we discussed what is Big data and how it relates to No SQL. This time I am going to talk about two different kind of data storage and retrieval requirements: Operational and Analytical.

Operational and analytical workloads for Big Data present opposing requirements and systems have evolved to address their particular demands separately and in very different ways. Operational workloads are supposed to be highly concurrent, low latency, very selective. While analytical workloads are query intensive looking at a huge data set. 
No SQL DBs mainly help on operational side of the spectrum.

Operational vs Analytical overview


OPERATIONAL       ANALYTICAL
Latency 1 ms - 100 ms 1 min - 100 min
Concurrency 1000 - 100,000 1 to 10
Access Pattern Writes and Reads Reads
Queries Selective Unselective
Data Scope Operational Retrospective
End User Customer Data Scientist
Technology NoSQL MapReduce, MPP Database


Next post I will try to conclude the SQL-  NO SQL  topic

Friday, December 12, 2014

SQL or No SQL- Big Data angle

Continuing from my previous post lets look at what is big data and how modern No SQL DBs help in capturing this data.
Big data as name suggests is vast amount of data, Data which is measured in TBs or PBs. With the cost of storage and network drastically reduced over past few years and expansion of cloud has helped companies to capture as much data as they can. The new paradigm is "Just collect it" which means just gather any and all kinds of data we will figure out later how to slice and dice it and how to use it for analysis.  This 'just collect it' principal is also a factor in driving No SQL dbs as most of this data is un-structured or semi structured like raw text in form of tweets, user comments or data like log files etc.
The three important aspect in fulfilling the business needs of  big data is Volume(Amount of data), Velocity(speed of storing and retrieving) and Variety(types of structured, unstructured data).
Business needs for big data can broadly be classified into two: Operational and Analytical

I will talk about more in detail about how these two needs are solved by technology products and how NO SQL helps in next post.