September Golang Bangalore Meetup

The September Golang Bangalore Meetup was conducted on Saturday, September 16, 2017 at DoSelect, Bengaluru. Around 25-30 people attended the meetup.

The meetup started at 10:15 with the first talk by Baiju Muthukadan who works at Red Hat India Pvt. Ltd., Bengaluru. He talked about “Testing techniques in Golang”.

IMG_20170916_102219

Karthikeyan Annamalai  gave a lightning talk about “Building microservice with gRPC”. The slides related to his talk can be found here.

karthik

Dinesh Kumar gave an awesome talk about “Gotcha’s in Golang”.  The slides related to his talk could be found here and the code explained during the demo is here.

IMG_20170916_115114.jpg

The last lightning talk of the meetup was by Akshat who works at Go-Jek. Akshat talked about “Building an asynchronous http client with retries and hystrix in golang“.

IMG_20170916_125031.jpg

I thank Sanket Saurav, Mohommad Rafy for helping us to organize the September Golang Bangalore Meetup by providing venue and food at DoSelect. Also, I thank Sudipta Sen for helping us out with the meetup preparation.

Advertisements
September Golang Bangalore Meetup

Serverless Architecture

I attended Serverless Architecture Meetup  organized by Hasgeek on Saturday, September 23 which got me curious to learn more about Serverless architecture. The meetup was conducted at Walmart Labs, Bengaluru.

The first talk was by Akhilesh Singh who is a Senior Technical Consultant at Google. Akhilesh Talked about:

  • What is Serverless Architecture?
  • Evolution of serverless
  • Serverless vs IaaS model

Akhilesh was very proficient in not only explaining what is serverless architecture but also putting across his point of view about this trend.

The second talk was by Ganesh Samarthyam, Co-founder of CodeOps Technologies and Srushith Repakula, Software Engineer at CodeOps Technologies. Ganesh talked about how serverless architecture is applied in practice. Srushith showed a demo application for auto-retweeting written in Python which uses Apache OpenWhisk.

The most interesting part of the meetup was the Panel Discussion. The panel members were:

  • Akhilesh Singh
  • Ganesh Samarthyam
  • Joydeep Sen Sarma (Co-founder & CTO, Qubole)
  • Rishu Mehrotra (SRE Manager, LinkedIn)

During the meetup, a lot of questions were raised around:

  • Security in serverless architecture
  • How resources are utilized
  • Role of devOps in serverless architecture, etc

These are my notes on serverless architecture:

Servers

Conventionally, servers:

  • have fixed resources
  • are supposed to run all the time
  • are managed by system administrators

 

Problem with Servers

  1. When traffic increases, servers were not able to handle enormous amount of requests and would crash.

 

Paas

  1. To handle the above problem, Paas came into existence which offered scaling.
  2. This can be considered as the first iteration of Serverless
  3. You think about servers but you dont have to manage them

 

What does Server-less mean?

The word “server-less” doesnot mean -> no servers at all. It simply means elimination of ‘managing’ of servers.

 

What is Serverless?

  1. Serverless computing is a cloud computing execution model in which the cloud
    • manages allocation of machine resources
    • bills based on actual amount of resources consumed by application (rather than billing on pre-purchased units of capacity)

 

 

What problem does Serverless architecture solve?

  1. We build our applications around VM. We have a VM for each:
    • database
    • web
    • application
  2.  If  VM fails, a layer of our application fails
  3. Even if we break down into smaller containers or microservices, when these microservices or infrastructure fail, our application fails.

 

Advantages of Serverless architecture

1. Focus on application development rather than managing servers.

2. Serverless provisions are completely managed by providers using automated systems which eliminates the need of system administrators.

 

Stateless Nature of Serverless architecture

1. Serverless architectures are event driven.

2. This means for each event or request to server, a state is created.
After the request is served, the state is destroyed.

 

Problem with Statelessness

  1. There are different usecases for Stateless architecture. So, your application architecture needs to be redesigned according to the usecase.
  2. States can be stored across multiple requests with:
    • in memory db like redis
    • simple object storage
  3. This is slower than storing state in:
    • cache
    • RAM

 

Function As A Service (FaaS)

  1. A way to implement Serverless architecture
  2. What is a function?
    • Function is a small program that does one small thing
  3. Short lived functions are invoked upon each request and provider bills client for running each individual function.

 

Popular Faas Services

  1. AWS Lambda
  2. Google Cloud Functions
  3. IBM BlueMix OpenWhisk
  4. hook.io

 

FaaS vs Managed Servers

1. Similarity:
You dont have to manage the servers

2. Fundamental Difference:
In Faas, you dont need to manage server applications as well

 

Advantages of Faas

  1. Two FaaS functions written in different languages can interact with each other easily.
  2. Multiple functions can be connected and chained together to implement reusable components.

 

