The First-Ever Go Conference in India – GopherConIndia 2015


Originally posted on Josh Software - Where Programming is an Art!:

After the resounding success of GopherCon 2014 in Denver, Co, USA the Go Language Community in India together with the Innovation And Technology Trust (ITT) (a non-profit organization, established to organize and conduct technology conferences in India whose current portfolio includes RubyConf India, GopherCon India and DevOpsDays India) are bringing you the first-ever Go conference in India – GopherConIndia 2015 in Bengaluru (Bangalore) from 19-22 Feb. 2015.

The Indian Go programming community is growing at a dramatic pace. The number of companies utilizing Go, as part of their technology stack, continues to grow steadily.

GopherConIndia 2015

GopherConIndia 2015

Planning and organizing an all India conference is not an easy task but a small team of dedicated volunteers (Ajey Gore, Gautam Rege, Karan Misra, Krishnaprasad Varma, Pravin Mishra, Santosh B Malleshappa, Sathish VJ, Satish Talim – this does not list all of the volunteers, without…

View original 428 more words

Install Go(Golang) on Ubuntu


There are many ways to configure the Go development environment on your computer, you can choose any one you like. The three most common ways are as follows.

gopherbw

Official installation packages
The Go team provides convenient installation packages in Windows, Linux, Mac
and other operating systems. The easiest way to get started.

Install from source code
Popular with developers who are familiar with Unix-like systems.

Use third-party tools
There are many third-party tools and package managers for installing Go, like apt-
get in Ubuntu and homebrew for Mac.

In case you want to install more than one version of Go in one computer, you should take a look at the tool called GVM. It is the best tool I’ve seen so far for achieving this job,  otherwise you have to know how to deal with this problem by yourself.

gopher

Using GVM

1. Make sure to install pre-requisite libraries first

sudo apt-get update
sudo apt-get install curl git mercurial make binutils bison gcc

2. Install GVM

bash < <(curl -s https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer)

3. Install Go

gvm install go1.2
gvm use go1.1.2 [--default]
gvm list

Install Go Binary

1.  Install required libraries

sudo apt-get install python-software-properties  # 12.04
sudo add-apt-repository ppa:duh/golang
sudo apt-get update

2. Install Go

sudo apt-get install golang

3. export the settings you’re gonna need to bash_rc or equivalent:

export GOROOT=/usr/lib/go
export GOBIN=/usr/bin/g

From Source

1. Dependencies

sudo apt-get update
sudo apt-get install gcc make mercurial git libc6-de

2. Building from source

hg clone -u release https://code.google.com/p/go
$ cd go/src
$ ./all.bas

3. The GOPATH environment variable

Go commands all rely on one important environment variable which is called $GOPATH. Notice that this is not the $GOROOT where Go is installed. This variable points to the workspace of Go in your computer. (I use this path in my computer, if you don’t have the same directory structure, please replace by yourself.)

export GOPATH=$HOME/gocode
export PATH=$PATH:$GOPATH/bin

Note:- If your Go version is greater than 1.0, you don’t have to set $GOBIN, and it will automatically be related to your $GOROOT/bin, which we will talk about in the next section

golang.sh-600x600

You can install any of the above three way. I mostly prefer using GVM. I hope it will help you.!

Celebrating the One Year Anniversary at ShepHertz Technologies


I am very pleased to announce that this is the one year anniversary at ShepHertz – it was on March 1st, 2013. I never dreamed that I will work with such a like minded people, technologies and company.

It has been a such an incredible journey so far. I learned so many things that i can’t put in words over here. I found truly wonderful experience with truly wonderful people at ShepHertz.

I am more happy to say that I am part of company which is A Cloud Ecosystem Provider for Apps and unique in this cloud computing world!.

Here I get opportunity to work on Cloud Computing production like PaaS, BaaS and GPaaS.

ext

Below, I would like to share some highlights from my year experience.

App42 PaaS – At App42 PaaS I am member of the Runtime Systems team, where taking care of distributed systems that manage many application hosting(Rails/PHP/Java/ Node.js), systems development and infrastructure automation.

At this point you must wondering What is App42 PaaS and what it do? Right? Let me explain.

App42 PaaS is a Public Cloud Platform-as-a-Service with support for multiple languages
and platforms. This will enable you to focus on your development rather than putting your time on infrastructure hassles.

Key Benefits:
- A Polyglot platform that supports multiple languages and frameworks like Ruby, Java, PHP, Node.js, JRuby, Jython and more.
- Multiple Cloud Services like MongoDB, CouchDB, PostgreSQL, MySQL and more.
- Control through Command Line as well as Management Console for quick deployment of Apps
- Customizable load balancing for high availability- Quick Scaling/Descaling of resources

My Journey with App42 API - The App42 Cloud API’s consists of a REST based service which has a JSON and XML interface. There are around 22+ modules with over 400+ API’s e.g. User, Session Management, Storage, Recommendation, Photo Gallery, Queue / Message, Game, Geo Spatial etc. which will help developers to develop their applications; irrespective of the type of App they are developing. SDK’s are provided for all popular languages and platforms which will enable easy integration of the API’s into the App code. With just a few lines of code, the App developer gets access to services from a simple to complex technical as well as business services.

I would like to thank Siddhartha Chandurkar and Naveen Goswami sincerely for your all support, kindness and help during years with organization. Thank you ShepHertz family to making this journey so wonderful.!!

Why should i use Ruby on Rails?


Previous yesterday(22 Feb, 2014) we had Delhi NCR Ruby Meetup on Open Source Saturday – How can I contribute to Ruby on Rails?. There i had opportunities to meet few college student, Once of them asked to me – Why should i use Ruby on Rails? Yeah, That’s really good question :) So let’s talk, why should we use Ruby on Rails when dozen of language and frameworks are available.

