Febin John James's Blog, page 21

February 24, 2017

3 books to help you stop procrastinating

#1 The Power of Habit: Why We Do What We Do, and How to Change

This is my favourite . The first thing I did after I woke up was to check my phone. After reading this book I was able to break that habit into reading a chapter from a book.

The book contains three parts .

1.) The habits of Individuals

2.) The habits of successful organizations.

3.) The habits of societies.

It explains the habit loop of cue, routine and reward. Using the techniques explained in the book you will be able to use the habit loop to change your bad habits to good. It contains stories of people and organizations , who benefited from their habits.

Book on Amazon

#2 Deep Work: Rules for Focused Success in a Distracted World

We all know that social media usage affects our productivity. This book explained me it’s cost . After understanding the cost , you are likely to restrict your habit next time. I usually get stressed after a day’s of work. This book taught me if i do my work right. It can be both enjoying and satisfying.

This author explains why deep work is effective, satisfying and meaningful. This can help you get the best of your day. Worth a read.

Book on Amazon

#3 A Mind for Numbers: How to Excel at Math and Science (Even If You Flunked Algebra)

Even though the book is about learning techniques. A lot of chapters in the book has got techniques to stop procrastination. The pomodoro technique explain in the book is my favourite.

This book also contains strategies used by people from different field of expertise. If you want to be an active learner, this book is worth reading.

Book on Amazon

If you are interested in developing cloud apps. Do check out my book Cloud Is a Piece of Cake

3 books to help you stop procrastinating was originally published in Hacker Noon on Medium, where people are continuing the conversation by highlighting and responding to this story.

1 like ·   •  0 comments  •  flag
Share on Twitter
Published on February 24, 2017 08:41

January 21, 2017

How AWS SaaS startups can benefit from API Gateway and AWS Marketplace integration

Amazon Web Services announced the integration of AWS Marketplace and API Gateway last month.

Now lets see how this can help AWS SaaS startups

AWS marketplace has over 3500 software listing and an active customer base of over 100k users. So now you have direct access to AWS customer base. A new channel to reach out to your customers. Secondly, the heavy lifting of managing billing is already taken care by AWS. This has brought down your efforts on marketing and maintenance.

You can get started with these simple steps. I assume you already have the API built on the API Gateway.

Identify the API you want to sell on AWS MarketplacePackage the API into usage plans ( For example in a silver plan you can offer 1000 API Calls, for the gold one 10,000 etc)Offer a developer portal for the users to access their API. AWS has already made a reference implementation for you here. Here’s the step by step process to generate your developer portal.Register as a seller on AWS marketplace.Submit the product load form. If you have completed the above steps you already have everything required like API description, usage plans, developer portal link etc.You will be provided with an AWS product code. Now login to the API Gateway, use the associated product code to subscribe to your API and test it.Verify if everything works. Submit for approval.

How AWS SaaS startups can benefit from API Gateway and AWS Marketplace integration was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 21, 2017 09:08

January 18, 2017

Free cloud resources to get hands-on cloud computing

AWS Free Tier

They provide you with free tier available for 12 months following your AWS sign-up date. This is more than enough for you to run an instance for a month. They also provide you with Amazon RDS (Mysql DB) and Storage of (5GB) with their S3 service. Our book Cloud Is a Piece of Cake uses AWS free tier to teach hands-on cloud computing. You can download free chapters of the book here.

Google Cloud Platform

They give you $300 credit for 60 days. They have got really good videos to help you get started on their Google Developer Channel.

Microsoft’s Windows Azure

They give you $200 credit and a month to burn through it. They have got good documentation and a lot of templates to get you up and running soon.

Free cloud resources to get hands-on cloud computing was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 18, 2017 12:51

January 17, 2017

Beginners Tutorial : Host your first app on AWS EC2

Incase you need to understand the basics. Please refer to this post. You will need an Amazon Web Service Account. You don’t have to pay anything since we are sticking to the free tier. Following is an excerpt from the book Cloud Is a Piece of Cake.

Set up a Virtual Machine

What is a virtual machine?

