Should I read past page one?


Download 186.77 Kb.
bet1/3
Sana19.06.2023
Hajmi186.77 Kb.
#1605398
  1   2   3
Bog'liq
RabbitMq


Foreword
Welcome to RabbitMQ in Action. If you’re like me, possibly you’re thinking, “Should I
read past page one?” Alas, too many technology books are written and published, and
not all merit more than superficial attention. So let me invite you to read on, if you
think this description fits you:
RabbitMQ in Action-ga xush kelibsiz. Agar siz men kabi bo'lsangiz, ehtimol siz: "O'tgan sahifani o'qishim kerakmi?" Afsuski, juda ko'p texnologiya kitoblari yozilgan va nashr etilgan va ularning hammasi ham yuzaki e'tiborga loyiq emas. Agar ushbu tavsif sizga mos keladi deb o'ylasangiz, sizni o'qishni taklif qilaman:
■ You want a practical way to learn about push technology, streaming data, and
other messaging patterns.
■ You want to achieve professional-level expertise with RabbitMQ, including best
practices for design and running in production.
■ Siz push texnologiyasi, oqimli ma'lumotlar va boshqa xabar almashish shakllari haqida amaliy ma'lumot olishni xohlaysiz.
■ Siz RabbitMQ bilan professional darajadagi tajribaga, jumladan, dizayn va ishlab chiqarishda ishlash bo'yicha eng yaxshi amaliyotlarga erishmoqchisiz.
In other words, this book is not just a guide to RabbitMQ. It teaches fundamental
design patterns across many use cases. It shows why more applications are using
them—and what the “dos” and “don’ts” are.
Boshqacha qilib aytganda, bu kitob shunchaki RabbitMQ bo'yicha qo'llanma emas. U ko'plab foydalanish holatlarida asosiy dizayn naqshlarini o'rgatadi. Bu nima uchun ko'proq ilovalar ulardan foydalanayotganini va "qilish" va "qilmaslik" nima ekanligini ko'rsatadi.
What are these patterns? If you’ve ever wanted to draw a picture of your system as
an information flow or network, rather than as a stack, then you’re probably using
messaging, or are ready to do so. You may be thinking of data delivery, nonblocking
operations, or push notifications. Or you want to use publish/subscribe, asynchronous
processing, or work queues. All of these are patterns, and they form part of the
design canvas known as messaging.
Bu naqshlar nima? Agar siz tizimingizning rasmini stek sifatida emas, balki axborot oqimi yoki tarmoq sifatida chizishni xohlagan bo'lsangiz, ehtimol siz xabar almashishdan foydalanasiz yoki bunga tayyormisiz. Siz ma'lumotlarni yetkazib berish, bloklanmaydigan operatsiyalar yoki push-bildirishnomalar haqida o'ylayotgan bo'lishingiz mumkin. Yoki siz nashr etish/obuna bo‘lish, asinxron ishlov berish yoki ish navbatlaridan foydalanmoqchisiz. Bularning barchasi naqshdir va ular xabar almashish deb nomlanuvchi dizayn tuvalining bir qismini tashkil qiladi.
Messaging is a critical capability: it enables software applications to connect and
scale. Applications can connect to each other as components of a larger application,
or to user devices and data. Messaging is essentially asynchronous in that it decouples
applications by separating the sending and receiving of data. The wonderful thing is
that this connection pattern works in the same way at any scale.
Xabar almashish juda muhim qobiliyatdir: u dasturiy ilovalarga ulanish va masshtablash imkonini beradi. Ilovalar bir-biriga kattaroq ilova komponentlari sifatida yoki foydalanuvchi qurilmalari va maʼlumotlariga ulanishi mumkin. Xabarlar asosan asinxrondir, chunki u ma'lumotlarni jo'natish va qabul qilishni ajratish orqali ilovalarni ajratadi. Ajoyib narsa shundaki, bu ulanish sxemasi har qanday miqyosda xuddi shunday ishlaydi.
Scale is the point. The dominance of the internet as a basis for application delivery
has made scale the critical factor in application design. Thinking small is no longer
acceptable. Recently the term big data has become fashionable. But everything is big
now, compared to only a few years ago.
For example, the number of mobile-connected devices will exceed the number of
people on earth soon, probably in 2012. As I write this, Facebook is about to IPO. CTO
Bret Taylor said that “Facebook would have been a mobile application if the technology
had been available when Mark Zuckerberg was building it in his dorm room.”
Take a moment to think about that. Most applications used to look like this: you
load a document or get data from a database, do some processing, and write the
results to disk. Future applications will look more like Facebook: always on, cloud
hosted, and accessible anywhere. Input and processing are continuous and automatic,
and deliver a filtered stream of information that the user wants, as it happens.
These levels of automation, reach, and scale are impossible without adopting a
very specific set of design patterns. It is these patterns that you can learn in this book.
Derek Collison, one of the originators of modern messaging technology, memorably
described messaging as enabling “data in motion.” It’s hard to imagine an application
that doesn’t need to move data. So messaging is everywhere.
This book gets you started immediately. The patterns are presented as code examples
that you can run, and the authors take special care to help you operate your system
as well. With Jason J. W. Williams and Alvaro Videla, you have access to experts
who’ve been running large-scale RabbitMQ systems for years. This book is a natural
culmination of their outstanding work sharing these experiences with the community.
After you get a feel for RabbitMQ, it’s very easy to get help and find more examples
via the extensive RabbitMQ user community, regardless of which languages you’re
writing code in. This makes RabbitMQ an excellent choice for your messaging needs.
I hope this has whetted your appetite to turn the page and read on. There will be
messages, and there will be rabbits, and all will be revealed.

