Why do we need Kafka?

Piyush Garg
20 Aug 202315:15

Summary

TLDRThe video script discusses the necessity of using Kafka in IT infrastructure, particularly for handling high throughput data efficiently. It explains how Kafka serves as a fast, scalable message broker that buffers data generated at high speeds, allowing databases to process it without being overwhelmed. The script also touches on the importance of databases in storing and retrieving data, comparing them to primary and secondary memory in terms of speed and durability. It emphasizes the role of services like Kafka in managing data flow and ensuring system performance, even when scaling up.

Takeaways

  • 😀 The video discusses the necessity of using services like Kafka for managing data flow and processing in IT systems.
  • 🔍 The speaker addresses the question of why Kafka is essential and whether it's necessary for a system or not.
  • 📈 The script talks about a previous video uploaded by the speaker that detailed the internal architecture of databases and how Kafka fits into it.
  • 💬 A comment from a viewer named Vir Singh is highlighted, suggesting that upgrading database technology and performance can eliminate the need for Kafka.
  • 📊 The video explains the concept of databases and their role in storing and reading data, emphasizing the need for mechanisms like Kafka when dealing with high throughput.
  • 🚀 Kafka is likened to a service that temporarily holds data in memory (RAM) for fast access and processing, which is beneficial for handling large volumes of data quickly.
  • 🔑 The script mentions the importance of durability in databases, contrasting the temporary nature of primary memory with the permanent storage of secondary memory (hard disk).
  • 🗃️ The video touches on the concept of structured vs. unstructured data, and how Kafka can handle unstructured data by aggregating it before storage in a database.
  • 🔄 The speaker discusses the process of data processing, such as aggregating and computing values, which Kafka performs before storing the data in a database.
  • 🛠️ The importance of services like Kafka is emphasized for their ability to process and manage data efficiently, especially in systems with growing data demands.
  • 🔒 The video concludes by stressing the importance of having mechanisms in place for optimal data storage and querying as applications grow and data demands increase.

Q & A

  • What is the main topic discussed in the video?

    -The main topic discussed in the video is the necessity and use of Kafka as a middleware service in handling fast data generation and storage, particularly in the context of databases and IT infrastructure.

  • Why is Kafka mentioned as essential in the video?

    -Kafka is mentioned as essential due to its ability to handle high throughput data and act as a buffer between data generation and storage, ensuring that the database does not become overwhelmed.

  • What does the video suggest about the relationship between data generation speed and database performance?

    -The video suggests that the speed of data generation is often much faster than the database's ability to ingest data, which can lead to performance issues if not managed properly.

  • What is the role of a database in the context presented in the video?

    -In the context of the video, a database serves as a storage mechanism for the data that is generated and processed, but it may not be able to handle high data throughput on its own without the help of services like Kafka.

  • What is the purpose of buffering data in memory, as discussed in the video?

    -Buffering data in memory, as discussed in the video, allows for faster access and processing of data before it is written to the database, which can help prevent database overload and improve performance.

  • Why might a database server need to be restarted, according to the video?

    -The video implies that a database server might need to be restarted due to issues like crashes or for maintenance, and this can affect the availability of data.

  • What is the difference between primary and secondary memory as it relates to databases?

    -Primary memory, like RAM, is faster but not durable, meaning data is lost upon a restart. Secondary memory, like hard disk, is slower but durable, preserving data even after a restart.

  • How does the video describe the durability of data in a database?

    -The video describes data durability in a database as the ability to retain data even after a system crash or restart, which is a critical feature for data integrity.

  • What is the role of indexing in a database, as mentioned in the video?

    -Indexing in a database, as mentioned in the video, is a mechanism to allow for faster data retrieval by creating structures that can quickly locate and access the required data.

  • What is the significance of structured data in a database, according to the video?

    -Structured data in a database is significant because it allows for efficient querying and processing, providing a clear format that can be easily searched and manipulated.

  • How does the video explain the concept of data processing in the context of Kafka?

    -The video explains that Kafka processes data by acting as a buffer that aggregates and temporarily holds data before it is ready to be inserted into the database, ensuring data integrity and managing load.

Outlines

00:00

😀 Introduction to Kafka and Databases

The speaker begins by welcoming viewers to the video and immediately delves into a discussion about Kafka, a distributed streaming platform, and its necessity in handling fast data. The speaker mentions a previous video on database crash courses and encourages viewers to watch it for foundational knowledge. They address a comment by Veer Singh, which challenges the need for Kafka, suggesting that database technology upgrades and performance improvements eliminate the need for such services. The speaker outlines the role of Kafka in storing fast-generated data before it is eventually stored in a database, due to the database's inability to consume data as quickly as it is produced.

05:00

😉 Exploring Kafka's Benefits and Database Mechanics

This paragraph further explores the benefits of using Kafka, likening it to an application buffer that stores data in RAM for quick access, similar to primary memory. The speaker contrasts this with databases, which are likened to secondary memory, slower but durable. They discuss the importance of databases in not only storing but also reading data, with functionalities like indexing and aggregate functions. The speaker emphasizes the need for services like Kafka due to the non-technical nature of handling large amounts of data in a non-technical language, ensuring everyone understands the database's durability and the role of Kafka in managing data flow efficiently.

10:02

🤔 The Role of Kafka in Data Processing and Scalability