Imagine a huge room. It can be sub divided into smaller compartments. Similarly, a computer of large capacity can be subdivided into smaller compartments or virtual machines. Each of these virtual machines feels like they have their own hardware. But, in reality, it doesn’t. It imitates dedicated hardware. Since it’s virtual, allocation and deallocation of resources are easy.

Note: In the top right of your AWS dashboard select the region which is closest to your location.

Create a Virtual Machine

AWS Dashboard

EC2 > Launch Instance

Select Instance OS

Here we select the OS of our virtual machine. We will be using Ubuntu. Select Ubuntu Server (Make sure it’s free-tier eligible as shown in the image).

Select Instance Type

Here we choose the configuration of our virtual machine. Select t2.micro or whichever is free-tier. Click Review and Launch.

Review and Launch

Here you can see security groups. Security groups allow you to restrict VM usage to specific IP. For now, it’s fine. Leave it that way. Click on launch to start the instance.

Create a new key pair

Key pair allows you to connect to your instance securely instead of a password.Download the key pair file and keep it safe. Once you have downloaded the key pair, you can click Launch Instances.

Instances

Now, wait till instance state is ‘running’. Then you are ready to go. Now we will use the public IP shown in the image to connect to our EC2 instance.

Connect to an EC2 Instance (Virtual Machine)

If you are using a Linux or a Mac OS

You will need to navigate to the folder containing the downloaded key pair on your terminal. I assume it’s in your Downloads folder. If you are not sure how to do this, please paste the file to your Downloads folder.

cd ~/Downloadschmod 400 myec2instance.pemssh -i myec2instance.pem ubuntu@54.183.227.71

If you are using a Windows OS

Download and install Cygwin. Paste the key file inside C:\cygwin\home\username; this

might be different in case you have changed your root directory. Once you paste it in the root directory, run the following commands.

chmod 400 myec2instance.pemssh -i myec2instance.pem ubuntu@54.183.227.71

Connect to an EC2 Instance

Installing Software Packages

What are Linux packages?

Linux packages are file archives containing all of the files needed for a particular application. All the Linux software comes in these packages. For now, we need two packages git and apache2

sudo apt-get install git -ysudo apt install apache2 -yApache Server

What is the apache server?

Apache is an open source web server that is used by most of the web servers around the world. A web server is similar to a receptionist who welcomes you and helps you with your requirement. Here a web server checks what the user has requested and serves him with web pages.

Currently, our EC2 instance disables any incoming traffic to our server. Our Apache server runs on port 80. We will need to add a security rule to allow connections on port 80. Login to AWS portal > EC2 Instance > Security Groups

Security Groups

Make sure launch wizard is selected then click on edit in the bottom.

Security Groups

Click on Add Rule. Select HTTP from the list > Save.

Edit Security Groups

Now go to your web browser. Navigate to http://YourEc2InstanceIP

Web Server Running

Let’s change the default page

cd /var/www/htmlsudo rm index.htmlsudo nano index.html

Inside index.html



This is amazing !





Hey congrats, You got the web server running. Let this take you places.



Enjoyed reading this? The other chapters in the book includes unix commands, bash scripting, making a news reader app, securing the app and scaling it. Learn more about the book here. Book is available for purchase on Amazon.

Beginners Tutorial : Host your first app on AWS EC2 was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 17, 2017 01:08

January 15, 2017

Beginners Tutorial: Set up a Linux Virtual Machine on Cloud

Incase you need to understand the basics. Please refer to this post. You will need an Amazon Web Service Account. You don’t have to pay anything since we are sticking to the free tier. Following is an excerpt from the book Cloud Is a Piece of Cake.

Set up a Virtual MachineWhat is a virtual machine?

Imagine a huge room. It can be sub divided into smaller compartments. Similarly, a computer of large capacity can be subdivided into smaller compartments or virtual machines. Each of these virtual machines feels like they have their own hardware. But, in reality, it doesn’t. It imitates dedicated hardware. Since it’s virtual, allocation and deallocation of resources are easy.

Note: In the top right of your AWS dashboard select the region which is closest to your location.

Create a Virtual Machine

AWS Dashboard

EC2 > Launch Instance

Select Instance OS

Here we select the OS of our virtual machine. We will be using Ubuntu. Select Ubuntu Server (Make sure it’s free-tier eligible as shown in the image).