1. Ruby on Rails provides a consistent approach to build your web applications. If you have already experienced with other web development language or framework, you can understand, how tough it was process, you typically need to survey and ask with expert to choose your various software components to solve the common architectural problems of persistence,  build scripts, testing, logging, database setup, application configuration, web tier components and rest of software life cycle. Using the Ruby on Rails framework these decisions are already made for you, now you can spend more time to understanding software business problem and quickly build a working prototype. By using Rails you become productive in minutes not weeks or months.

2. Ruby on Rails follow CONVENTION OVER CONFIGURATION pragmatic philosophy, this apply in all layers of your software development architecture with the highest productivity gains noticeable in the relationship between the model and the database(ORB- Object Relationship Model). Once the developer understands the rules and constraints, Rails MVC magically connects your view to your controller and model, and your model to the database. That’s awesome .!! You do not have to write any script or tool to manage all this ==> MVC – Model View and Controller.

 

rubyonrails

3. When we talk about OOP’s, Ruby is a fully featured object-oriented language and in addition Ruby come with mix-ins modules which contain independent code to inject into your classes and block. Ruby is an extremely dynamic/run time language, which means that code can be generated and executed on the fly. It’s dynamic nature includes the definition of new classes & methods, as well as the overloading of operators etc. Apart from this you can re-open, redefine and removed existing classes on fly.

4. Unlike other web language and framework, rails has build in templating support, json/xml document and email service.

5. Rails comes with ActiveRecord, Association and ActiveModel(object relationship mapping), which provides seamlessly persisted interface to database like transactions, inheritance, validation, scope and caching.

6. Rails includes support for a variety of web technologies like JavaScript libraries, JQuery, REST, Embedded ruby, HAML, CoffeeScript etc. with configuration in development, test and production environments. If you are planing your application into Web 2.0 space, Rails provides a rich abstracted interface to implementing AJAX operations.

7. Most important rails gives us flexibilities to perform database migration and rollbacks between environments and across development until project at mature stage. However with the Rails framework you will be delighted with the implementation of database migrations for applying and rolling back database changes. You only need to enter your update and rollback scripts in Ruby, framework understands the current version & can move forwards or backwards to any database version.

8. Getting started with Rails is easy as generators/migration will propel you along. DRY(Don’t Repeat Yourself) principle of Rails encourage experience developer to write less code by using the metaprogramming features of Ruby. Overall less code to write means higher productivity, less bugs and minimum complexity.

I hope you convinced, Still doubt? Please go through below links:

http://www.skilledup.com/learn/programming/4-reasons-learn-ruby-first-programming-language/
http://www.techrepublic.com/blog/10-things/10-reasons-why-you-should-learn-ruby-on-rails/3060/
http://blog.teamtreehouse.com/reasons-why-every-web-designer-needs-to-learn-rails

http://articles.businessinsider.com/2011-05-11/tech/30035869_1_ruby-rails-custom-software

Have question? feel free to comment. :)

Why do people use App42PaaS when AWS is present?


Recently i came across question: Why do people use App42PaaS when AWS is present?

It’s really interesting :)

Firstly, let me tell you, AWS and App42PaaS are different kind of cloud service providers. There should not be any comparison between them as AWS provides IaaS(Infrastructure as a Service) where as App42PaaS provides PaaS(Platform as a Service).

Now you must thinking what are the differences between them. Right?

In very short, IaaS gives you instance of Virtual Machine where you need deploy your application on top of it. PaaS gives you an environment where you just push code with some basic configuration by choosing them.

Let’s talk in details:

AWS:

Now a days, people are used to refer IaaS as HaaS(Hardware as a Service) as name suggest, IaaS provide us hardware, servers and networking components including storage. Once you own the instance, its become your responsibilities for housing, running and maintaining it and you typically pays on a per-use basis.

amazon-aws-infographic

App42PaaS:

App42PaaS basically help developer to speed the development of app, saving money and most important innovating their applications and business instead of setting up configurations and managing things like servers and databases. Other features buying to use App42PaaS is the application deployment process such as agility, High Availability, Monitoring, Scale / Descale, limited need for expertise, easy deployment, and reduced cost and development time.

app42_PaaS

