Background Jobs in Rails with SolidQueue

preview_player
Показать описание
In this episode we will setup SolidQueue in our Rails app. So that we can use our database as a job queue for our background workers.

--

Follow along to watch us build a Rails / SaaS / B2C app from the ground up.

Twitter
Рекомендации по теме
Комментарии
Автор

when you query from a database you are not necessarily reading from the disk, the database has an optimization engine and if there are queries that satisfy certain criteria the db will cache stuff in memory.

the main reason why people don't use DBs as an in-memory cache is because we usually don't put them in the same machine as the application so the biggest penalty is paid even if the data is held in ram, the penalty of network latency.

DHH point is to use sqlite in the same machine until you need to scale the DB or the app itself and thus have the sqlite process hold the db in-memory and you will get very close performance to Redis, enough to satisfy the needs for your app, is not like ruby is capable to squeeze all the juice from Redis to begin with.

laughingvampire