Select Instance Type

Here we choose the configuration of our virtual machine. Select t2.micro or whichever is free-tier. Click Review and Launch.

Review and Launch

Here you can see security groups. Security groups allow you to restrict VM usage to specific IP. For now, it’s fine. Leave it that way. Click on launch to start the instance.

Create a new key pair

Key pair allows you to connect to your instance securely instead of a password.Download the key pair file and keep it safe. Once you have downloaded the key pair, you can click Launch Instances.

Instances

Now, wait till instance state is ‘running’. Then you are ready to go. Now we will use the public IP shown in the image to connect to our EC2 instance.

Connect to an EC2 Instance (Virtual Machine)

If you are using a Linux or a Mac OS

You will need to navigate to the folder containing the downloaded key pair on your terminal. I assume it’s in your Downloads folder. If you are not sure how to do this, please paste the file to your Downloads folder.

cd ~/Downloadschmod 400 myec2instance.pemssh -i myec2instance.pem ubuntu@54.183.227.71

If you are using a Windows OS

Download and install Cygwin. Paste the key file inside C:\cygwin\home\username; this

might be different in case you have changed your root directory. Once you paste it in the root directory, run the following commands.

chmod 400 myec2instance.pemssh -i myec2instance.pem ubuntu@54.183.227.71Unix CommandsWhat is Unix?

Unix is an operating system, which was developed at AT&T Bell Laboratories in the 1960s. It has been modified and updated constantly since then. It’s a robust, multi-user, multi-tasking system for servers, laptops, and PCs.

What is Linux?

Linux is a Unix-like Operating System. It behaves like a Unix System. Linux has got many distributions like Fedora, OpenSUSE, Ubuntu, etc. Our VM runs on Ubuntu operating system.

What are Unix commands?

Operating systems have got two types of interfaces — Character User Interface (CUI) and Graphical User Interface (GUI). GUI is an interface most of the personal computers and laptops have with graphical icons and visual indicators. CUI is a text-based interface. MS-DOS on Windows and Terminal on MAC are examples of CUI. In CUI we can do more things in less time, and it consumes very less memory as well. However, in a text-based interface, we will need to learn the commands to interact with the operating system. Unix commands are used to communicate with a Unix-like operating system.

Before we continue

You can go forward in two ways. Either by going through the Unix commands section, learn by executing them or skipping to the Apache server section and coming back to this chapter when you need help with a Unix command.

Environment Variables

The operating system has got a lot of variables like current user, OS language, home directory location, etc. These are called environment variables. It’s also possible for us to set environment variables. Hence the programs can handle situations differently for a particular environment condition.

List all environment variablesenv

This will list all environment variables.

echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:...Write an Environment Variableexport WEATHER="Sunny"

echo $WEATHERSunnyUnix File SystemCreate a file

We will create a file inside myapp directory.

cd $HOME touch home.htmlWrite to a file

Let’s write a file. The following command opens nano editor, write “hello” inside it. Then press CTRL-O, enter to save the file and CTRL-X to exit the editor.

nano home.htmlRead contents of a filecat home.htmlhelloRename a file

Let’s rename “home.html” to “index.html”

mv home.html index.htmlCopy a file

Let’s copy index.html to a new file called home.html

cp index.html home.htmlList Files

This command will list all the files and directories in the current directory.

ls home.html
index.htmlRename a file

Let us rename “home.html” to “index.html”

mv home.html index.htmlRemove a filerm index.htmlDirectory

The directory in Unix System is like folders you have on your computer.

Print Working Directorypwd/home/ubuntuCreate Directory

Here we create two directories myapp and static_files.

mkdir myapp mkdir static_filesMove Directory

Let us move staticfiles inside the myapp folder.

mv static_files myappChange Directory

We will go inside the myapp directory.

cd myappList

This command will list all the files and directories in the current directory.

ls static_filesRemove Directory

Removes a directory.

rmdir static_filesFile PermissionsUsers

Linux is a multi-user operating system. Mainly Linux users are of three types: super users, system users and normal users. Normal users are human users who log in to the run system programs interactively. System users are created to run specific applications such as background processes which don’t need interaction. Each user can access only files he is permitted to. The owner of the file grants permissions. However, there is another type of user called superuser or root user who can override any permission restrictions. In other words, he has access to anything on the server. We can also provide normal user accounts with superuser privileges.