The speaker discusses the role of Kafka in processing and scalability, explaining how it aggregates and processes data without the need for immediate validation or complex structures. They use the analogy of unstructured data, which can be any JSON string without a specific schema, and how Kafka can handle this by batching and inserting it into the database. The speaker highlights the importance of services like Kafka for managing real-time data flow and processing, especially when dealing with large volumes of data that traditional databases might struggle to handle efficiently.

15:02

🙂 Conclusion and Invitation for Further Queries

In the concluding paragraph, the speaker invites viewers with further doubts to ask questions in the comment section, ensuring continued engagement and discussion on the topic. They summarize the importance of understanding services like Kafka and their impact on data handling and processing, especially in the context of growing application demands and data volume.

Mindmap

Keywords

💡Kafka

Kafka is a distributed event streaming platform used for building real-time data pipelines and streaming applications. In the video, Kafka is discussed as a tool for managing high-throughput data streams, which databases struggle to handle efficiently due to their design for durability rather than speed. The video explains why Kafka's in-memory processing offers advantages in speed and throughput.

💡Database Throughput

Database throughput refers to the amount of data a database can process in a given amount of time. The video highlights that traditional databases have limitations in throughput, especially when compared to Kafka, making Kafka essential for applications requiring rapid data ingestion and processing. The comment by Veer Singh suggests improving database throughput to eliminate the need for Kafka.

💡Durability

Durability in databases means that once a transaction has been committed, it will remain in the database even in the case of a system failure. The video contrasts this with Kafka, which prioritizes speed by storing data in RAM. It explains that while Kafka is faster, databases ensure data is safely stored and not lost, despite slower performance.

💡Real-Time Data Processing

Real-time data processing involves continuously processing data as it arrives. The video discusses how Kafka enables real-time data processing, allowing immediate consumption and action on data, unlike traditional databases that may delay due to lower throughput and higher latency.

💡RAM (Random Access Memory)

RAM is a type of computer memory that is fast but volatile, meaning it loses data when power is turned off. Kafka uses RAM to store data temporarily for quick access and processing, which the video explains as a key reason for its high performance compared to traditional databases that rely on slower, durable storage.

💡Primary Memory vs. Secondary Memory

Primary memory (like RAM) is fast but volatile, while secondary memory (like hard drives) is slower but durable. The video uses this distinction to explain why Kafka, which uses primary memory, is faster but less durable than databases, which use secondary memory for long-term data storage.

💡Structured vs. Unstructured Data

Structured data is organized and easily searchable within databases, often in rows and columns. Unstructured data lacks this organization. The video explains that Kafka excels at handling unstructured data, which is often generated rapidly and in large volumes, making it difficult for traditional databases to manage efficiently.

💡Consumer

In the context of Kafka, a consumer is an application or process that reads and processes data from Kafka topics. The video describes how consumers take data from Kafka, process it, and then store it in a database, highlighting the role of consumers in the data processing pipeline.

💡Data Ingestion

Data ingestion is the process of obtaining and importing data for immediate use or storage. The video discusses how Kafka is used to ingest high volumes of data quickly, which is then processed by consumers and eventually stored in databases for durability and further querying.

💡Data Query

Data query refers to the process of requesting specific data from a database. The video emphasizes that databases are optimized for complex queries, allowing users to retrieve and manipulate data efficiently, which is a feature not inherently available in Kafka but crucial for comprehensive data analysis.

Highlights

Introduction to the importance of databases and the role of Kafka in managing data flow.

Discussion on why Kafka might be necessary for handling high throughput and low latency requirements.

Explanation of how data is stored in Kafka services for fast data generation and later processed in databases.

The limitations of databases in terms of data processing speed and the benefits of using intermediate services like Kafka.

The concept of databases as durable storage and their role in ensuring data integrity even after system restarts.

Comparison between primary and secondary memory in the context of data storage and retrieval speeds.

The role of Kafka as an application buffer, storing data in RAM for quick access and processing.

The importance of data structures in databases and how they affect query performance and data retrieval.

The challenges of handling unstructured data and the need for services like Kafka to process and structure it before storage.

How Kafka aggregates and processes data, allowing for scalability and efficient data handling in large volumes.

The difference between structured and unstructured data and the implications for database design and query optimization.

The benefits of using Kafka for real-time data processing and its impact on application performance.

The necessity of services like Kafka in managing the increasing data demands of growing applications.

The practical applications of Kafka in handling real-time data streams and its integration with databases.

The importance of data processing and the role of Kafka in aggregating and computing data values for storage.

How Kafka helps in maintaining a clean and efficient database by processing and structuring incoming data.

The significance of services like Kafka in the overall architecture of data management systems and their contribution to system performance.

Transcripts

play00:00

एवरीवन वेलकम बैक वेलकम तू अंदर

play00:02

एक्साइटिंग वीडियो और इस वीडियो के अंदर

play00:04

हम डिस्कस करते हैं डेट व्हाट इसे डी नीड

play00:06

ऑफ काफी काफी जो है वो इतना फास्ट क्यों

play00:09

है और हमें काफ्का की जरूर क्यों है और

play00:11

क्या हमें काफ्का की जरूर है बी या नहीं

play00:13

तो कुछ दिन पहले मैंने एक वीडियो अपलोड

play00:15

किया था उनका सो आईटी वैसे एन काफी का

play00:18

क्रश कोर्स तो अगर तुमने ये वीडियो नहीं

play00:20

देखा है आई वुड हाली रेकमेंड की पहले तुम

play00:22

इस वीडियो को देखो तो इसमें हमने पूरा

play00:24

