CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES

概要 元サイトの許諾を得て翻訳・公開いたします。 英語記事: Drive-by Active Storage advice | justin․searls․co 原文公開日: 2024/09/16 原著者: Justin Searls -- Test Doubleの共同創業者です 日本語タイトルは内容に即したものにしました。 参考: Active Storage の概要 - Railsガイド 今はカンファレンスの発表の準備中で、これまで私が積み重ねてきたアドバイスについて詳しく説明している余裕がありません。そういうわけで、いくつかのアドバイスを本記事にまとめておいて、スライドからリンクすることにします。 今日のお題はRuby on RailsのActive Storageです。Active Storageは、アプリケーションやデータベース・サーバーを詰まらせずに、写真や動画などのユーザー生
Ruby on Rails 8.0.0がリリースされました。 Rails 8.0: #NOBUILD, #NOPAAS, all-in on SQLite as a production database option with jobs, cache, and cable, new authentication generator, and so much more! Final release is out 🎉 https://t.co/qom10worLW — DHH (@dhh) November 7, 2024 リリース情報: Ruby on Rails — Rails 8.0: No PaaS Required 英語版Changelogをまとめて見るにはGItHubのリリースタグ↓が便利です。v8.0.0タグの日付は日本時間の2024/11/08 07:29でした。 Rele
こんにちは。サーバーサイドエンジニアの三村(@t_mimura39)です。 さて、Railsエンジニアの皆さんは非同期処理にどのようなライブラリを利用していますか? ちなみに弊社では Sidekiq を利用するプロジェクトが多いです。 tech.medpeer.co.jp 今回はRailsでの非同期処理ライブラリの新たな選択肢として誕生した「SolidQueue」について解説します。 github.com 目次 🆕 更新履歴 🆕 2024/09/12 🙋 はじめに 🙋 📝 SolidQueueとは 📝 🚀 SolidQueueの特徴 🚀 🔓 「FOR UPDATE SKIP LOCKED」 とは 🔓 🍀 4種類のアクターについて 🍀 起動方法 (おまけ)二つの起動モードについて 🚶 SolidQueue実装の歩き方 🚶 モデル アクター 🥞 SolidQueu
概要 元サイトの許諾を得て翻訳・公開いたします。 英語記事: Solid Queue & understanding UPDATE SKIP LOCKED - BigBinary Blog 原文公開日: 2024/01/23 原著者: Chirag Shah サイト: BigBinary Blog 日本語タイトルは内容に即したものにしました。 参考: 週刊Railsウォッチ20240117: Solid Queue: 37signalsによるActive Job向けDBベースのジョブバックエンド 🔗 Solid Queueについて 最近になって、37signalsがSolid Queueをオープンソースとして公開しました(関連記事)。 Solid QueueはActive Jobで利用できるクエリバックエンドであり、データベース上に構築されます(これと対照的に、SidekiqやResqu
The product https://joinmastodon.org Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, and video. All Mastodon servers are interoperable as a federated network. Open source The project is open source at https://github.com/mastodon/mastodon License
Rails 7.1の注目ポイント: 新規RailsアプリケーションでDockerfilesを生成するようになった ActiveRecord::Base.normalizesを追加 ActiveRecord::Base.generates_token_forを追加 複数ジョブを一括エンキューするperform_all_later 複合主キー Trilogy用アダプタの導入 ActiveSupport::MessagePackを追加 config.autoload_libとconfig.autoload_lib_onceを追加(拡張オートローディング用) 汎用の非同期クエリ用Active Record API ビューテンプレートに厳密なlocalsを設定可能になった Rails.application.deprecatorsを追加 JSONのresponse.parsed_bodyのパターンマ
先日、携わっているサービスで一番大きいRailsアプリをRuby 3.2にアップデートし、YJITを有効化できました。 方針を検討した結果、今回はRails 6.1およびPsych 3系のままRuby 3.2にアップデートする戦略をとったため、その手順をまとめます。 先週にメインのサービスをRuby 3.2にしてYJITを有効にできました! 実際に速くなったし嬉しい大YJIT記念日だ🎉 https://t.co/Wkhc6fDfj9 — Hiroshi Shimoju (@shimoju_) July 19, 2023前提#今回のRailsアプリはサービスの機能がほぼすべて詰まっているモノリスで、歴史も8年と比較的長いです。 アップデート前のバージョンはRuby 3.0、Rails 6.1で、Psychは3系。 正攻法では、おおむね以下の手順でアップデートを進めていくことになります。 R
While these fixes moved the needle, they had limitations. By analyzing our database traffic, we learned that writes— like gathering, updating, or deleting data—contributed to a significant portion of database utilization. Additionally, not all reads or data fetching could be moved to replicas due to application sensitivity to replication lag. So, from both a read and write perspective, we still ne
Learn how to transform your snail-paced Rails app into a sub-100 millisecond powerhouse. The Complete Guide to Rails Performance is a full-stack course that gives you the tools to make your Ruby on Rails applications faster and more delightful for users, scale better and for less money, and take less effort to maintain. 3rd Edition: Updated for Rails 5 through Rails 7.1 Why is your Rails applicati
Modular MonolithというアーキテクチャをRailsアプリケーションへ適用する記事を読みました。 medium.com モノリスアーキテクチャとマイクロサービスアーキテクチャの中間に位置する、一つのモノリシックなアプリケーション内でドメインごとにモジュールに分解しつつ運用するためのアーキテクチャを、Railsでどのように実装するか、という内容です。 Modular Monolithとは 記事から引用します。 Rather than extracting microservices, we decided to first focus on making our app modular. Our goal was to identify good architectural boundaries before we extracted code out into independ
One of the hardest things about building a startup is handling the rapid growth in team and technology. The best way to build software with a team of three engineers is different than with ten engineers, or twenty, or fifty. Make a change to your process today, and you’re doing it too soon. Wait until tomorrow, and it feels too late. We’ve been mindful of this while building Root. When we started
この記事は現時点(2021-04-28)のrails/railsのmainブランチの最新のコミットでテストしています。 TL;DR invert_whereはすべてのwhereをinvertする 使い方によっては意図しない条件をinvertして危険 invert_whereとは invert_whereは、Rails 7でActiveRecord::Relationに追加される予定のメソッドです。 このメソッドは、relationにチェーンして呼び出すことで、それまでのwhereの条件を反転できます。 つまり次のようになります。(CHANGELOGから引用) class User scope :active, -> { where(accepted: true, locked: false) } end User.active # ... WHERE `accepted` = 1 AND
Resqueのworker上で実行されるコードが古いまま更新されないというような問題があって、意味もわからず書いたコードでなんとかその場を収めたんだけど、気持ち悪いのでRailsでいかにしてコードが更新されるのか調べてみることにした。 TL;DR 未定義の定数が参照されると、ActiveSupport::ModuleConstMissingによって拡張されたModule#const_missingが呼ばれる。命名規則に基いて定数名からファイル名が推測され、autoload_pathsに存在するファイルを見つける。そのファイルがロード済みであればそこで終了。ロード済みでなければKernel.loadでロードし、ロードされた定数は配列で管理される。 development環境では、Railsのmiddleware stackにActionDispatch::Reloaderというmiddlew
You can tell Ruby on Rails to respond to changes in certain files during development. Rails knows to watch config/routes.rb for changes and reload them when the files change. You can use the same mechanism to watch other files and take action when they change. I used this feature for react-rails server rendering and for GraphQL::Pro static queries. app.reloader Every Rails app has a @reloader, whi
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く