List all users

List all the users in a server

cat /etc/passwd

List all users

Groups

Groups are a collection of multiple users. By default user belongs to a group. He can also be a part of multiple groups.

List all groups

List all the groups in a server

cat /etc/group

List all groups

Permissions

There are three types of permissions. Read, Write and Execute. Read permissions are required when you need to view a file, write to modify and execute for running the file as a script or application.

List all permissions

List files with their permissions

cd /var/logls -lPermissions

Here ‘d’ denotes it’s a directory. If it’s a file, it’s denoted as ‘-’. As you see, the permissions are split into three parts. Permission for the user (owner of the file), members of file’s group and others (Others here are any user who is not the owner of the file and is not a member of the group file belongs to). Here the user or the owner of the file has got permission ‘rwx’ which means he can read, write and execute. Group and Others have got permission ‘r-x’ which is read and execute. They won’t be able to modify the file.

Changing File Permissions

Let’s see how we can change file permissions. We will navigate to log files in the upstart folder

cd /var/log/upstartls -l

Here systemd-logind.log file has got permission ‘-rw-r — –’ which means only the root user can access the file. Let’s try accessing the file.

cat systemd-logind.log cat: systemd-logind.log: Permission denied

We get a permission denied error. Ok, now let’s change the permission. We can do this only because our account has got super user privileges (All accounts don’t have this privilege unless it’s granted to them).

sudo chmod o+r systemd-logind.log

Here prefixing ‘sudo’ we are using our super user power. Command ‘chmod’ is used to change the file permission. Here in ‘o+r’, ‘o’ denotes other users (Who is neither the owner of the file or belong to the group the file belongs to), ‘+’ denotes add permission, ‘r’ is read permission. So the above command gives other users read permissions to the file. Now let’s try reading the file.

cat systemd-logind.log

Now in order to remove the read permission we gave to other users.

sudo chmod o-r systemd-logind.log

In case you need to change the permission of the owner, say to remove write permissions then it will be ‘u-w’. Where ‘u’ denotes the owner. You can do the same to a group using ‘g-w’ where ‘g’ denotes group.

File Search

First, we will navigate to a directory with a lot of files.

cd /var/logFinding files

Let’s search for the file “rsyslog.log.1.gz”

find . -name rsyslog.log.1.gz./upstart/rsyslog.log.1.gz

Here ‘.’ denotes search for files inside the current directory. Here we will need to specify the full name of the file.

Finding files with partial name matchfind . -name “*.gz” ./syslog.6.gz ./syslog.3.gz ./syslog.5.gz

Here ‘*’ is a wildcard character, ‘.gz’ will give you the name of the files ending with ‘.gz’.

Search inside a file

Let us look up for the word ‘client’ inside ‘syslog.1’.

grep client syslog.1

Search inside a file

Search inside folders and files

Let us look up for the word ‘user’ inside all folders and files in current directory.

grep -nr user .

Search inside folders and files

Here ’n’ asks for line numbers, ‘r’ to search recursively inside all files and folders, ‘.’ is to denote to search inside current directory. This command will list all the files along with the lines containing ‘user’ in it.

SCP Command

Secure copy command allows you to copy files between servers. So let’s try copying a file from our computer to the server. In order to do this, exit the session from the server by typing ‘exit’. Go to the Downloads folder on your computer. We will create a file named ‘examplefile.txt’. Then send it across to our ec2 instance.

touch examplefile.txtscp -i myec2instance.pem examplefile.txt
ubuntu@54.183.227.71:/home/ubuntu

Now let’s login to our ec2 instance. There you find the “examplefile.txt”

ssh -i myec2instance.pem ubuntu@54.183.227.71 ls examplefile.txt
myapp

Now let us create a file named “examplefile2.txt” and see how we can copy it to our computer.

touch examplefile2.txtexitscp -i myec2instance.pem ubuntu@54.183.227.71:/home/ubuntu/examplefile2.txtBash Scripting

We have learned a lot of commands. Let’s write a bash script and run it. We will create a simple script which echoes ‘hello world’. Make sure you are logged back into the server.