डिटेल में डिस्कस किया था टटका का क्या

play00:26

होता है और व्हाट इस इंटरनल आर्किटेक्चर

play00:28

ऑफ आपका और कफ का किस तरह से क करता है तो

play00:31

इस वीडियो को मैं कमेंट्स रीड कर रहा था

play00:33

और एक बहुत ही इंटरेस्टिंग कमेंट आया है

play00:35

मेरे सामने दिस इस फ्रॉम वीर सिंह सो ही

play00:37

सेल्स था इन'टी आईटी नोट पॉसिबल डेट

play00:39

डेटाबेस इस इंप्रूव डी थ्रू पट

play00:41

थेम्सेल्वेस बाय अपग्रेडिंग डेट

play00:42

टेक्नोलॉजी और परफॉर्मेंस सो देवर बिल बी

play00:44

नो नीड ऑफ कफ का और अन्य अदर किड ऑफ मिडिल

play00:46

में सर्विस बहुत ही बढ़िया कमेंट ठीक है

play00:49

तो ये कमेंट बेसिकली क्या कहना चाहते हैं

play00:51

डेट हमें काफी जरूर इसलिए पड़ती है बिकॉज़

play00:54

काफी थ्रोपुत ज्यादा है डाटा बेसिस के

play00:56

थ्रोपुत कम है तो बेसिकली हम क्या करते

play00:58

हैं जो भी हमारा फास्ट आ डाटा जेनरेशन

play01:01

होता है हम उसको कफ का जैसे सर्विसेज के

play01:03

अंदर स्टोर करते हैं और लेटर ऑन हम उसको

play01:05

कंज्यूम करते हैं डाटा बेसिस के अंदर

play01:07

स्टोर करते हैं बिकॉज़ डाटा बेसिस इतनी

play01:09

जल्दी डाटा को कंज्यूम नहीं कर सकते

play01:11

डाटा बेस को ही अपग्रेड कर देते हैं ना की

play01:14

उनकी थ्रोपुत बाढ़ जाए हम डाटा भी इसके

play01:15

अंदर देखो एक्वेटिक लगा देते हैं लाइक

play01:17

उसके राम हम उसके हर चीज लाइक उसकी पुरी

play01:19

फूल बढ़िया कर देते हैं की जो डाटा बेसिस

play01:22

है उसके थ्रोपुत इंक्रीज हो जाए और हमें

play01:24

इन इस तरह की सर्विसेज की जरूर ही ना पड़े

play01:26

बिल्कुल बैलेट पॉइंट और आई एम सर बहुत

play01:28

जनों के दिमाग में ये पर्टिकुलर डाउट आया

play01:30

होगा तो बात करते हैं डेट ऐसा क्यों

play01:33

पॉसिबल नहीं है और वही डू वे नीड सर्विसेज

play01:35

लाइक का इस चीज को डिस्कस करने से पहले

play01:38

मैं तुम्हें बिल्कुल सिंपल सा एक क्वेश्चन

play01:39

पूछूंगा ठीक है एक सिंपल सा क्वेश्चन डेट

play01:41

अगर मैं तुम्हें बोलूं डेट एक डेटाबेस

play01:43

क्या होता है ठीक है एक सिंपल सा क्वेश्चन

play01:44

ठीक है बिल्कुल सिंपल क्वेश्चन अगर मैं

play01:46

तुम्हें पूछूं डेट व्हाट आगे दी नीड ऑफर

play01:48

डेटाबेस तो तुम्हारा आंसर क्या होगा ठीक

play01:51

है यू बिल से डेट डेटाबेस हमें चाहिए

play01:57

तू स्टोर दी डाटा तो ये बिल्कुल सही आंसर

play02:01

है

play02:02

बट दिस इस एन इनकम कंप्लीट आंसर ठीक है

play02:08

विदाउट अन्य डाउट लेकिन आईटी अलसो

play02:12

प्रोवाइड एन मैकेनिज्म तू रीड डिटेल

play02:20

के अंदर बहुत साड़ी फंक्शनैलिटी होती है

play02:24

तू रीड डी डाटा ठीक है पर एग्जांपल रीड की

play02:27

तरह से तो डाटा को रीड कर सकते हो बाय

play02:29

आईडी तुम डाटा को रीड कर सकते हो भाई

play02:31

इंडेक्सिंग समथिंग यू कैन रीड डिटेल बाय

play02:33

एग्रीगेटिंग समथिंग तो मल्टीपल कंडीशंस दे

play02:36

सकते हो तो बेसिकली डेटाबेस सिर्फ डाटा

play02:37

स्टोरेज के लिए ही उसे नहीं होता डाटा रीड

play02:40

करने के लिए भी उसे होता है ठीक है

play02:43

तो डाटा बेसिस फास्ट क्यों

play02:47

पट ठीक है हमें एक कफ का या फिर हम एक रेड

play02:50

जैसी सर्विसेज की क्यों नीड पड़ती है

play02:54

ना उसका जो डाटा होता है मैं बहुत लाइक

play02:58

नॉन टेक्निकल बहुत ले मां लैंग्वेज में

play03:00

बात करने वाला हूं सो डेट हर एक को समझते

play03:01

हैं ठीक है मैं बिल्कुल कंप्यूटर साइंस के

play03:03

टिप्स में नहीं जाऊंगा बिल्कुल सिंपल बात

play03:04

करते हैं जो डेटाबेस होता है उसका जो डाटा

play03:08

