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.

02/07/2019 Microservices in Ruby and Amazon Lambda - presentation from Spark Academy 2018: Ruby on Rails Workshops

85 views

Published on

Apply here:
https://spark-solutions.workable.com/jobs/833497

What?
Recurring 2-hour workshops on Thursday at 18.30 in Spark’s office at Jasna 15 (started on October 25th) and happening every week, according to the schedule. Each workshop will have separate topic and consist of a live coding session / devops with some homework for the participants, to be submitted for review and feedback (not mandatory).

For whom?
For Junior and Mid RoR developers

Why?
Free RoR workshops with Senior Developers on interesting topics - improve your dev skills, gain some experience, make new friends!

Mentors
Piotr Leniec - Senior Fullstack Dev at Spark Solutions
Yuriy Kushnir - Senior RoR Dev at Spark Solutions
Bogusław Tolarz - Senior RoR Dev at Spark Solutions
Nathaniel Nande - Senior RoR Dev at Spark Solutions
Alexey Suslyakov - Senior RoR Dev at Spark Solutions
Przemysław Kossakowski - Ruby backend developer at Spark Solutions
Sergey Vygovsky - Senior RoR Dev at Spark Solutions

How to enroll?
1. Book some time
2/ Complete an evaluation task: Create a simple URL shortener using Rails or any other Ruby Web Framework and deploy it to Heroku.The user should be able to paste a link of any length and convert it to a short 8-character URL. Provide a link to Github / BitBucket repo & a link to a deployed website on Heroku.
3. Submit your application with a link to your task solution
4. Wait a bit for our reply
5. Code!

Seats are limited, so apply now! We’ll be selecting the most promising candidates.

Schedule & Topics*
Completed workshops:
02/07/2019 Microservices in Ruby and Amazon Lambda
10/25/2018 PORO objects & their usage
11/8/2018 AWS/Heroku/DevOps
11/22/2018 Railway Oriented Programming
12/6/2018 Newest Rails Features
01/10/2019 Rails Performance Optimization
01/24/2019 Payment Provider Integration

* Some workshops will be delivered in English

Apply TODAY! Number of seats is limited. Snacks and drinks are on us :)
https://spark-solutions.workable.com/jobs/833497

Published in: Internet
  • Be the first to comment

  • Be the first to like this

02/07/2019 Microservices in Ruby and Amazon Lambda - presentation from Spark Academy 2018: Ruby on Rails Workshops

  1. 1. goo.gl/NcqrBp
  2. 2. Microservices in Ruby and Amazon Lambda !2 goo.gl/NcqrBp
  3. 3. (…) the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. Martin Fowler https://martinfowler.com/articles/microservices.html !3
  4. 4. WAT? MONOLITH React (webpacker) Cart Catalog Tax calculations Promo calculations React (webpack) CART CATALOG TAX CALCULATIONS PROMO CALCULATIONS !4
  5. 5. Pros • Simple • Decentralized • Isolation • Super fast deployments • Few small teams • Few small apps instead of one monolith • Many technologies !5
  6. 6. • Simple • Decentralized • Isolation • Super fast deployments • Few small teams • Few small apps instead of one monolith • Many technologies Cons • Simple • Decentralized - many monitoring tools • Isolation - many config files • Super fast deployments - but many • Few small teams • Few small apps instead of one monolith • Many technologies !6
  7. 7. scalability Optimize your app !7
  8. 8. File.open do while row = csv.shift end https://dalibornasevic.com/posts/68-processing-large-csv-files-with-ruby File.read('data.csv') while row = csv.shift 1 mln row csv Time: 9.73 Memory: 74.64 MB Time: 9.88 Memory: 0.58 MB !8
  9. 9. Communication • HTTP • Redis • RabbitMQ • Mail ¯_(ツ)_/¯ !9
  10. 10. Payload { JSON } APP SERVICE !10
  11. 11. Example 1 APP QUEUE SERVICE 0 QUEUE SERVICE 1 QUEUE SERVICE 2 !11
  12. 12. Example 1 APP SERVICE 0 QUEUE SERVICE 1 SERVICE 2 !12
  13. 13. Amazon Lambda since 29 NOV 2018 !13
  14. 14. Serverless WOW!!! * in my opinion !14
  15. 15. Serverless APP development Company • Deployment scripts • Server configuration • Server security • Hardware • Other devops stuff Outside !15
  16. 16. Communication • API Gateway • AWS IoT • Application Load Balancer • CloudWatch Events • CloudWatch Logs • CodeCommit • Cognito Sync Trigger • DynamoDB • Kinesis • S3 • SNS • SQS SERVICE In lambda !16
  17. 17. Deployment • Inline editor • Zip file • File from s3 • AWS cli !17
  18. 18. Debugging • AWS Cloud Watch • AWS Kinesis • Offline debugging
  19. 19. Do I need microservices?
  20. 20. Sidekiq !20 MONOLITH React (webpacker) Cart Catalog Tax calculations Promo calculations App CART CATALOG TAX CALCULATIONS PROMO CALCULATIONS SIDEKIQ
  21. 21. Questions? !21
  22. 22. • http://howtocookmicroservices.com • https://martinfowler.com/articles/microservices.html • https://dalibornasevic.com/posts/68-processing-large-csv- files-with-ruby • https://aws.amazon.com/blogs/compute/announcing-ruby- support-for-aws-lambda/ • http://rubyonjets.com/ !22
  23. 23. require 'json' def lambda_handler(event:, context:) { statusCode: 200, body: event['a'].to_i + event['b'].to_i } end { "a": "1", "b": "2" } Code Test json
  24. 24. require 'json' def lambda_handler(event:, context:) data = JSON.parse(event['body']) { statusCode: 200, body: data['a'].to_i + data['b'].to_i } end Fixed code
  25. 25. require 'json' def lambda_handler(event:, context:) if event['body'] data = JSON.parse(event['body']) else data = event end { statusCode: 200, body: data['a'].to_i + data['b'].to_i } end Fixed code v2

×