Masshtab - bu nuqta. Ilovalarni yetkazib berish uchun asos sifatida internetning ustunligi dasturni loyihalashda miqyosni hal qiluvchi omilga aylantirdi. Kichkina fikrlash endi qabul qilinmaydi. Yaqinda katta ma'lumotlar atamasi modaga aylandi. Ammo bir necha yil oldingi bilan solishtirganda hozir hammasi katta.


Masalan, mobil qurilmalarga ulangan qurilmalar soni er yuzidagi odamlar sonidan oshib ketadi, ehtimol, 2012 yilda. Men buni yozayotganimda, Facebook IPOga chiqish arafasida. Texnik direktor Bret Teylor, "Agar texnologiya Mark Tsukerberg yotoqxonada qurayotganda mavjud bo'lganida, Facebook mobil ilovasi bo'lar edi", dedi.
Bu haqda o'ylash uchun bir oz vaqt ajrating. Ilgari ko'pgina ilovalar shunday ko'rinishda edi: siz hujjatni yuklaysiz yoki ma'lumotlar bazasidan ma'lumotlarni olasiz, biroz ishlov berasiz va natijalarni diskka yozasiz. Kelajakdagi ilovalar ko'proq Facebookga o'xshab ko'rinadi: har doim ochiq, bulutda joylashgan va istalgan joydan foydalanish mumkin. Kirish va qayta ishlash uzluksiz va avtomatik,
va foydalanuvchi xohlagan ma'lumotlarning filtrlangan oqimini, bu sodir bo'lganda etkazib beradi.
Ushbu avtomatlashtirish, kirish va o'lchov darajalari juda aniq dizayn naqshlarini qabul qilmasdan mumkin emas. Siz ushbu kitobdan o'rganishingiz mumkin bo'lgan namunalar.
Zamonaviy xabar almashish texnologiyasining asoschilaridan biri Derek Kollison xabar almashishni "harakatdagi ma'lumotlar" ni yoqish sifatida ta'riflagan. Ma'lumotlarni ko'chirishni talab qilmaydigan dasturni tasavvur qilish qiyin. Shunday qilib, xabarlar hamma joyda.
Ushbu kitob sizni darhol boshlashga yordam beradi. Naqshlar siz ishlatishingiz mumkin bo'lgan kod misollari sifatida taqdim etilgan va mualliflar tizimingizni boshqarishingizga yordam berishga alohida e'tibor berishadi. Jeyson J. V. Uilyams va Alvaro Videla bilan siz yillar davomida keng ko'lamli RabbitMQ tizimlarini boshqarayotgan mutaxassislarga kirishingiz mumkin. Bu kitob ularning ushbu tajribalarini jamiyat bilan baham ko'rishdagi ajoyib ishlarining tabiiy yakunidir.
RabbitMQ haqida tasavvurga ega bo'lganingizdan so'ng, qaysi tillarda kod yozayotganingizdan qat'i nazar, keng ko'lamli RabbitMQ foydalanuvchi hamjamiyati orqali yordam olish va ko'proq misollar topish juda oson. Bu RabbitMQ-ni xabar almashish ehtiyojlaringiz uchun ajoyib tanlov qiladi.
Umid qilamanki, bu sizning sahifani ochib, o'qishga bo'lgan ishtahangizni ochdi. Xabarlar bo'ladi, quyonlar bo'ladi va hamma narsa oshkor bo'ladi.
ALEXIS RICHARDSON
COFOUNDER AND FORMER CEO
RABBIT TECHNOLOGIES, LTD.
SENIOR DIRECTOR
VMWARE CLOUD APPLICATION PLATFORM