होता है ना वो ड्यूरेबल होता है ठीक है

play03:09

व्हाट डू यू मीन बाय ड्यूरेबल देखो अगर

play03:11

तुम डेटाबेस के ऊपर ट्रस्ट कर सकते हो ठीक

play03:13

है अगर तुम डेटाबेस के अंदर कोई डाटा

play03:15

इंसर्ट करते हो तो तुम उसको रीड भी कर

play03:18

सकते हो और तुम ही इस चीज की बड़ी करने की

play03:20

जरूर नहीं है की यार तुम्हारा डाटा कहानी

play03:21

लूज ना हो जाए ठीक है लेट से इधर तुम्हारे

play03:24

पास है डाटा बेस है यू आर टॉकिंग अबाउट

play03:26

लेट से मैंगो डीबी डाटा बेस है तुम उसके

play03:28

अंदर कोई डाटा रखा लेट से इधर तुम्हारा

play03:30

कुछ टाइम के लिए डॉ हो गया ठीक है तुम तो

play03:34

सर्वर को रीस्टार्ट किया जब तुम उसको

play03:35

रीस्टार्ट करोगे तो तुम्हारा डाटा वहीं का

play03:37

वहीं पड़ा होगा ठीक है इसका क्या मतलब है

play03:40

वो

play03:43

उसे करते हैं वह हमारी हार्ड डिस्क को

play03:45

हमारे एसडी को उसे करते हैं तो स्टोर दी

play03:48

डाटा ठीक है टेक्निकल डेप्थ में जाना

play03:50

चाहते हो तो तुम डाटा बेसिस के

play03:51

आर्किटेक्चर को पढ़ सकते हो उसके ऊपर बहुत

play03:53

सारे लेवल्स होते हैं ठीक है अगर तुम डीबी

play03:54

के आर्किटेक्चर को हिट करोगे तो बहुत सारे

play03:57

लेवल्स होते हैं तो मैं उसे लेवल पर नहीं

play03:58

जाऊंगा बट तुम समझो दांत डाटा बेसिस होते

play04:01

है वो हमारी हार्ड डिस्क को उसे करते हैं

play04:02

तू स्टोर दी डाटा ठीक है अब अगर तुमने

play04:05

छोटे होते पढ़ा होगा बचपन में डेट एक

play04:08

प्राइमरी मेमोरी होती है एक सेकेंडरी

play04:09

मेमोरी होती है क्या तुमने इस चीज को पढ़ा

play04:10

था लाइक छोटे होते हैं हम पढ़ने होते तो

play04:12

बचपन में प्राइमरी होती है जैसे पर

play04:14

एग्जांपल राम और सेकेंडरी मेमोरी होती है

play04:16

जैसे हमारे एसजी ठीक है इन दोनों के अंदर

play04:19

एक बेसिक डिफरेंस होता था की जो प्राइमरी

play04:20

मेमोरी होती है ना वो बहुत स्पीड होती है

play04:23

उसकी स्पीड ज्यादा होती है जैसे राम की

play04:25

लेकिन उसके अंदर जो डाटा होता है ना वो

play04:27

परमानेंट नहीं होता लाइक अगर तुम राम के

play04:30

अंदर कुछ रख रहे हो तो वो डाटा बहुत फास्ट

play04:31

होगा राम इस वेरी फास्ट लेकिन कंप्यूटर

play04:34

रीस्टार्ट होने के बाद प्राइमरी मेमोरी

play04:36

अपने क्लियर हो जाति है करेक्ट लेकिन

play04:38

सेकेंडरी मेमोरी ऐसा नहीं होता सेकेंडरी

play04:40

मेमोरी जो होती है वो स्लो होती है उसमें

play04:42

लीड्स और लाइट स्लो होते हैं लेकिन वह

play04:44

ड्यूरेबल होती है वह अपनी जो डिस्क है वह

play04:46

ड्यूरेबल होती है अगर तुम कंप्यूटर को

play04:48

रीस्टार्ट भी कर डॉग तो तुम्हारा डाटा

play04:49

वाहिका वही होगा तो नेट मेरा एक पॉइंट

play04:52

क्या है पहले पॉइंट क्या है डेट जो काफी

play04:55

सर्विसेज होती है ना वो अपना डाटा राम के

play04:58

अंदर रख दिया ठीक है जो कफ का जैसे

play05:00

सर्विसेज होती है तो अगर तुम यहां पर एक

play05:02

चीज सर्च कर सकते हो डेट बाय कफ का इस

play05:04

फास्ट ठीक है तुम खुद ही सर्च करो बाय

play05:06

फास्ट अगर तुम इमेज में जाते हो तो बाय

play05:09

बाय को की तरफ से यू बिल सी दिस पार्टिकल

play05:10

डायग्राम तो ये बहुत अच्छी डायग्राम है

play05:12

इसको मैं आ फूल स्क्रीन में ओपन करता हूं

play05:14

तो अगर तुम इस डायग्राम को ध्यान से पढ़ने

play05:16

हो तो बेसिकली जो कफ का होता है वो क्या

play05:18

करता है वो एप्लीकेशन बफर मतलब की वो राम

play05:21

के अंदर अपने डाटा को स्टोर करता है उसका

play05:23

क्या बेनिफिट मिलता है राम के अंदर विच

play05:26

इसे डी प्राइमरी मेमोरी बहुत फास्ट होती

play05:29

है ठीक है तो कफ का कोई एक बेनिफिट मिलता

play05:31

