- Building Data Streaming Applications with Apache Kafka
- Manish Kumar Chanchal Singh
- 372字
- 2022-07-12 10:38:10
Understanding the principles of messaging systems
Continuing our focus on messaging systems, you may have seen applications where one application uses data that gets processed by other external applications or applications consuming data from one or more data sources. In such scenarios, messaging systems can be used as an integration channel for information exchange between different applications. If you haven't built such an application yet, then don't worry about it. We will build it in upcoming chapters.
In any application integration system design, there are a few important principles that should be kept in mind, such as loose coupling, common interface definitions, latency, and reliability. Let's look into some of these one by one:
- Loose coupling between applications ensures minimal dependencies on each other. This ensures that any changes in one application do not affect other applications. Tightly coupled applications are coded as per predefined specifications of other applications. Any change in specification would break or change the functionality of other dependent applications.
- Common interface definitions ensure a common agreed-upon data format for exchange between applications. This not only helps in establishing message exchange standards among applications but also ensures that some of the best practices of information exchange can be enforced easily. For example, you can choose to use the Avro data format to exchange messages. This can be defined as your common interface standard for information exchange. Avro is a good choice for message exchanges as it serializes data in a compact binary format and supports schema evolution.
- Latency is the time taken by messages to traverse between the sender and receiver. Most applications want to achieve low latency as a critical requirement. Even in an asynchronous mode of communication, high latency is not desirable as significant delay in receiving messages could cause significant loss to any organization.
- Reliability ensures that temporary unavailability of applications does not affect dependent applications that need to exchange information. In general, the when source application sends a message to the remote application, sometimes the remote application may be running slow or it may not be running due to some failure. Reliable, asynchronous message communication ensures that the source application continues its work and feels confident that the remote application will resume its task later.
推薦閱讀
- 程序員考試案例梳理、真題透解與強(qiáng)化訓(xùn)練
- 快速念咒:MySQL入門指南與進(jìn)階實(shí)戰(zhàn)
- Python面向?qū)ο缶幊蹋簶?gòu)建游戲和GUI
- Learning ArcGIS for Desktop
- C語言程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo) (第2版)
- 運(yùn)用后端技術(shù)處理業(yè)務(wù)邏輯(藍(lán)橋杯軟件大賽培訓(xùn)教材-Java方向)
- Python極簡講義:一本書入門數(shù)據(jù)分析與機(jī)器學(xué)習(xí)
- jQuery炫酷應(yīng)用實(shí)例集錦
- RealSenseTM互動開發(fā)實(shí)戰(zhàn)
- ASP.NET程序開發(fā)范例寶典
- 打開Go語言之門:入門、實(shí)戰(zhàn)與進(jìn)階
- Kubernetes源碼剖析
- 智能手機(jī)故障檢測與維修從入門到精通
- 軟件再工程:優(yōu)化現(xiàn)有軟件系統(tǒng)的方法與最佳實(shí)踐
- 物聯(lián)網(wǎng)及低功耗藍(lán)牙5.x高級開發(fā)