Search

Suggested keywords:
  • Java
  • Docker
  • Git
  • React
  • NextJs
  • Spring boot
  • Laravel

Ruby on Rails 8.0 Beta Released, Recommends SQLite in Production

  • Share this:

post-title

Ruby is an interpreted, high-level, general-purpose programming language developed by Yukihiro "Matz" Matsumoto from Japan. Ruby on Rails is a web application framework written in Ruby. Rails is a model–view–controller framework, providing default structures for a database, a web service, and web pages. 

Rails framework has in built support for Storing data in database, Caching the frequently used data / web pages, Job queue support to execute background jobs. All these tasks are essential for most of the web server applications and Rails used primarily PostgreSQL and MySQL for storage and queuing. Redis or Memcache for Caching. 

In 8.0, Rails started supporting SQLite for all its use-cases Caching, Storage and Queuing. SQLite is an embedded relational database written in C. Unlike client–server database management systems, the SQLite engine has no standalone processes with which the application program communicates. It is just a library and the application links to its project. 

SQLite has grown leaps and bounds in the last decade. SQLite recently introduced a feature FOR UPDATE SKIP LOCKED, which will avoid blocking and waiting on the locks. With this feature, Database can be used for job queue. SQLite is now comparable to PostgreSQL and MySQL and Rails makes big bet on it for all its use-cases. 

In this beta release, Rails introduced below new features primarily using SQLite and replaces the need of Redis. SQLite performance will be really good for small and medium web applications where the HTTP requests is around 500K and MySQL and PostgreSQL can be considered for larger web applications.

Solid Cable acts as the pubsub server to relay WebSocket messages from the application to clients connected to different processes. It is a database-backed Action Cable adapter that keeps messages in a table and continuously polls for updates.
 
Solid Cache is a database-backed Active Support cache store that let's you keep a much larger cache than is typically possible with traditional memory-only Redis or Memcached stores. It keeps the data in the SSD drive and manages to handle pretty large amount of data in the cache and also the data can live longer period in Cache.

Solid Queue is a DB-based queuing backend for Active Job, designed with simplicity and performance in mind. Solid Queue supports delayed jobs, concurrency controls, recurring jobs, pausing queues, numeric priorities per job, priorities by queue order, and bulk enqueuing (enqueue_all for Active Job's perform_all_later). 

Rails 8 comes preconfigured with Kamal 2 for deploying your application anywhere. Whether to a cloud VM or your own hardware. Kamal takes a fresh Linux box and turns it into an application or accessory server with just a single “kamal setup” command.

Editorial Team

About author
This article is published by our editorial team.