Hopefully, i answered above question, if still you have question let me know in the comments.

What is cloud computing? When to use a cloud?


Hi Friends, Sorry i was quite busy from previous couple of months So don’t get time for post. It’s really great experience working on cloud computing, basically on PaaS(Platform as a Service), BaaS(Backend as a Service) and IaaS(Infrastructure as a Service) with ShepHertz. I came across multiple questions, people asking about cloud computing segment. So i thought of write a blog on Cloud Computing.

cloud-computing-concepts
Let me explain cloud computing segments in details to understand Cloud Computing.

Cloud computing: Cloud computing is the practice of using a network of remote servers hosted on the Internet to store, manage, and process data, rather than a local server or a personal computer.

Cloud Computing Segment:

IaaS(Infrastructure as a Service) – Infrastructure as a Service is a provision model of cloud computing in which an organization outsources the equipment used to support operations, including storage, hardware, servers and networking components. The service provider owns the equipment and is responsible for housing, running and maintaining it. The client typically pays on a per-use basis. Ex- Amazon Web Services, BlueLock, Cloudscaling and Datapipe

whatisthecloudiaas

PaaS(Platform as a Service) – Platform as a Service is one of the GROWING sector of cloud computing. PaaS basically help developer to speed the development of app, saving money and most important innovating their applications and business instead of setting up configurations and managing things like servers and databases. In one line I can say Platform as a service (PaaS) automates the configuration, deployment and ongoing management of applications in the cloud. Ex: Heroku, EngineYard, App42 PaaS and OpenShift

government-ready-paas-300

SaaS(Software as a Service) – Software as a Service, SaaS is a software delivery method that provides access to software and its functions remotely as a Web-based service. Ex: Abiquo’s and Akamai

saas-in-the-cloud-logo

BaaS(Backed as a Service) – Backend as a service (BaaS), also known as “mobile backend as a service” (MBaaS),is a model for providing web and mobile app developers with a way to link their applications to backend cloud storage while also providing features such as user management, push notifications, and integration with social networking services. Exp: Kinvey, StackMob, App42 API and Parse

layer_4_slide_1

Hopefully this post makes it much easier to understand cloud computing. Let me know in the comments if you love it or find any difficulties to understand.

Setting up Unicorn with Nginx on Ruby on Rails


In this blog post, I am going to tell you, How to configure Unicorn web sever on top of Nginx. I Assume that you already installed Ruby and Ruby on Rails on your production OS(operating system) and a sample application working fine.!! If not, follow my previous blog post Setup Ruby On Rails on Ubuntu.

Nginx and Unicorn

To get you started, Let’s install Nginx first by using apt-get package manager.

$ sudo apt-get install nginx

Sometime you get ERROR because your machine packages are not upto date. Run apt-get update to downloads the package lists from the repositories and “updates” them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.

$ sudo apt-get update

Once your nignx will install, you command window will prompt:

Setting up nginx-full (1.2.1-2.2ubuntu0.1) ...
Setting up nginx (1.2.1-2.2ubuntu0.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for sgml-base ...
Updating the super catalog...

At this point switch to /etc/nginx/ and /etc/nginx/sites-available configuration directory and have a look to nginx.conf and default respective configuration file. It’s self explanatory under commented in-lines. If still you need more details. I will recommend you to check wiki.nginx for more info.

While the server configuration it’s always better to create separate user(which we have more control over than nobody) for security reasons and increased control by using below command:

$ sudo useradd -s /sbin/nologin -r nginx
$ sudo usermod -a -G web nginx

Starting/stopping/restarting Nginx is pretty straight forward.

$ sudo service nginx start/restart/stop

Now let’s install Unicorn, Unicorn is distributed as ruby gem So you can install vi ruby gem.

$ gem install unicorn

Once Unicorn installed successfully. We need to create two configuration file.

1.Replace /etc/nginx/sites-available/ default file with below code:

upstream shop {
  server unix:/tmp/unicorn.shop.sock fail_timeout=0;
}

server {
   listen 80;# default deferred;
   server_name localhost;
   root /var/www/shop/public;
   try_files $uri/index.html $uri @shop;

location @shop {
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   proxy_set_header Host $http_host;
   proxy_redirect off;
   proxy_pass http://shop;
}

error_page 500 502 503 504 /500.html;
  client_max_body_size 4G;
   keepalive_timeout 10;
}

2. Create a unicorn.config file in your Rails application configuration file with below code:

working_directory "/var/www/shop"
pid "/var/www/shop/tmp/pids/unicorn.pid"
stderr_path "/var/www/shop/log/unicorn.log"
stdout_path "/var/www/shop/log/unicorn.log"

listen “/tmp/unicorn.shop.sock”
worker_processes 2
timeout 30

You have to tweak a few things to set the right paths in above configuration. Change “/var/www/shop” with your rails application directory.

In my case my Rails application is in /var/www/ with shop name.

Before start your rails application, make sure to include unicorn gem in your Gemfile and run bundle to install all dependencies.

That’s all.