है की ठीक है वो अपना डाटा जो है वो कहां

play05:33

राहत है हां में रखना है इसकी करण उसको

play05:34

स्पीड मिलती है सिमिलरली अगर हम रेडी इसके

play05:37

भी बात करें तो रिड्यूस अपना डाटा कहां

play05:38

राहत है अपना राम के अंदर रखना है ठीक है

play05:40

तो उससे वो क्या कर पता है वो अपनी स्पीड

play05:42

अचीव कर पाते हैं लेकिन डाटा बेसिस अगर

play05:45

अपना डाटा राम के अंदर रखना ग गए तो उनकी

play05:47

थ्रोपुत तो पक्का इंक्रीज हो जाएगी लेकिन

play05:49

अगर कभी तुम्हारा डेटाबेस सर्वर डॉ गया वो

play05:51

रीस्टार्ट हुआ तो तुम्हारा पूरा डाटा क्या

play05:53

खत्म राइट तो डाटा बेसिस जो होते हैं पहले

play05:57

बात दे आर ड्यूरेबल बिकॉज़ वो सेकेंडरी

play06:00

मेमोरी का उसे करते हैं सेकंड पॉइंट यहां

play06:02

पर क्या है की जो डाटा बेसिस होते हैं ना

play06:04

उनको एक बहुत ही लाइक एक एडवांस मेकैनिज्म

play06:07

प्रोवाइड करना होता है तो कोई भी डाटा ठीक

play06:10

है ये इस टर्म को याद रखना ठीक है देखो

play06:14

डाटा बेसिस का सिर्फ कम ये नहीं होता की

play06:16

वो डाटा को स्टोर करें जब वो डाटा कुछ

play06:18

स्टोर करते हैं ठीक है जब डाटा बेसिस डाटा

play06:19

को स्टोर करते हैं वो बहुत सारे डाटा सबसे

play06:22

ज्यादा उसका उसे करते हैं पर एग्जांपल

play06:31

जैसे तुम क्या कर सकते हो तुम डाटा बेसिस

play06:35

के ऊपर तुम प्राइमरी की सेटअप कर सकते हो

play06:37

राइट तुम प्राइमरी किस सेटअप करते हो तो

play06:40

वो क्या वह प्राइमरी किसके ऊपर इंडेक्स

play06:42

करता तुम खुद के इंडेक्स बना सकते हो

play06:44

डेटाबेस के अंदर तुम डेटाबेस के अंदर

play06:46

फॉरेन किस बना सकते हो तुम टेबल्स को जॉइन

play06:49

कर सकते हो राइट तुम स्पेसिफिक डाटा

play06:52

क्वेरी आउट कर सकते हो जो तुम्हें चाहिए

play06:54

तुम इसमें मल्टीपल कंडीशंस लिख सकते हो

play06:56

जैसे पर एग्जांपल तुम और कंडीशन लिख सकते

play06:58

हो और कंडीशंस लिख सकते हो तो नेट में बात

play07:01

करें डेट बहुत सारे डाटा सबसे ज्यादा उसे

play07:04

होते हैं तो ऑप्टिकल डाटा ठीक है तो डाटा

play07:09

बेसिस ऑफ डी डाटा रखते हैं ना वो ऐसा नहीं

play07:11

है की बस वो अपना डाटा रख लेते हैं उनको

play07:12

बहुत साड़ी चीज उसके ऊपर प्रोसेस करनी

play07:14

होती है सो डेट जब भी तुम उसके ऊपर कोई

play07:16

क्वेरी रन करो तो तुम्हें फास्टेस्ट टाइम

play07:18

के अंदर वो डाटा मिल जाए एक्जेक्टली वो

play07:20

डाटा मिल जाए जो तुमने मांगा है लेकिन

play07:22

काफी में ऐसी चीज नहीं होती ठीक है कफ का

play07:26

इस मिनट की वो फटाफट डाटा को कंज्यूम कर

play07:28

पे ठीक है इट्स लाइक तुम देता हो वहां पे

play07:30

फेक दो और उसके बाद तुम एक डाटा को लाइक

play07:33

तुम डाटा को कंज्यूम करो वन बाय वन और

play07:35

मेबन बैजेस तो वो डाटा को कुछ प्रोसेस करो

play07:38

और फिर तुम उसको डेटाबेस में रखो

play07:40

बेसिस उसको बेस्ट ऑप्टिमल वे में जी तरह

play07:43

से तुमने इंडेक्सिंग किया जी तरह से भी

play07:45

तुमने रोजन कॉलम्स बनाया उसके बेसिस पे वो

play07:47

डाटा को रख सके ठीक है दिस इस नंबर वन

play07:50

पॉइंट नंबर तू अगर तुम डाटा की बात करते

play07:52

हो तो दो तरह का डाटा होता है नंबर वन इस

play07:54

अनस्ट्रक्चर डाटा सिक्योरिटी डाटा ठीक है

play07:57

स्ट्रक्चर डाटा क्या होता है बेसिकली जब

play07:59

तुम किसी भी डेटाबेस की बात करते हो थॉट्स

play08:02

डेट हो मेक पोस्टर्स की बात कर रहे हैं तो

play08:03

पोस्टेड इसके एक एसक्यूएल डेटाबेस राइट

play08:05

इट्स एन रिलेशन डेटाबेस रिलेशन डेटाबेस के

play08:08

अंदर यू नो डेट यू हैव लाइक कॉलम्स लाइक

play08:10