FaaS vs PaaS

Consider an e-commerce website. On a normal day, the traffic is average. But during holidays, we could expect a sudden surge in the traffic. In those cases, the server will not be able to serve so many requests and eventually crash. But this can be solved by scaling the server resources.

In Paas, scaling is provided. But you need to estimate how much resources you would need and then provision them accordingly. The problem with this is that you might over or under estimate. If you over estimate, then even on normal days, you would pay for unused resources. If you under estimate, then your server will crash when traffic increases.

In FaaS, the biggest USP is ‘automatic scaling’. You dont have to think about scaling. Automatic horizontal scaling is managed by the provider and is completely elastic.

 

Backend As A Service (BaaS)

  1. It integrates into FaaS architecture
  2. BaaS provides entire application component as a service like:
    • DB storage
    • push notifications
    • analytics

 

FaaS Cold Start Problem

  1. Cold starting a function in serverless platform takes a considerable amount of time to load.
  2. This is bad in the cases where certain functions are accessed infrequently.
  3. This can be overcomed by a process called ‘warming’ where in functions are invoked periodically.

 

FaaS Time Limit Problem

  1. FaaS Functions have time limit within which they have to run
  2. If they exceed it, they will be automatically killed.
  3. So, application should be redesigned to divide a long-lived function into multiple co-ordinated functions

 

Vendor lock-in

  1. This is the major disadvantage of FaaS..
  2. When you move from one provider to another, you will need to change your code accordingly.

 

Serverless Architecture

  1. Serverless goes a step beyond where you dont even have to think about capacity in advance.
  2.  You would generally run a monolith application on a PaaS.
  3. Serverless lets you break your application into small self contained programs (functions).
    • Example:
      • Each API end point can be a seperate function
  4. From operations perpective, the reason you would break down your app into functions is to scale and deploy seperately.
    • Example:
      • If one of your API endpoint has 90% of traffic, then that one bit of code/ function can be distributed and scaled much easier than your entire application.
Serverless Architecture

August’17 Golang Bangalore Meetup

The August Golang Bangalore Meetup was conducted on Saturday, August 26, 2017 at Red Hat India Pvt. Ltd. Since the event took place around the holidays, there were less number of people who turned up for the event.

The meetup started at 10:30 with the first talk by Nurali Virani who works at SAP Labs, Bengaluru. He talked about “Understanding Slice & Map in Golang”. Nurali’s talk was a beginner friendly talk. He explained the concepts in very detail and by live coding. He addressed each and every question raised by the participants. The code written  by Nurali during his demo can be found here.

The next talk was done remotely by Steve Manuel. Steve (@nilslice) lives in Boulder, Colorado. He is the co-founder of Boss Sauce Creative. Steve talked about his open source project Ponzu. Ponzu is a headless CMS with automatic JSON API, featuring auto HTTPS, HTTP/2 Server Push, and flexible server framework written in Go. The slides related to his talk can be found here. Other related resources: Github, Docs, Addons. To know more about ponzu, join #ponzu on gophers.slack.com. You can receive invitation to join Slack from here: https://invite.slack.golangbridge.org

Fortunately, Steve’s talk is recorded. The recording can be found here.

I thank Udayakumar Chandrashekhar and Red Hat India Pvt. Ltd. for helping us to organize the August Golang Bangalore Meetup by providing venue and food.

August’17 Golang Bangalore Meetup

June ’17 Golang Bangalore Meetup

The June Golang Bangalore Meetup was conducted on Saturday, June 17th, 2017. There were around 35-40 people who attended the meetup.

DCf3kQJVwAA8VSC.jpg:large

The meetup started at 10:15 with the first talk by Nurali Virani who works at SAP Labs, Bengaluru. He talked about “Understanding Type System In Go”.

DCgErtoU0AAVDds.jpg:large

Saifi gave an awesome talk about “Working with C code and plugins in Go”. The slides related to his talk can be found here

DCgNU5GU0AAFIhH.jpg:large

Umasankar Mukkara is the Co-Founder and CEO at CloudByte Inc. He talked about OpenEBS and their experience with Golang. The slides of his talk could be found here. OpenEBS is an open source project written in Golang. You can find the source code of OpenEBS here.

Satyam Zode who is also a fellow Golang programmer at OpenEBS presented a talk about “Package oriented design in Go”. The slides related to his talk could be found here

IMG_20170617_115317IMG_20170617_115325

I thank Uma, OpenEBS and Nexus Ventures Partners for helping us to organize the June Golang Bangalore Meetup by providing venue and food. There were also a few goodies for the participants by OpenEBS. Fortuanately, this event was recorded and we will be sharing the recorded videos soon when they will be ready.

 

 

June ’17 Golang Bangalore Meetup