ssh -i myec2instance.pem ubuntu@54.183.227.71nano hello.sh

Inside hello.sh

#!/bin/bashecho Hello World

The first line tells the system it’s a bash script. To save and exit the editor press CTRL-O, enter then CTRL-X. Execute the bash script

bash hello.sh

Hello World

Script to Make Backup of a File Every Minute

Let us make a script while makes backup of a file every minute

cd $HOME touch file.txttouch backup.txt nano copy.sh

Now let us write the bash script inside copy.sh

#!/bin/bashcp /home/ubuntu/file.txt /home/ubuntu/backup.txt

To save the file and exit the editor CTRL-O, enter and CTRL-X Now we need to make sure the script executed every minute. We can use crontab for that.

What is crontab?

Crontab is a time-based job scheduler. Hence can help us run scripts automatically as and when required. Every n minutes or hours or days or months etc.

sudo crontab -e

Choose nano editor or option 2, and then paste the following line in the bottom of the file, which tells the system to run the copy script every minute.

* * * * * bash /home/ubuntu/copy.sh

Now let us restart the cron service

sudo service cron restart

Now make changes to file.txt, wait for say two minutes. You will see the changes reflected in backup.txt

Installing Software Packages

What are Linux packages?

Linux packages are file archives containing all of the files needed for a particular application. All the Linux software comes in these packages. For now, we need two packages git and apache2

sudo apt-get install git -ysudo apt install apache2 -yApache Server

What is the apache server?

Apache is an open source web server that is used by most of the web servers around the world. A web server is similar to a receptionist who welcomes you and helps you with your requirement. Here a web server checks what the user has requested and serves him with web pages.

Currently, our EC2 instance disables any incoming traffic to our server. Our Apache server runs on port 80. We will need to add a security rule to allow connections on port 80. Login to AWS portal > EC2 Instance > Security Groups

Security Groups

Make sure launch wizard is selected then click on edit in the bottom.

Security Groups

Click on Add Rule. Select HTTP from the list > Save.

Edit Security Groups

Now go to your web browser. Navigate to http://YourEc2InstanceIP

Web Server Running

Let’s change the default page

cd /var/www/htmlsudo rm index.htmlsudo nano index.html

Inside index.html



This is amazing !





Hey congrats, You got the web server running. Let this take you places.



Enjoyed reading this? The other chapters in the book includes making a news reader app, securing the app and scaling it. Learn more about the book here. Book is available for purchase on Amazon.

Beginners Tutorial: Set up a Linux Virtual Machine on Cloud was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 15, 2017 09:23

January 13, 2017

Deploy your first app on cloud

Incase you need to understand the basics. Please refer to this post. You will need an Amazon Web Service Account. You don’t have to pay anything since we are sticking to the free tier. Following is an excerpt from the book Cloud Is a Piece of Cake.

Set up a Virtual Machine

What is a virtual machine?

Imagine a huge room. It can be sub divided into smaller compartments. Similarly, a computer of large capacity can be subdivided into smaller compartments or virtual machines. Each of these virtual machines feels like they have their own hardware. But, in reality, it doesn’t. It imitates dedicated hardware. Since it’s virtual, allocation and deallocation of resources are easy.

Note: In the top right of your AWS dashboard select the region which is closest to your location.

Create a Virtual Machine

AWS Dashboard

EC2 > Launch Instance

Select Instance OS

Here we select the OS of our virtual machine. We will be using Ubuntu. Select Ubuntu Server (Make sure it’s free-tier eligible as shown in the image).

Select Instance Type

Here we choose the configuration of our virtual machine. Select t2.micro or whichever is free-tier. Click Review and Launch.

Review and Launch

Here you can see security groups. Security groups allow you to restrict VM usage to specific IP. For now, it’s fine. Leave it that way. Click on launch to start the instance.

Create a new key pair

Key pair allows you to connect to your instance securely instead of a password.Download the key pair file and keep it safe. Once you have downloaded the key pair, you can click Launch Instances.

Instances

Now, wait till instance state is ‘running’. Then you are ready to go. Now we will use the public IP shown in the image to connect to our EC2 instance.

