Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Anything new Rails 6?

Anything new Rails 6?

Rails 6 should have been released on April 30 at RailsConf 2019.
Instead of going over each and every new feature, we will take a more general look at the direction where Rails is heading and why do we need this new release that does not promise anything world-shaking.

Nikolay Sverchkov

June 02, 2019
Tweet

More Decks by Nikolay Sverchkov

Other Decks in Programming

Transcript

  1. #saintprubyconf @ssnickolay RAILS 2.0 Action Pack: Resources RESTful Action Pack:

    Multiview respond_to Action Pack: Security CRSF protection via protect_from_forgery Action Pack: Exception rescue_from
  2. #saintprubyconf @ssnickolay *RAILS 3.0: TRUE ActiveRecord 3.0.5 is twice as

    slow as ActiveRecord 2.3.2. In a simple benchmark within a clean rails framework it is 1.43 times slower.
  3. #saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ gem ‘octopus’ -- skip-action-text

    - - skip-action-mailbox Parallel testing Multi DB Action Text Action Mailbox
  4. #saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB = DB

    SHARDING = + + + VERTICAL OR HORIZONTAL PARTITIONING / REPLICATION
  5. #saintprubyconf @ssnickolay RAILS 6.0: MULTI DB RAILS DID NOT HAVE

    ADEQUATE* MULTI DB SUPPORT *https://github.com/ankane/multiverse
  6. #saintprubyconf @ssnickolay HOW ‘parallel_tests’ WORKS $ rspec $ rspec spec/group1

    $ rspec spec/group3 THE FINAL OUTPUT N PROCESSES $ rspec spec/group2
  7. BOTH! # default (as Github uses) parallelize(workers: 2, with: :processes)

    # or parallelize(workers: 2, with: :threads) RAILS 6.0: !||TESTING
  8. USE BETTER SOLUTION FOR SPEEDING UP TESTS TEST-PROF WE ARE

    WATCHING YOU github.com /palkan/test-prof
  9. #saintprubyconf @ssnickolay RAILS 6.0: BULK INSERTS # Insert multiple records,

    performing an upsert # when records have duplicate ISBNs Book.upsert_all([ { title: 'Rework', author: 'David', isbn: '1' }, { title: 'Eloquent Ruby', author: 'Russ', isbn: '1' } ], unique_by: { columns: %w[ isbn ] }) *gem ‘activerecord-import`
  10. #saintprubyconf @ssnickolay OSS PROJECT’S COMMUNITY I WANT FEATURE X DON'T

    TOUCH ANYTHING CAN I USE IT ON WINDOWS? YOU ARE DEVELOPING TOO SLOWLY. I LEAVE! AGAIN BREAKING CHANGES. GO TO HELL! YOUR DOCS IS OUT OF DATE. DOES NOT WORK WITH RUBY 1.9.3
  11. #saintprubyconf @ssnickolay OSS PROJECT’S COMMUNITY I WANT FEATURE X YOU

    ARE DEVELOPING TOO SLOWLY. I LEAVE! AGAIN BREAKING CHANGES. GO TO HELL! YOUR DOCS IS OUT OF DATE. DOES NOT WORK WITH RUBY 1.9.3 WE MISS YOU NICK CAN I USE IT ON WINDOWS?
  12. #saintprubyconf @ssnickolay OSS PROJECT’S COMMUNITY I WANT FEATURE X DON'T

    TOUCH ANYTHING YOU ARE DEVELOPING TOO SLOWLY. I LEAVE! AGAIN BREAKING CHANGES. GO TO HELL! YOUR DOCS IS OUT OF DATE. DOES NOT WORK WITH RUBY 1.9.3 DUKE NUKEM CAN I USE IT ON WINDOWS?