Rupher
Aleksandr Simonov
Aleksandr Simonov
Developer

DBA

DevOps

TechAddict

Owner
James Gosling
Java
Ken Thompson & Dennis Ritchie
UNIX
John McCarthy
Lisp
Larry Wall
Perl
Matz && RMS
Ruby and GNU
Ryan Dahl
Node.js
Rob Pike
Plan9, UTF-8, Go
Ruby
• Dynamic

• Object-Oriented

• Dynamic Typing 

• Metaprogramming

• Block syntax
Ruby’s Unicorns
Gopher’s Bullets
What to choose?!
Ruby?
•ORM

•DSL

•Fast Development

•Pure performance
Go?
•Strict types

•Compiled binary

•Blazing fast

•Slow development
BOTH!
WHY BOTH?!!
Web Application
• HTTP Routes

• Database

• Assets Compilation

• Background Jobs

• Export/Import Data

• Deployment
HTTP Routes
• GET

• POST

• PUT

• DELETE
HTTP Routes
• JSON Parsing much faster on Go

• XML Parsing much faster on Go

• Go can process request in goroutine
Database
• INSERT

• SELECT

• UPDATE

• MIGRATIONS
Database
• SQL Drivers is very fast

• Database pools helpful

• Bulk Insert will help you Luke!
Database
MIGRATIONS in Go so UGLYYYY
-- +goose Up
CREATE TABLE post (
id int NOT NULL,
title text,
body text,
PRIMARY KEY(id)
);
-- +goose Down
DROP TABLE post;
class CreateAccounts < ActiveRecord::Migration[5.1]
def change
create_table :post do |t|
t.text :title
t.text :body
end
end
end
Sequel.migration do
change do
create_table(:post) do
primary_key :id
column :title,:text
column :body, :text
end
end
end
Assets Compilation
• JavaScript/CoffeeScript/TypeScript

• CSS/LESS/SASS

• Handlebars/Mustache

• Gzipping
Assets Compilation
• Sprockets is Ugly

• Gulp is Ugly

• Browserify is Ugly

• WebPack is Not Ugly YET :)
Background Jobs
• Database queue

• Redis queue

• RabbitMQ queue
Background Jobs
• DelayedJob is slow

• Resque is fork based

• Sidekiq is memory eat monster
Background Jobs
• Goworker is Resque compatible

• Go-Workers is Sidekiq compatible

• Your own queue via channels
Export/Import Data
• DSL is your power

• Metaprogramming is your crown

• Pipes is your horse
Deployment
• Docker

• Dokku

• Flynn

• Docker-Compose
Rupher

Rupher