रोज और कॉलम्स होते हैं राइट सो लेटर से

play08:12

डेट ये हमारे कुछ कॉलम्स हैं और सिमिलरली

play08:14

हमारे पास कुछ यहां पर रोज होते हैं राइट

play08:16

तो जो डाटा होता है वो रोज और कॉलम्स के

play08:19

अंदर राहत है ठीक है इन रोज के ऊपर ठीक है

play08:21

इन रोज के ऊपर हमारे पास इंडेक्स होता है

play08:23

पर एग्जांपल चाहिए आईडी है यहां पर एक

play08:25

स्ट्रिंग है यहां पर एक बार का रहा है

play08:26

यहां पर एक नंबर है यहां पर एक बूंद है तो

play08:29

ये जो डाटा होता है ना ये बहुत ही

play08:31

स्ट्रक्चर्ड फॉर्मेट में रखा जाता है ठीक

play08:33

है इट्स नोट लाइक की ये जो डाटा है ये बस

play08:35

यहां पे हमने फेक दिया है ये डेट ऑफ बर्थ

play08:37

स्ट्रक्चर्ड इसका बेनिफिट क्या मिलता है

play08:39

डेट तुम डाटा को जल्दी क्वेरी कर सकते

play08:40

युटुब और तुम्हें पता किस तरह

play08:46

से सर्विसेज होते हैं वो अनस्ट्रक्चर डाटा

play08:49

के लिए होता है ठीक है जहां पर डाटा बहुत

play08:51

जल्दी-जल्दी जेनरेट हो रहा है पर एग्जांपल

play08:53

हमने एक एग्जांपल ली थी लेट से एग्जाम आते

play08:55

हो जब डिलीवरी बाय जब वो चल रहा है ठीक है

play08:57

वो डाटा जेनरेट करता जा रहा है करता जा

play08:59

रहा है विच इस अनस्ट्रक्चर ठीक है तो वो

play09:02

जितना भी डाटा है वो तुम एक बार काफी कम

play09:04

ठीक है बिकॉज़ तुम उसको कहां रखोगे तुम

play09:06

अपने डेटाबेस में रख नहीं सकते यू कैन नोट

play09:07

क्योंकि जो वो डाटा ए रहा है वो एक

play09:09

अनस्ट्रक्टेड डाटा है ठीक है अगर तुम उसको

play09:11

एक ही डाटा को पहले स्ट्रक्चर करने बैठोगे

play09:13

फिर तुम इंसर्ट को ये भी करोगे डेटाबेस के

play09:15

अंदर तो तुम्हारा डेटाबेस बहुत जल्दी डॉ

play09:17

हो जाएगा और यू कैन नोट डू डेट ठीक है वो

play09:19

बिल्कुल भी स्केलेबल नहीं होगा तो काफी का

play09:22

क्या कहता है यार तुम किसी भी स्कीम हमें

play09:23

किसी भी तरह का डाटा इसमें फेक दो ठीक है

play09:25

इसमें कोई स्कीम नहीं है कोई कुछ नहीं है

play09:27

तुम बस एक जेसन स्ट्रिंग बना तुम जी मर्जी

play09:29

तरीके का डाटा फेक दो ठीक है हो सकता है

play09:31

उसमें एटीट्यूड हो सकता है उसमें ना हो हो

play09:33

सकता है उसके अंदर कुछ डाटा एक्स्ट्रा ए

play09:35

रहा हो सकता है वहां पे कुछ एरर दो तो बस

play09:37

तुम अपना डाटा यहां पर फेक दो ना ठीक है

play09:38

तो मैं कुछ भी करने की जरूर नहीं है जो

play09:41

तुम्हारा कंज्यूमर हुआ

play09:43

पिक करेगा ठीक है उसको प्रोसेस करेगा उसके

play09:47

ऊपर कुछ वैलिडेशन रन करेगा उसको वो बैच

play09:49

इंसर्ट करेगा डेटाबेस के अंदर तो वो चीज

play09:52

कुछ टाइम लेंगे लेकिन वो तुम्हारे

play09:53

अनस्ट्रक्चर डाटा को बेसिकली स्ट्रक्चर

play09:55

में कन्वर्ट कर रही है विच इस टेकिंग टाइम

play09:57

ठीक है बिकॉज़ जब तुम्हें डाटा बनाते हो

play09:59

तुम्हारे पास मल्टीपल टेबल्स होंगे जिसके

play10:01

अंदर कुछ तुमने फॉरेन किस और रिलेशंस

play10:03

वगैरा रखें होंगे तो वो सारे जितनी भी

play10:06

वैलिडेशन क है वो सब टाइम लेते हैं तो ठीक

play10:08

है ना उसको तुम एक तरह से बैकग्राउंड में

play10:10

होने दो ना अगर ये सब चीज लेट से 2

play10:12

सेकेंड्स का टाइम लेती है या फिर तुम बैच

play10:14

मैं करते हो तो इट्स ओके ना तुम डाटा को

play10:16

लॉस नहीं कर रहे ठीक है बिकॉज़ कफ का बस

play10:18

अपने आपको मतलब काफी डाटा को कंज्यूम करता

play10:21

जा रहा है करता जा रहा है विदाउट और डॉ तो

play10:23

तुम्हारा जो डाटा वो लूज नहीं हो सकता यू

play10:25

कैन यू कैन लॉस डेट आईटी ठीक है बिकॉज़

play10:28

तुमने इसको फटाफट कंज्यूम कर लिया आपका के

