Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Rupher

133 views

Published on

Rupher = Ruby+Gopher. Why Ruby and Go can't live without each other, what is the reason and how they complement each other.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Rupher

  1. 1. Rupher Aleksandr Simonov
  2. 2. Aleksandr Simonov Developer DBA DevOps TechAddict Owner
  3. 3. James Gosling Java
  4. 4. Ken Thompson & Dennis Ritchie UNIX
  5. 5. John McCarthy Lisp
  6. 6. Larry Wall Perl
  7. 7. Matz && RMS Ruby and GNU
  8. 8. Ryan Dahl Node.js
  9. 9. Rob Pike Plan9, UTF-8, Go
  10. 10. Ruby • Dynamic • Object-Oriented • Dynamic Typing • Metaprogramming • Block syntax
  11. 11. Ruby’s Unicorns
  12. 12. Gopher’s Bullets
  13. 13. What to choose?!
  14. 14. Ruby? •ORM •DSL •Fast Development •Pure performance
  15. 15. Go? •Strict types •Compiled binary •Blazing fast •Slow development
  16. 16. BOTH!
  17. 17. WHY BOTH?!!
  18. 18. Web Application • HTTP Routes • Database • Assets Compilation • Background Jobs • Export/Import Data • Deployment
  19. 19. HTTP Routes • GET • POST • PUT • DELETE
  20. 20. HTTP Routes • JSON Parsing much faster on Go • XML Parsing much faster on Go • Go can process request in goroutine
  21. 21. Database • INSERT • SELECT • UPDATE • MIGRATIONS
  22. 22. Database • SQL Drivers is very fast • Database pools helpful • Bulk Insert will help you Luke!
  23. 23. Database MIGRATIONS in Go so UGLYYYY
  24. 24. -- +goose Up CREATE TABLE post ( id int NOT NULL, title text, body text, PRIMARY KEY(id) ); -- +goose Down DROP TABLE post;
  25. 25. class CreateAccounts < ActiveRecord::Migration[5.1] def change create_table :post do |t| t.text :title t.text :body end end end
  26. 26. Sequel.migration do change do create_table(:post) do primary_key :id column :title,:text column :body, :text end end end
  27. 27. Assets Compilation • JavaScript/CoffeeScript/TypeScript • CSS/LESS/SASS • Handlebars/Mustache • Gzipping
  28. 28. Assets Compilation • Sprockets is Ugly • Gulp is Ugly • Browserify is Ugly • WebPack is Not Ugly YET :)
  29. 29. Background Jobs • Database queue • Redis queue • RabbitMQ queue
  30. 30. Background Jobs • DelayedJob is slow • Resque is fork based • Sidekiq is memory eat monster
  31. 31. Background Jobs • Goworker is Resque compatible • Go-Workers is Sidekiq compatible • Your own queue via channels
  32. 32. Export/Import Data • DSL is your power • Metaprogramming is your crown • Pipes is your horse
  33. 33. Deployment • Docker • Dokku • Flynn • Docker-Compose

×