Connect to an EC2 Instance (Virtual Machine)

If you are using a Linux or a Mac OS

You will need to navigate to the folder containing the downloaded key pair on your terminal. I assume it’s in your Downloads folder. If you are not sure how to do this, please paste the file to your Downloads folder.

cd ~/Downloadschmod 400 myec2instance.pemssh -i myec2instance.pem ubuntu@54.183.227.71

If you are using a Windows OS

Download and install Cygwin. Paste the key file inside C:\cygwin\home\username; this

might be different in case you have changed your root directory. Once you paste it in the root directory, run the following commands.

chmod 400 myec2instance.pemssh -i myec2instance.pem ubuntu@54.183.227.71

Connect to an EC2 Instance

Installing Software Packages

What are Linux packages?

Linux packages are file archives containing all of the files needed for a particular application. All the Linux software comes in these packages. For now, we need two packages git and apache2

sudo apt-get install git -ysudo apt install apache2 -yApache Server

What is the apache server?

Apache is an open source web server that is used by most of the web servers around the world. A web server is similar to a receptionist who welcomes you and helps you with your requirement. Here a web server checks what the user has requested and serves him with web pages.

Currently, our EC2 instance disables any incoming traffic to our server. Our Apache server runs on port 80. We will need to add a security rule to allow connections on port 80. Login to AWS portal > EC2 Instance > Security Groups

Security Groups

Make sure launch wizard is selected then click on edit in the bottom.

Security Groups

Click on Add Rule. Select HTTP from the list > Save.

Edit Security Groups

Now go to your web browser. Navigate to http://YourEc2InstanceIP

Web Server Running

Let’s change the default page

cd /var/www/htmlsudo rm index.htmlsudo nano index.html

Inside index.html



This is amazing !





Hey congrats, You got the web server running. Let this take you places.



Enjoyed reading this? The other chapters in the book includes unix commands, bash scripting, making a news reader app, securing the app and scaling it. Learn more about the book here. Book is available for purchase on Amazon.

Deploy your first app on cloud was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 13, 2017 13:49

Best resources to learn about cloud computing

Startup Engineering By Stanford university

The first half of the course will cover modern software engineering principles with a focus on mobile HTML5 development, taught via lectures, quizzes, and programming assignments. Guest lecturers from top Silicon Valley startups including Uber, Square, Stripe, AirBnb, Twilio, Taskrabbit, Judicata, Counsyl, Asana, Heroku, and Twitter will bring these concepts to life with real engineering problems from their work.

In the second half, you will apply these concepts to develop a simple command line application, expose it as a webservice on Amazon Web Services, and then integrate other students’ command line apps and webservices together with yours to create a mobile HTML5 app as a final project. Lectures will continue in the second half, but will be focused on the design, marketing, and logistical aspects of creating and scaling a startup.

Access the course here

Microsoft Azure Tutorials

Though most of the tutorials are native to their platform. They do a really good job of explaining the concepts. Once you understand the underlying concepts you can replicate them with any cloud providers.

Access the tutorial here

Digital Ocean Community Tutorials

Digital Ocean Community has got really good resources on cloud computing. However it isn’t categorised. If you know what exactly you are looking for you can find it here.

Access the tutorial here

Cloud Is a Piece of Cake (Book)

This book is written by us for true beginners. You can try the free chapters here. Learn more about the book here.

Best resources to learn about cloud computing was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 13, 2017 05:15

January 11, 2017

Our Mission

It was 9 years ago , I wanted to build a website on php. I wondered how things like login, uploads, etc work? I had a lot of questions on my head. I borrowed the book “Beginning PHP, Apache, MySQL Web Development”. The book had 720 pages. I didn’t have the patience to read that huge book.

As years passed by, I got my expertise in backend development. I wrote apps and scaled them on the cloud. The thing I discovered was, you learn as you go. You don’t need to know a lot of thing to start building products.

Most of the information available on the web about technology are so boring. However, thanks to Head First books, Code School, CodeAcademy for making learning fun.

Still a lot of topics like Cloud Computing, Machine Learning, Artificial Intelligence etc needs help. We made Piece of Cake Labs to continue making the process of learning technology fun.

We believe in empowering people to build futuristic products by teaching technology the fun way.