play10:30

अंदर और बाद में तुम उसको कंज्यूम करते

play10:32

रहो लेट से डेट अगर किसी पॉइंट पे

play10:34

तुम्हारा तो डाटा दिस इसे डी एग्जास्ट हो

play10:36

भी जाता है लेट से तुम्हारे पास जो

play10:37

कनेक्शन पाल सब तुम्हारा डाटा बेस थोड़ा

play10:39

सा ओवरवेल में हो गया

play10:40

तो मैं अपने डाटा बेसिस को अपडेट करना तो

play10:42

लेट से डेट अगले 2 मिनट के लिए लेट टकले 2

play10:45

मिनट के लिए तुम्हारे डॉ है कोई बात नहीं

play10:47

ना तुम्हारा जो कंज्यूमर है वो रुक गया

play10:49

ठीक है कफ का थोड़ी ना रुकेगा कफ का अपना

play10:51

कंज्यूम करता जाएगा जब भी तुम्हारा दो

play10:53

मिनट के बाद कंज्यूमर वापस अप होगा वो फिर

play10:56

से डाटा को इंसर्ट करना शुरू कर देगा अगर

play10:58

तुम डायरेक्टली डेटाबेस के ऊपर कोई लाइक

play11:00

रीड राइड्स करोगे तो फर्स्ट ऑफ जो आईटी

play11:03

बिल टेक टाइम डाटा लॉस हो सकता है और

play11:05

तुम्हारा जो डेटाबेस है वो बहुत जल्दी

play11:06

डाउनलोड हो जाएगा सो डेट इस दी नीड ऑफ कर

play11:09

ठीक है तो डेटाबेस इसका जो में परपज है ना

play11:12

डेट इस नोट तू प्रोवाइड दिस थ्रोपुत बट

play11:15

डेट इस तू प्रोवाइड एन मेकैनिज्म जिसमें

play11:17

तुम डाटा को ऑप्टिमली बेस्ट वे के अंदर

play11:20

स्टोर और कोई नहीं कर सको ठीक है दिस इसे

play11:23

वेरी इंपॉर्टेंट कोई नहीं कर सको तो जब भी

play11:25

तुम किसी देखो जब भी हम ये बात करते हैं

play11:27

की वेदर वे शुड यू नो इसके लिए डेटाबेस तो

play11:30

वो बेसिक बात क्या होती है की यार हम डाटा

play11:32

को किस तरह से स्ट्रक्चर करेंगे और किस

play11:34

तरह से हम क्वेरी करेंगे ठीक है बिकॉज़ जब

play11:37

तुम गो करते हो तो तुम्हारा एप्लीकेशन

play11:38

ग्रोव करता है तुम्हारा नंबर ऑफ जो है वह

play11:41

गो करता है ठीक है

play11:43

वेरी इंपॉर्टेंट की तुम्हारे पास एक

play11:45

मेकैनिज्म हो डेट तुम ऑप्टिमल वे के अंदर

play11:48

डाटा को क्वेरी कर सको ठीक है सो वो डाटा

play11:50

बेसिस का कम है लाइक यू गो डी पॉइंट ठीक

play11:53

है वो डाटा बेसिस का कम है वो डाटा बेस का

play11:55

रहने दो लेकिन डेटाबेस का ये कम नहीं है

play11:57

की वो फटाफट डाटा को इन करें और उसको बस

play11:59

मतलब यू नो कहानी ना कहानी फंटा ही नहीं

play12:00

डेट इस नोट दी परपज ऑफ डेटाबेस ठीक है तो

play12:03

डेटाबेस इसका वो परपज नहीं है तो वो परपज

play12:05

हमारा कॉर्नर है वो हमारा कफ का रिजॉल्व

play12:07

है कफ का क्या अंदर तुम एग्रीगेशन वगैरा

play12:09

थोड़ी ना रन कर सकते हैं लेट से मतलब मैं

play12:11

आपका की बात नहीं कर रहा हूं लेट से कफ का

play12:12

हेड है तो यू कैन यू टर्न लाइक रेड इसके

play12:15

कैसे वे हैव रेड स्ट्रीम्स ठीक है जो

play12:17

सिमिलर परपज करो सॉल्व करते हैं जैसे की

play12:19

आपका करता है तो वो बस क्या कहते हैं वो

play12:21

बोलते हैं तुम अपना डाटा फेंग करो

play12:22

अनस्ट्रक्चर जैसा मर्जी डाटा कोई वैलिडेशन

play12:24

नहीं कोई कुछ नहीं जो तुम्हारा कंज्यूमर

play12:26

है वो मतलब प्रायोरिकल ही डाटा को उठाता

play12:28

जाए तो प्रोसेस करता था डेटाबेस में रखना

play12:30

था

play12:31

रीजन की हमें इस तरह की सर्विस की जरूर है

play12:34

ठीक है तो वे नीड समथिंग जो डाटा को

play12:36

प्रोसेस करें प्रोसेस का मतलब क्या हो

play12:40

सकता है ठीक है मैं तुम्हें बता देता हूं

play12:40

प्रोसेस का मतलब क्या हो सकता है पर

play12:42

एग्जांपल

play12:45

एप्लीकेशन है ठीक है जोमैटो का एप्लीकेशन

play12:49

जो भी डिलीवरी बाय चल रहा है वो कहानी

play12:53

हीरो का तो वो सर डाटा कहां फेक देगा वो

play12:55

