{"id":3427,"date":"2022-12-07T10:33:06","date_gmt":"2022-12-07T10:33:06","guid":{"rendered":"http:\/\/the-codest.localhost\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/"},"modified":"2026-03-09T13:04:35","modified_gmt":"2026-03-09T13:04:35","slug":"dozvedet-se-vice-o-ruby-on-rails-s-pub-sub","status":"publish","type":"post","link":"https:\/\/thecodest.co\/cs\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/","title":{"rendered":"Dal\u0161\u00ed informace o Ruby on Rails s funkc\u00ed Pub\/Sub"},"content":{"rendered":"<p><strong><a href=\"https:\/\/thecodest.co\/cs\/case-studies\/providing-a-team-of-ruby-developers-for-a-fintech-company\/\">Ruby<\/a> na adrese <a href=\"https:\/\/thecodest.co\/cs\/blog\/ways-to-increase-your-rails-performance\/\">Rails<\/a><\/strong> (Kolejnice, <a href=\"https:\/\/thecodest.co\/cs\/blog\/hire-ror-developer\/\">RoR<\/a>) je dob\u0159e zn\u00e1m\u00fd <a href=\"https:\/\/thecodest.co\/cs\/blog\/find-your-ideal-stack-for-web-development\/\">web<\/a> aplika\u010dn\u00ed r\u00e1mec napsan\u00fd v jazyce <strong>Ruby<\/strong> programovac\u00ed jazyk. <strong>Hospoda\/podnik<\/strong> je zkr\u00e1cen\u00fd n\u00e1zev n\u00e1vrhov\u00fdch vzor\u016f softwaru, kter\u00e9 se naz\u00fdvaj\u00ed <b>Publish-subscribe<\/b>. Vysv\u011btl\u00edm, jak by se komunikace mezi softwarov\u00fdmi komponentami v syst\u00e9mu Rails dala \u0159e\u0161it pomoc\u00ed Pub\/Sub.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Co je Pub\/sub?<\/h2>\n\n\n\n<p><strong>Pub\/sub<\/strong> je n\u00e1vrhov\u00fd vzor softwaru zaji\u0161\u0165uj\u00edc\u00ed komunikaci mezi slu\u017ebami. Slu\u017eba<br>zahrnuje jednu ze dvou rol\u00ed: vydavatele (kter\u00fd produkuje) nebo p\u0159\u00edjemce (kter\u00fd spot\u0159ebov\u00e1v\u00e1). Co je<br>je ur\u010den jako ud\u00e1lost, zpr\u00e1va nebo ozn\u00e1men\u00ed. V<br>V kontextu tohoto \u010dl\u00e1nku se tyto pojmy pou\u017e\u00edvaj\u00ed zam\u011bniteln\u011b a ozna\u010duj\u00ed tot\u00e9\u017e.<br>Slu\u017eba, kter\u00e1 vyr\u00e1b\u00ed, nev\u00ed, kdo spot\u0159ebov\u00e1v\u00e1. Slu\u017eba, kter\u00e1 spot\u0159ebov\u00e1v\u00e1, nev\u00ed.<br>zn\u00e1t p\u016fvod zpr\u00e1vy. Mohou z\u016fstat navz\u00e1jem nezn\u00e1m\u00e9. T\u00edm se li\u0161\u00ed od<br>fronty zpr\u00e1v, kde komponenta, kter\u00e1 zpr\u00e1vu odes\u00edl\u00e1, \u010dasto zn\u00e1 jej\u00ed c\u00edl.<br>- tento styl zas\u00edl\u00e1n\u00ed zpr\u00e1v umo\u017e\u0148uje pos\u00edlat zpr\u00e1vy odkudkoli. Tento mechanismus je z\u00e1kladem<br>z <strong>Pub\/sub<\/strong> a to znamen\u00e1, \u017ee jsou odd\u011blen\u00e9.<\/p>\n\n\n\n<p>Aby mohli vyj\u00e1d\u0159it sv\u00e9 spole\u010dn\u00e9 z\u00e1jmy, mus\u00ed m\u00edt spole\u010dn\u00e9 porozum\u011bn\u00ed. Proto,<br>Ob\u011b role maj\u00ed implicitn\u00ed mechanismus hole, kde producent zpr\u00e1vy a<br>spot\u0159ebitele zpr\u00e1vy splnit. Tento mechanismus se naz\u00fdv\u00e1 subjekt, odb\u011br nebo t\u00e9ma. Je to<br>zodpov\u011bdn\u00fd za kategorizaci zpr\u00e1v subjekt\u016fm, je to v podstat\u011b bezstavov\u00fd filtr zpr\u00e1v.<br>T\u00e9mata funguj\u00ed jako vys\u00edlac\u00ed stanice. Vydavatel vytv\u00e1\u0159\u00ed zpr\u00e1vu pro t\u00e9ma,<br>odb\u011bratel\u00e9 okam\u017eit\u011b obdr\u017e\u00ed zpr\u00e1vu z t\u00e9matu. Vzhledem k odd\u011blen\u00e9<br>slu\u017eeb je nejefektivn\u011bj\u0161\u00edm zp\u016fsobem v\u00fdm\u011bny zpr\u00e1v jejich asynchronn\u00ed zpracov\u00e1n\u00ed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Kolejnice bez Pub\/Sub<\/h2>\n\n\n\n<p>Ve v\u00fdchoz\u00edm nastaven\u00ed nen\u00ed v syst\u00e9mu Rails \u017e\u00e1dn\u00e1 re\u017eie pro n\u00e1vrhov\u00e9 vzory softwaru pro p\u0159ed\u00e1v\u00e1n\u00ed zpr\u00e1v mezi komponentami. V\u00fdvoj\u00e1\u0159i pou\u017e\u00edvaj\u00ed standardn\u00ed <strong>objektov\u011b orientovan\u00e9 programov\u00e1n\u00ed<\/strong> (<a href=\"https:\/\/thecodest.co\/cs\/dictionary\/object-oriented-programming-oop\/\">OOP<\/a>) paradigma: p\u0159ed\u00e1v\u00e1n\u00ed parametr\u016f funkc\u00edm, dotazov\u00e1n\u00ed se na t\u0159\u00eddy o hodnot\u00e1ch.<\/p>\n\n\n\n<p>Pokud je \u017e\u00e1dost pom\u011brn\u011b nekomplikovan\u00e1, m\u016f\u017ee to sta\u010dit. Kdy\u017e se aplikace rozroste, nap\u0159\u00edklad je t\u0159eba n\u011bkter\u00e9 operace prov\u00e1d\u011bt asynchronn\u011b, pak je t\u0159eba pou\u017e\u00edt tzv. <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/why-do-projects-fail\/\">projekt<\/a> pot\u0159ebuje abstrakci, kter\u00e1 \u0159e\u0161\u00ed, \u017ee <a href=\"https:\/\/thecodest.co\/cs\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">data<\/a> pracovn\u00ed postup. M\u00edsto vynal\u00e9z\u00e1n\u00ed kola mohou v\u00fdvoj\u00e1\u0159i implementovat <strong>Pub\/sub<\/strong> aby tento nedostatek abstrakce vyplnil.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">V\u00fdhody Pub\/Sub s Rails<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Vyhn\u011bte se zp\u011btn\u00fdm vol\u00e1n\u00edm aktivn\u00edho z\u00e1znamu.<\/li>\n\n\n\n<li>P\u0159id\u00e1n\u00edm asynchronn\u00edho paraleln\u00edho zpracov\u00e1n\u00ed do syst\u00e9mu se zv\u00fd\u0161\u00ed v\u00fdkon, spolehlivost a efektivita. <a href=\"https:\/\/thecodest.co\/cs\/blog\/difference-between-elasticity-and-scalability-in-cloud-computing\/\">\u0161k\u00e1lovatelnost<\/a> jsou vylep\u0161eny.<\/li>\n\n\n\n<li>Zpr\u00e1vy lze vys\u00edlat asynchronn\u011b do r\u016fzn\u00fdch \u010d\u00e1st\u00ed syst\u00e9mu.<\/li>\n\n\n\n<li>Umo\u017e\u0148uje asynchronn\u00ed vys\u00edl\u00e1n\u00ed zpr\u00e1v do r\u016fzn\u00fdch \u010d\u00e1st\u00ed syst\u00e9mu.<\/li>\n\n\n\n<li>Odd\u011blen\u00ed - p\u0159id\u00e1n\u00ed nebo zm\u011bna funkce nebude m\u00edt na nic vliv, proto\u017ee Pub\/Sub<br>umo\u017e\u0148uje upravit zp\u016fsob interakce.<\/li>\n\n\n\n<li>Spot\u0159ebitel zpr\u00e1v ji\u017e nebude muset pravideln\u011b kontrolovat aktualizace nebo nov\u00e9 zpr\u00e1vy.<br>informace. Sni\u017euje zpo\u017ed\u011bn\u00ed p\u0159i doru\u010dov\u00e1n\u00ed, kter\u00e9 m\u016f\u017ee b\u00fdt problematick\u00e9 zejm\u00e9na v syst\u00e9mech.<br>bez tolerance ke zpo\u017ed\u011bn\u00ed.<\/li>\n\n\n\n<li>Po\u010det \u00fa\u010dastn\u00edk\u016f, kter\u00e9 syst\u00e9m zvl\u00e1dne, nen\u00ed omezen, proto\u017ee se m\u016f\u017ee m\u011bnit,<br>kdykoli upgradovat, mno\u017eit nebo zanikat.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Nev\u00fdhody Pub\/Sub s Rails<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hlavn\u00ed nev\u00fdhodou syst\u00e9m\u016f Pub\/sub je jejich odd\u011blen\u00ed vydavatele od vydavatele.<br>p\u0159edplatitel.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Rails Pub\/Sub p\u0159edstavit<\/h2>\n\n\n\n<p>P\u0159\u00edklady zdrojov\u00fdch k\u00f3d\u016f v Rails byly naps\u00e1ny pomoc\u00ed knihovny<br><a href=\"https:\/\/github.com\/stevo\/pubsub_on_rails\" rel=\"nofollow\">Pub\/Sub on Rails<\/a> (v nomenklatu\u0159e Ruby se knihovna naz\u00fdv\u00e1 gem): Dal\u0161\u00ed podrobnosti najdete v readme gemu. Implementace se skl\u00e1d\u00e1 z modul\u016f:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Dom\u00e9na,<\/li>\n\n\n\n<li>Ud\u00e1lost,<\/li>\n\n\n\n<li>Obsluha ud\u00e1losti,<\/li>\n\n\n\n<li>Vydavatel akce,<\/li>\n\n\n\n<li>P\u0159edplatn\u00e9.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Dom\u00e9na<\/h3>\n\n\n\n<p>Popisuje obchodn\u00ed logiku, aby poskytla kontext pro Pub\/Sub, a t\u00edm umo\u017enila \u010distou pr\u00e1ci s daty. <a href=\"https:\/\/thecodest.co\/cs\/dictionary\/what-is-code-refactoring\/\">k\u00f3d<\/a>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"> modul Ozn\u00e1men\u00ed\n   extend PubSub::Domain\n end<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"> modul Zpr\u00e1vy\n   roz\u0161\u00ed\u0159it PubSub::Domain\n end\n\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Ud\u00e1lost<\/h3>\n\n\n\n<p>Jedn\u00e1 se o t\u0159\u00eddu, kter\u00e1 popisuje, co se stalo. N\u00e1zev t\u0159\u00eddy deklarujte jako sebepopisn\u00fd s t\u00edm, co se stalo, nap\u0159\u00edklad: zru\u0161eno, zm\u011bn\u011bno, vytvo\u0159eno, zni\u010deno, odesl\u00e1no, aktualizov\u00e1no. N\u00e1zvy ud\u00e1lost\u00ed mohou vypadat nap\u0159: ProfitAndLossStatementCreatedEvent, co\u017e znamen\u00e1, \u017ee byl vytvo\u0159en finan\u010dn\u00ed v\u00fdkaz.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\"> t\u0159\u00edda Reports::ProfitAndLossStatementCreatedEvent &lt; PubSub::DomainEvent\n   atribut :profit_and_loss_statement_id, Types::Strict::Integer\n end<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Vydavatel ud\u00e1losti<\/h3>\n\n\n\n<p>T\u0159\u00edda schopn\u00e1 vys\u00edlat ud\u00e1losti. P\u0159\u00edklad ukazuje vytvo\u0159en\u00ed servisn\u00ed zpr\u00e1vy. Po \u00fasp\u011b\u0161n\u00e9m vytvo\u0159en\u00ed sestavy emituje ud\u00e1lost vytvo\u0159en\u00ed t\u00e9to sestavy.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">t\u0159\u00edda Reports::ProfitAndLossStatementService\n   include PubSub::Emit\n    def execute\n     emit(:report_profit_and_loss_statement_created, profit_and_loss_statement_id: id) if result.ok?\n   end\n end<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Obsluha ud\u00e1losti<\/h3>\n\n\n\n<p>Tato t\u0159\u00edda by m\u011bla b\u00fdt spu\u0161t\u011bna v reakci na zpracov\u00e1n\u00ed ud\u00e1losti.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"ruby\" class=\"language-ruby\">modul Ozn\u00e1men\u00ed\n t\u0159\u00edda ReportsProfitAndLossStatementCreatedHandler &lt; PubSub::DomainEventHandler\n   def call\n     ReportMailer.profit_and_loss_statement(profit_and_loss_statement).deliver_now\n   end\n\n   private\n\n   def profit_and_loss_statement\n     ProfitAndLossStatement.find(event_data.profit_and_loss_statement_id)\n   end\n end\nend<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">P\u0159edplatn\u00e9<\/h3>\n\n\n\n<p>Ud\u00e1losti jsou spojeny se sv\u00fdmi zpracovateli prost\u0159ednictv\u00edm odb\u011br\u016f.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"yaml\" class=\"language-yaml\">ozn\u00e1men\u00ed:\n reports__profit_and_loss_statement_created: async<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">P\u0159\u00edklady pou\u017eit\u00ed:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Funkce \"Sledovat\" v soci\u00e1ln\u00edch s\u00edt\u00edch,<\/li>\n\n\n\n<li>Internet v\u011bc\u00ed,<\/li>\n\n\n\n<li>Po\u0161tovn\u00ed z\u00e1silky,<\/li>\n\n\n\n<li>Upozorn\u011bn\u00ed na vygenerovan\u00e9 soubory.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Podobn\u00e9 vzory<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><b>EventBus<\/b> - komponenty mohou pos\u00edlat ud\u00e1losti do sb\u011brnice EventBus, ani\u017e by v\u011bd\u011bly, kdo je vyzvedne nebo kolik respondent\u016f je vyzvedne. <a href=\"https:\/\/thecodest.co\/cs\/blog\/react-development-all-you-have-to-know\/\">reagovat<\/a>,<\/li>\n\n\n\n<li><b>Pozorovatel<\/b> - subjekt udr\u017euje seznam z\u00e1visl\u00fdch osob, tzv. pozorovatel\u016f, a oznamuje jim, kdykoli se zm\u011bn\u00ed jejich stav,<\/li>\n\n\n\n<li><b>Sdru\u017eov\u00e1n\u00ed<\/b> - p\u0159i dotazov\u00e1n\u00ed se klienti pravideln\u011b ptaj\u00ed syst\u00e9mu, zda jsou k dispozici nov\u00e9 ud\u00e1losti nebo data.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Drahokamy<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\n<p><a href=\"https:\/\/github.com\/edisonywh\/rocketman\" rel=\"nofollow\">https:\/\/github.com\/edisonywh\/rocketman<\/a><\/p>\n<\/li>\n\n\n\n<li>\n<p><a href=\"https:\/\/github.com\/krisleech\/wisper\" rel=\"nofollow\">https:\/\/github.com\/krisleech\/wisper<\/a><\/p>\n<\/li>\n\n\n\n<li>\n<p><a href=\"https:\/\/github.com\/stevo\/pubsub_on_rails\" rel=\"nofollow\">https:\/\/github.com\/stevo\/pubsub<em>na adrese<\/em>kolejnice<\/a><\/p>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Souhrn<\/h2>\n\n\n\n<p>Pub\/sub nen\u00ed v Ruby in Rails b\u011b\u017en\u00fd p\u0159\u00edstup. Jak bylo p\u0159edstaveno v \u010dl\u00e1nku, tento vzor m\u016f\u017ee projektu p\u0159in\u00e9st mnoho v\u00fdhod - d\u00edky n\u011bmu je k\u00f3d \u010dist\u00fd, slu\u017eby jsou odd\u011blen\u00e9 a snadno \u0161k\u00e1lovateln\u00e9.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/thecodest.co\/contact\"><img decoding=\"async\" src=\"\/app\/uploads\/2024\/05\/interested_in_cooperation_.png\" alt=\"banner spolupr\u00e1ce\"\/><\/a><\/figure>","protected":false},"excerpt":{"rendered":"<p>Pub\/Sub m\u016f\u017ee projektu p\u0159in\u00e9st mnoho v\u00fdhod - m\u016f\u017ee zajistit \u010distotu k\u00f3du, odd\u011blit slu\u017eby a umo\u017enit jejich snadn\u00e9 \u0161k\u00e1lov\u00e1n\u00ed. V n\u00e1sleduj\u00edc\u00edm \u010dl\u00e1nku se dozv\u00edte v\u00edce o Pub\/Sub a zv\u00fd\u0161\u00edte \u00farove\u0148 sv\u00e9ho projektu!<\/p>","protected":false},"author":2,"featured_media":3428,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[12],"class_list":["post-3427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development","tag-it"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Learn More about Ruby on Rails with Pub\/Sub - The Codest<\/title>\n<meta name=\"description\" content=\"Explore the Pub\/Sub design pattern in Ruby on Rails and see how it enables event-driven communication and scalable system architecture.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/cs\/blog\/dozvedet-se-vice-o-ruby-on-rails-s-pub-sub\/\" \/>\n<meta property=\"og:locale\" content=\"cs_CZ\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn More about Ruby on Rails with Pub\/Sub\" \/>\n<meta property=\"og:description\" content=\"Explore the Pub\/Sub design pattern in Ruby on Rails and see how it enables event-driven communication and scalable system architecture.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/cs\/blog\/dozvedet-se-vice-o-ruby-on-rails-s-pub-sub\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-07T10:33:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-09T13:04:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_on_rails_with_pubsub.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"thecodest\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"thecodest\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/\"},\"author\":{\"name\":\"thecodest\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\"},\"headline\":\"Learn More about Ruby on Rails with Pub\\\/Sub\",\"datePublished\":\"2022-12-07T10:33:06+00:00\",\"dateModified\":\"2026-03-09T13:04:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/\"},\"wordCount\":778,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_on_rails_with_pubsub.png\",\"keywords\":[\"IT\"],\"articleSection\":[\"Software Development\"],\"inLanguage\":\"cs-CZ\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/\",\"name\":\"Learn More about Ruby on Rails with Pub\\\/Sub - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_on_rails_with_pubsub.png\",\"datePublished\":\"2022-12-07T10:33:06+00:00\",\"dateModified\":\"2026-03-09T13:04:35+00:00\",\"description\":\"Explore the Pub\\\/Sub design pattern in Ruby on Rails and see how it enables event-driven communication and scalable system architecture.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#breadcrumb\"},\"inLanguage\":\"cs-CZ\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"cs-CZ\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#primaryimage\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_on_rails_with_pubsub.png\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/05\\\/ruby_on_rails_with_pubsub.png\",\"width\":960,\"height\":540},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/blog\\\/learn-more-about-ruby-on-rails-with-pub-sub\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Learn More about Ruby on Rails with Pub\\\/Sub\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"cs-CZ\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs-CZ\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/person\\\/7e3fe41dfa4f4e41a7baad4c6e0d4f76\",\"name\":\"thecodest\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"cs-CZ\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g\",\"caption\":\"thecodest\"},\"url\":\"https:\\\/\\\/thecodest.co\\\/cs\\\/author\\\/thecodest\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Dal\u0161\u00ed informace o Ruby on Rails s Pub\/Sub - The Codest","description":"Prozkoumejte n\u00e1vrhov\u00fd vzor Pub\/Sub v Ruby on Rails a zjist\u011bte, jak umo\u017e\u0148uje komunikaci \u0159\u00edzenou ud\u00e1lostmi a \u0161k\u00e1lovatelnou architekturu syst\u00e9mu.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/cs\/blog\/dozvedet-se-vice-o-ruby-on-rails-s-pub-sub\/","og_locale":"cs_CZ","og_type":"article","og_title":"Learn More about Ruby on Rails with Pub\/Sub","og_description":"Explore the Pub\/Sub design pattern in Ruby on Rails and see how it enables event-driven communication and scalable system architecture.","og_url":"https:\/\/thecodest.co\/cs\/blog\/dozvedet-se-vice-o-ruby-on-rails-s-pub-sub\/","og_site_name":"The Codest","article_published_time":"2022-12-07T10:33:06+00:00","article_modified_time":"2026-03-09T13:04:35+00:00","og_image":[{"width":960,"height":540,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_on_rails_with_pubsub.png","type":"image\/png"}],"author":"thecodest","twitter_card":"summary_large_image","twitter_misc":{"Written by":"thecodest","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#article","isPartOf":{"@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/"},"author":{"name":"thecodest","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76"},"headline":"Learn More about Ruby on Rails with Pub\/Sub","datePublished":"2022-12-07T10:33:06+00:00","dateModified":"2026-03-09T13:04:35+00:00","mainEntityOfPage":{"@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/"},"wordCount":778,"commentCount":0,"publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"image":{"@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_on_rails_with_pubsub.png","keywords":["IT"],"articleSection":["Software Development"],"inLanguage":"cs-CZ","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/","url":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/","name":"Dal\u0161\u00ed informace o Ruby on Rails s Pub\/Sub - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"primaryImageOfPage":{"@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#primaryimage"},"image":{"@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#primaryimage"},"thumbnailUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_on_rails_with_pubsub.png","datePublished":"2022-12-07T10:33:06+00:00","dateModified":"2026-03-09T13:04:35+00:00","description":"Prozkoumejte n\u00e1vrhov\u00fd vzor Pub\/Sub v Ruby on Rails a zjist\u011bte, jak umo\u017e\u0148uje komunikaci \u0159\u00edzenou ud\u00e1lostmi a \u0161k\u00e1lovatelnou architekturu syst\u00e9mu.","breadcrumb":{"@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#breadcrumb"},"inLanguage":"cs-CZ","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/"]}]},{"@type":"ImageObject","inLanguage":"cs-CZ","@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#primaryimage","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_on_rails_with_pubsub.png","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/05\/ruby_on_rails_with_pubsub.png","width":960,"height":540},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/blog\/learn-more-about-ruby-on-rails-with-pub-sub\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Learn More about Ruby on Rails with Pub\/Sub"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"cs-CZ"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"cs-CZ","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]},{"@type":"Person","@id":"https:\/\/thecodest.co\/#\/schema\/person\/7e3fe41dfa4f4e41a7baad4c6e0d4f76","name":"thecodest","image":{"@type":"ImageObject","inLanguage":"cs-CZ","@id":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5dbfe6a1e8c86e432e8812759e34e6fe82ebac75119ae3237a6c1311fa19caf4?s=96&d=mm&r=g","caption":"thecodest"},"url":"https:\/\/thecodest.co\/cs\/author\/thecodest\/"}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/comments?post=3427"}],"version-history":[{"count":8,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3427\/revisions"}],"predecessor-version":[{"id":7913,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/posts\/3427\/revisions\/7913"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media\/3428"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/media?parent=3427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/categories?post=3427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecodest.co\/cs\/wp-json\/wp\/v2\/tags?post=3427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}