Let us learn it the fun way !

Our Mission was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 11, 2017 08:47

Cloud Computing for Beginners

Following is an excerpt from the book “Cloud Is a Piece of Cake”. Learn more about the book here.

Introduction to Cloud

Consider you wanted to host a movie booking service. Before cloud, you had to buy a physical server and host it. So whenever a customer wants to book a ticket, he sends a request from his computer to your server. The server processes the request and sends data back to the client (customer’s computer). If the server and the client were having a conversation, it would look like this.

Client: I need tickets for Captain America: Civil War.

Server: Here are the available seats for the movie {P1, P2, P4, A3 …}

Client: I am booking P1, P2

Server: Blocking the seats, awaiting payment

Client: Here are my payment details {CardNo: XXXXXX, CVV…}

Server: Congrats, they are booked.

The customer’s computer and the server communicate with packets of data.

Your server would be able to handle 1000’s of such requests based on its configuration.

However, what happens when the demands exceed the server’s limit? Say 10k — 20k requests? It is the same case when ten to twenty people are pinging you on Whatsapp. You will attempt to answer them all one by one. However, you would take a lot of time. However, on the internet this delay is unacceptable.

Why can’t we add more servers?

Yes, that’s a solution. Say you buy or rent ten more servers. Now they can work as a team and share the load. That works well. However, your service won’t have such requests all the time. Compare the first day of the Civil War Movie to the fiftieth day. The number of requests drops down. The additional servers you bought are now jobless. You will be still paying for their electricity and bandwidth. In some situations, you can never predict when requests are at peak. So it’s necessary for the servers to be ready. When the next peak time arrives, your servers may be outdated. Hosting it physically has a lot of other problems like power outages, maintenance cost, etc. Since this involves wastage of resources, this isn’t an effective solution. The cloud was developed to tackle this.

How can the cloud help?

In the cloud, we have a shared pool of computer resources (servers, storage, applications, etc.) at our disposal. When you need more resources, all you need is to ask. Provisioning resources immediately is a piece of cake for the cloud. You can free resources when they are not needed. In this way, you only pay for what you use. Your cloud provider will take care of all the maintenance.

Where is the cloud?

The shared pool of computer resources exists in a physical location called data centers. Your cloud providers have multiple data centers around the world. So your data is replicated at multiple sites. Even if a data center goes down because of a natural calamity, it’s still safe in another location.

What are IaaS, PaaS and SaaS?

In IaaS (Infrastructure as a Service) you are given materials like cement, bricks, sheets, etc. to build a house. Similarly, here you get to choose the hardware you want to make the cloud service. You have got the flexibility to make it in the way you want. Ex: Amazon Web Services, Microsoft Azure, Google Compute Engine, etc.

In PaaS (Platform as a Service) the house is built for you, you only need to furnish it. Similarly, here you are provided preconfigured hardware. So it can only run applications it supports. You don’t get the flexibility when compared with IAAS. Ex: Heroku, Google App Engine, etc.

SaaS (Software as a Service) all you need to occupy. Here you are offered software on a subscription basis. Ex: Gmail, Yahoo, etc.

Enjoyed reading this? Do you want to learn to create virtual machines, build a cloud app, secure and scale it? The above is just an excerpt from the book Cloud Is a Piece of Cake .

Learn more about the book here.

Buy on Amazon International.

Buy on Amazon UK.

Buy on Amazon India.

Cloud Computing for Beginners was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 11, 2017 08:45

Cloud Is a Piece of Cake

We created this book to empower people to create their dreams on cloud.

Grab the free chapters here.

Buy on Amazon.

Get help on our support forum.

ContentsWhat will the book teach you?This book is differentIntroduction to cloudSet up a virtual machineBuild a News Reader App — Part 1Build a News Reader App — Part 2Scale It upSecure your cloud appReviews

Grab the free chapters here.

Buy on Amazon International.

Buy on Amazon UK.

Buy on Amazon India.

Cloud Is a Piece of Cake was originally published in Piece of Cake Labs on Medium, where people are continuing the conversation by highlighting and responding to this story.

 •  0 comments  •  flag
Share on Twitter
Published on January 11, 2017 08:42