डाटा सर काफी अंदर फेक रहा है तो काफी

play12:57

कंज्यूम करता जाएगा ठीक है कुछ भी

play13:00

लट्टीट्यूड है कुछ भी लॉन्ग वीडियो कुछ भी

play13:01

ऑर्डर आईडी मतलब ऑर्डर की आइडिया कुछ भी

play13:03

जो तुम्हारा कंज्यूमर होगा ना कंज्यूमर वो

play13:06

क्या करेगा देखो जो लट्टीट्यूड लोंगिट्यूड

play13:08

वाला डाटा है ठीक है तुम्हारे कंज्यूमर का

play13:09

बेसिकली कम क्या होना चाहिए भाई जो

play13:11

लट्टीट्यूड लोंगिट्यूड डेट है उसको तुम एक

play13:13

अलग डेटाबेस में रखो पहले बात ठीक है उसको

play13:16

तुम्हें अलग ना डेटाबेस अलग टेबल में रखो

play13:18

दोस्तों हमारा ऑर्डर वाला कम है वो एक अलग

play13:20

टेबल का पार्ट है ना कौन सा ऑर्डर है

play13:22

डिलीवर किया और सेकंड नाम जब वो ऑर्डर

play13:25

डिलीवर हो गया तो मुझे क्या उसकी हिस्ट्री

play13:27

की जरूर है मतलब डू आई रियली नीड की वो

play13:30

किस टाइम पे कहां पे था नहीं ना मैं क्या

play13:32

करूंगा लेट से यार उसने मेरा ऑर्डर 10

play13:34

मिनट्स में डिलीवर किया ठीक है 10 मिनट्स

play13:35

नहीं लेते लेट से लट्टीट्यूड लोंगिट्यूड

play13:37

लट्टीट्यूड लोंगिट्यूड लट्टीट्यूड

play13:38

लोंगिट्यूड तो ये कंज्यूमर क्या करेगा ना

play13:41

यार इस सब को ग्रुप कर ले और तू बस ये

play13:43

निकाल ले भाई वो कहां से चला कहां पहुंच

play13:45

और टोटल टाइम तो 10 मिनट लगा तो जहां

play13:48

तुम्हारे पास यहां पर वन लेट से यार

play13:50

तुम्हारे पास यहां पर 10k एंट्रीज है ठीक

play13:53

है लट्टीट्यूड लोंगिट्यूड मुझे 10000

play13:55

इंटरेस्ट चाहिए रियल टाइम में यूजर को तब

play13:57

दिखाना था तब मैंने दिखा दिया जब ऑर्डर

play13:59

डिलीवर हो ही क्या है तो मैं इसको

play14:00

कंप्यूटर कर लूंगा और मैं बस तीन चीज और

play14:03

कर लूंगा भाई कितने बजे वह चला कितने बजे

play14:06

10 मिनट खत्म ठीक मुझे जरूर ही नहीं है ना

play14:10

ये 10000 लट्टीट्यूड लोंगिट्यूड एंट्रीज

play14:12

अपने डेटाबेस में रखना की और जो भी उसने

play14:14

ऑर्डर डिलीवर किया वो ऑडिट टेबल में दाल

play14:15

दिया तो ये मेरे कंज्यूमर का पार्ट था तो

play14:17

इसने किया क्या डाटा को बस प्रोसेस किया

play14:19

डाटा को कंप्यूट कर दिया और कंप्यूटर

play14:21

वालुज को उसने क्या किया अपने हाय डेटाबेस

play14:24

में रख ली बिकॉज़ अगर मैं ₹10000 रखना

play14:27

बैठूंगा उसको कोई बेनिफिट नहीं है ठीक है

play14:28

मैं अपने बस अननेसेसरी अपना डाटा इंक्रीज

play14:30

कर रहा हूं इसको कोई मतलब नहीं है हां इस

play14:33

एंट्री को मुझे पहले कंज्यूम करना था

play14:34

बिकॉज़ जब वो ऑर्डर डिलीवर हो रहा था मुझे

play14:37

वो रियल टाइम में यूजर को दिखाना था डेट

play14:39

अभी तुम्हारा ऑर्डर कहां पे है जब वो पूरा

play14:41

कम हो गया तो मैंने कंप्यूटर वालुज अपने

play14:43

डेटाबेस में रख ली मेरा डाटा बेसिस क्लीन

play14:45

ठीक है मैं मेरे पास थ्रोपुत और एवरीथिंग

play14:48

इस गुड तू को सो दिस इस डी इंर्पोटेंस ऑफ

play14:51

सर्विसेज लाइक काफ्का और आईटी इसे तो लाइक

play14:54

काफी नॉर्मल वीडियो थी सो आई होप डेट यू

play14:56

गो डी पॉइंट डेट हमें काफी सर्विसेज की

play14:58

जरूर क्यों होती है सो थॉट्स जो पर दिस

play15:00

वीडियो आई होप मैं तुम्हारा डाउट क्लियर

play15:02

कर पाया और था वास डी रियली ग्रेट डाउट

play15:05

ठीक है तो अगर तुम्हें और भी डाउट्स होंगे

play15:07

तो प्लीज कमेंट क्षेत्र में पूछते रहना सो

play15:09

था पर दिस वीडियो मिलते हैं

Rate This

5.0 / 5 (0 votes)

Related Tags
KafkaData ManagementDatabasesHigh ThroughputData ProcessingIT SolutionsTech InsightsComment AnalysisData StorageSystem Performance