Preface
____________________________________________________________________________________


Writing this book has been like discovering RabbitMQ itself—encountering a problem
that needed solving, but not knowing what the solution looked like. Until May
2010, we didn’t even know each other. We both had been active in the RabbitMQ community
for the past two years, but we’d never actually bumped into each other. Then
one day a conversation with Alexis Richardson (Rabbit’s CEO at the time) introduced
Alvaro and me to each other, and made what you hold in your hands possible. What
we had in common was a desire to write down in a single place all the knowledge we
had acquired about RabbitMQ the hard way. Back in 2010, that knowledge was (and
today still largely is) scattered across the internet in a smattering of blog articles and
terse technical tutorials. In other words, we both wanted to write the book we wished
had existed when we started with RabbitMQ two years earlier.
Neither of us came from a traditional messaging background, which made us fast
friends and has largely informed the tone of RabbitMQ in Action; we wanted this book
to be accessible for folks who’ve never heard of a queue or a binding before. In fact,
when each of us discovered RabbitMQ, we didn’t even know what “messaging” was or
that it was the solution to the problems we were having. My (Jason’s) situation was that
my company needed a way to take the spam reportings we received from our customers
and process them out-of-band from our main stream of incoming messages. In
Alvaro’s case, his company had a social network whose member communication system
was creaking under the load of a 200 GB database.
Ushbu kitobni yozish RabbitMQ-ning o'zini kashf qilgandek bo'ldi - echilishi kerak bo'lgan muammoga duch keldi, ammo yechim qanday ko'rinishini bilmaydi. 2010 yilning mayigacha biz bir-birimizni tanimas
edik. Ikkimiz ham so'nggi ikki yil davomida RabbitMQ hamjamiyatida faol edik, lekin biz hech qachon bir-birimizga to'qnash kelmadik. Keyin bir kuni Aleksis Richardson (o'sha paytdagi quyonning bosh direktori) bilan suhbat Alvaro va meni bir-birimiz bilan tanishtirdi va sizning qo'lingizda ushlab turgan narsaga imkon berdi. Bizning umumiy narsamiz RabbitMQ haqida qiyin yo'l bilan olgan barcha bilimlarimizni bitta joyda yozish istagi edi. 2010-yilda, bu bilimlar (va bugungi kunda ham ko'p jihatdan) Internet bo'ylab blog maqolalari va qisqacha texnik qo'llanmalar orqali tarqalib ketgan. Boshqacha qilib aytganda, biz ikki yil avval RabbitMQ bilan boshlaganimizda, biz xohlagan kitobni yozmoqchi edik.
Hech birimiz an'anaviy xabar almashish tajribasidan kelib chiqmaganmiz, bu bizni tez do'stlashtirgan va RabbitMQ in Action ohangini ko'p jihatdan xabardor qilgan; biz bu kitobni ilgari hech qachon navbat yoki bog'lash haqida eshitmagan odamlar uchun ochiq bo'lishini xohladik. Darhaqiqat, RabbitMQ-ni har birimiz kashf etganimizda, biz "xabar almashish" nima ekanligini yoki bu biz duch kelayotgan muammolarning echimi ekanligini bilmas edik. Mening (Jeysonning) holati shundan iborat ediki, mening kompaniyam mijozlarimizdan olgan spam-xabarlarni qabul qilish va ularni asosiy kiruvchi xabarlar oqimidan tarmoqdan tashqarida qayta ishlash usuliga muhtoj edi. Alvaro misolida, uning kompaniyasi ijtimoiy tarmoqqa ega bo'lib, uning a'zolarining aloqa tizimi 200 Gb ma'lumotlar bazasi yuki ostida siqilib turardi.
Like so many others who’ve come to messaging, both us had first tried to solve our queue-centric issues using database tables. Problems, like ensuring that only one application instance consumed any particular queue item, plagued our attempts at a database-driven solution and sent us looking for a better way. After all, we knew we couldn’t be the first people in the history of software to have these issues.
The solution for both of us came in a surprisingly similar way: a friend at Plaxo told me to check out this “RabbitMQ thing” as a way to solve my queue-centric problems, and an Erlang colleague of Alvaro’s in China gave him the same advice. Halfway around the world, both of us discovered RabbitMQ in the same way, and in response to trying to solve almost exactly the same problem! In fact, since you’re reading this book about RabbitMQ, it’s likely that similar challenges have led you to discover RabbitMQ in the same way. That speaks to the fact of why RabbitMQ is so popular: it easily solves the basic problems of distributing data that each of us runs into again and again when trying to scale the software that we build.
Our hope is that RabbitMQ in Action will help you design solutions to those challenges more quickly and easily with RabbitMQ, so you can spend more time writing the software that will change the world and less time getting up to speed on the messaging broker that will help you do it. Perhaps, along the way, RabbitMQ will introduce you to an awesome coauthor who will become the lifelong friend you never expected. This book is a product of how much we love writing software, and our hope is that it will help you do the same in ways you never thought possible.
Xabar almashishga kelgan boshqa ko'plab odamlar singari, ikkalamiz ham birinchi navbatda ma'lumotlar bazasi jadvallari yordamida navbatga asoslangan muammolarni hal qilishga harakat qildik. Faqat bitta dastur namunasi har qanday muayyan navbat elementini iste'mol qilishini ta'minlash kabi muammolar ma'lumotlar bazasiga asoslangan yechimga urinishlarimizga ta'sir qildi va bizni yaxshiroq yo'l izlashga majbur qildi. Axir, biz dasturiy ta'minot tarixida bunday muammolarga duch kelgan birinchi odamlar bo'la olmasligimizni bilardik.
Ikkalamiz uchun ham yechim hayratlanarli darajada o'xshash tarzda keldi: Plaxo'dagi do'stim menga navbatga asoslangan muammolarimni hal qilish usuli sifatida ushbu "RabbitMQ ishini" tekshirishimni aytdi va Alvaroning Xitoydagi hamkasbi Erlang unga xuddi shu narsani berdi. maslahat. Dunyoning yarmida ikkalamiz RabbitMQ-ni xuddi shu tarzda kashf qildik va deyarli bir xil muammoni hal qilishga urinishimizga javoban! Haqiqatan ham, siz RabbitMQ haqidagi ushbu kitobni o'qiyotganingiz sababli, shunga o'xshash qiyinchiliklar sizni RabbitMQ-ni xuddi shu tarzda kashf etishga undagan bo'lishi mumkin. Bu RabbitMQ nima uchun juda mashhur ekanligidan dalolat beradi: u biz yaratgan dasturiy ta'minotni kengaytirishga urinayotganda har birimiz qayta-qayta duch keladigan ma'lumotlarni tarqatishning asosiy muammolarini osongina hal qiladi.
Umid qilamizki, RabbitMQ in Action sizga RabbitMQ yordamida ushbu muammolarni hal qilishni tezroq va osonroq ishlab chiqishda yordam beradi, shuning uchun siz dunyoni o'zgartiradigan dasturiy ta'minotni yozishga ko'proq vaqt sarflashingiz va yordam beradigan xabar almashish brokerida tezlikni oshirishga kamroq vaqt sarflashingiz mumkin. siz buni qilasiz. Ehtimol, yo'lda RabbitMQ sizni siz kutmagan umrbod do'stga aylanadigan ajoyib hammuallif bilan tanishtiradi. Bu kitob biz dasturiy ta'minot yozishni qanchalik yaxshi ko'rishimizning mahsulidir va umidimiz shuki, u sizga hech qachon o'ylamagan usullarda yordam beradi.
ALVARO VIDELA
DÜBENDORF, SWITZERLAND
JASON J. W. WILLIAMS
BOISE, IDAHO, UNITED STATES
RabbitMQ is an open source message broker and queueing server that can be used to let disparate applications share data via a common protocol, or to simply queue jobs for processing by distributed workers.
It doesn’t matter whether your project is big or small: RabbitMQ can adapt to your needs. Do you want to quickly prototype one of your application components in language X and be sure you can easily switch it tomorrow to a more performant language? RabbitMQ can help you by decoupling the communication protocol. Do you need to be able to process image uploads for your social website as they arrive, while adding or removing workers with ease? You can use Rabbit queues to store jobs and let the broker perform the load balancing and job distribution for you. Problems like these can be easily and quickly solved by using RabbitMQ; this book is here to show you how to best implement your architectures around messaging.
RabbitMQ ochiq manbali xabar brokeri va navbat serveri bo'lib, u turli xil ilovalarga umumiy protokol orqali ma'lumotlarni almashish imkonini beradi yoki oddiy ishchilar tomonidan qayta ishlash uchun ishlarni navbatga qo'yish uchun ishlatilishi mumkin.
Loyihangiz katta yoki kichikmi, muhim emas: RabbitMQ sizning ehtiyojlaringizga moslasha oladi. Ilova komponentlaringizdan birini tezda X tilida prototip qilishni va ertaga uni yanada samaraliroq tilga osongina almashtirishingizga ishonch hosil qilishni xohlaysizmi? RabbitMQ sizga aloqa protokolini ajratish orqali yordam berishi mumkin. Ijtimoiy veb-saytingiz uchun tasvir yuklash, ular kelganda, ishchilarni osongina qo'shish yoki olib tashlash bilan ishlov berishingiz kerakmi? Ishlarni saqlash uchun Rabbit navbatlaridan foydalanishingiz mumkin va broker siz uchun yuklarni muvozanatlash va ishni taqsimlashni amalga oshirishiga ruxsat berishingiz mumkin. Bu kabi muammolarni RabbitMQ yordamida oson va tez hal qilish mumkin; Ushbu kitob sizga xabar almashish atrofida arxitekturangizni qanday qilib eng yaxshi tarzda amalga oshirishni ko'rsatish uchun bu erda.
Programming your application is one thing—keeping your application up and running is where the challenge starts. Don’t worry; this book also covers best practices for RabbitMQ administration, clustering, securing, and monitoring, so you can also learn the operational side of things.
Ilovangizni dasturlash bir narsa - ilovangizni ishlayotgan va ishlayotgan holatda saqlash qiyinchilikdan boshlanadi. Xavotir olmang; Ushbu kitob RabbitMQ boshqaruvi, klasterlash, xavfsizlikni ta'minlash va monitoring qilish bo'yicha eng yaxshi amaliyotlarni ham qamrab oladi, shuning uchun siz narsalarning operatsion tomonini ham o'rganishingiz mumkin.
Finally, we’ll get into RabbitMQ’s brain and those inner details that will let you understand the system resources used by the broker so you can perform capacity planning while you design your architectures. Also, you’ll learn how to extend the broker by installing plugins and by creating your own, because, why not? Get your editor ready because you’ll be coding in Python, PHP, Erlang, Java, and C#.
Nihoyat, biz RabbitMQ-ning miyasi va ichki tafsilotlari bilan tanishamiz, bu sizga broker tomonidan ishlatiladigan tizim resurslarini tushunishga imkon beradi, shunda siz arxitekturangizni loyihalashda imkoniyatlarni rejalashtirishni amalga oshirishingiz mumkin. Bundan tashqari, siz plaginlarni o'rnatish va o'zingizni yaratish orqali brokerni qanday kengaytirishni o'rganasiz, chunki nima uchun? Tahrirlovchingizni tayyorlang, chunki siz Python, PHP, Erlang, Java va C# tillarida kodlashni bilasiz.

Download 186.77 Kb.

Do'stlaringiz bilan baham:
  1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling