SlideShare a Scribd company logo
1 of 21
Node Js Streams & Async Genrators
The problem
Data increased over time and
reach a point when can’t be
handle in simple rest anymore.
Reasons:
•Server limited in Memory size today each
node server as 5G of heap memory
•V8 can’t store string larger than 64 bit
which is ~2GB in RAM
• A stream is bassicly a pipe of data
between 2 or more sources
• To make it easy to think Its bassicly an
abstraction of batching mechanisem
when we don’t need to manage the
batch size or triggerring call to next
batch and all network overhead are
spared .
What is a stream?
Streams types
Writable stream is an abstraction that allows you to write
data over a destination. In a way you can see Writable
streams as an abstraction for output.
Duplex and Transform streams
A Duplex stream is essentially a stream that is both Readable
and Writable. It is an ideal abstraction to represent readable
and writable pipes like TCP connections.
Readable stream
A readable stream represents a source from which data is
consumed. In a way, you can see Readable streams as an
abstraction to consume some input.
Pipe
Bassicly the glue between streams
The same as in terminal command
streamA.pipe(StreamB).pipe(…
The output of streamA became the input of streamB
Problem with node stream
• A lot of Cognitive load
• Documentation Not keeping the same
format of examples
• Documentation Not using intuitive
examples
• API In my opinion not written well
Readable Streams
• - Read a file from the filesystem: `fs.createReadStream(file)`
• - Command line standard input: `process.stdin`
• - An HTTP response (received by a client)
• - An HTTP request (received by a server
Readable Streams
• Readable stream as 2 types
• Flowing mode - When using flowing mode, the data is read from source
automatically and chunks are emitted as soon as they are available.
• Paused mode – When using paused mode on a Readable stream, a
consumer does not receive chunks, but instead, it has to call the `read`
method explicitly to read chunks of data from the stream. The stream
emits a `readable` event to signal that new data is available and that
`read()` should be called to read the data.
Readable Streams - Custom
• Im most cases we are not going to read from file
and we need to create our input source
For example, data from apis or data base
• to create a custom Readable stream we must
extend the `Readable` class and implement the
`_read()` method
Duplex and Transform streams
• Duplex streams are a special class of Duplex streams in which the data
that is written in one end of the stream is internally modified so that it
can be read in its new form on the other end. This essentially a way to
be able to do in flight transformations and it's very useful in multiple
cases:
- Compression / Decompression
• - Encryption / Decryption
• - Data filtering and aggregation
• - Data enrichment
• - Media transcoding
Duplex and Transform streams
• Creating custom Transform streams is unsurprisingly similar to
creating custom Readable streams. Also in this case it's just a
matter of extending the `Transform` class. This time though, we
have to implement the `_tranform` method which accepts 3
arguments:
• `chunk`: the current chunk of data to transform
• `enc`: a string that represents the current encoding of the data
• `cb`: a callback to invoke when the transformation is done. This
allows you to have asynchronous transformations.
Duplex and Transform streams
Manipulate data after
function ? 
Writable Streams
• A Writable stream is an abstraction that allows you to write data over a
destination. In a way you can see Writable streams as an abstraction for
output.
Some examples of Writable streams:
- Writing to a file with `fs.createWriteStream()`
• - Command line standard output and standard error (`process.stdout`,
`process.stderr`)
• - An HTTP request (when sent by a client)
• - An HTTP response (when sent by a server)
Writable Streams
• Same api as for implemention as the duplex stream which accepts
3 arguments and override _write method:
• `chunk`: the current chunk of data to transform
• `enc`: a string that represents the current encoding of the data
• `cb`: a callback to invoke when the transformation is done. This
allows you to have asynchronous transformations.
Problems with streams

More Related Content

Similar to Presentation.pptx

Kafka streams decoupling with stores
Kafka streams decoupling with storesKafka streams decoupling with stores
Kafka streams decoupling with storesYoni Farin
 
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Guido Schmutz
 
Redis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetupRedis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetupItamar Haber
 
NTP Software Jan 2012 Monthly Meeting IPC Presentation
NTP Software Jan 2012 Monthly Meeting IPC PresentationNTP Software Jan 2012 Monthly Meeting IPC Presentation
NTP Software Jan 2012 Monthly Meeting IPC PresentationMuhamad Hesham
 
SVC / Storwize: cache partition analysis (BVQ howto)
SVC / Storwize: cache partition analysis  (BVQ howto)   SVC / Storwize: cache partition analysis  (BVQ howto)
SVC / Storwize: cache partition analysis (BVQ howto) Michael Pirker
 
AWS Webcast - AWS Kinesis Webinar
AWS Webcast - AWS Kinesis WebinarAWS Webcast - AWS Kinesis Webinar
AWS Webcast - AWS Kinesis WebinarAmazon Web Services
 
Public private hybrid - cmdb challenge
Public private hybrid - cmdb challengePublic private hybrid - cmdb challenge
Public private hybrid - cmdb challengeryszardsshare
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3farshad33
 
Sept 2017 internetworking
Sept 2017   internetworkingSept 2017   internetworking
Sept 2017 internetworkingshahin raj
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilitiesG Prachi
 
Unit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer networkUnit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer network4SI21CS112RakeshMS
 
Building Big Data Streaming Architectures
Building Big Data Streaming ArchitecturesBuilding Big Data Streaming Architectures
Building Big Data Streaming ArchitecturesDavid Martínez Rego
 
Apache flume - an Introduction
Apache flume - an IntroductionApache flume - an Introduction
Apache flume - an IntroductionErik Schmiegelow
 
UNIT II DIS.pptx
UNIT II DIS.pptxUNIT II DIS.pptx
UNIT II DIS.pptxSamPrem3
 
What is a MS Windows Network Drive
What is a MS Windows Network DriveWhat is a MS Windows Network Drive
What is a MS Windows Network Driveadil raja
 

Similar to Presentation.pptx (20)

Apache Spark Components
Apache Spark ComponentsApache Spark Components
Apache Spark Components
 
Debunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingDebunking Common Myths in Stream Processing
Debunking Common Myths in Stream Processing
 
Kafka streams decoupling with stores
Kafka streams decoupling with storesKafka streams decoupling with stores
Kafka streams decoupling with stores
 
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
Spark (Structured) Streaming vs. Kafka Streams - two stream processing platfo...
 
Redis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetupRedis Streams - Fiverr Tech5 meetup
Redis Streams - Fiverr Tech5 meetup
 
NTP Software Jan 2012 Monthly Meeting IPC Presentation
NTP Software Jan 2012 Monthly Meeting IPC PresentationNTP Software Jan 2012 Monthly Meeting IPC Presentation
NTP Software Jan 2012 Monthly Meeting IPC Presentation
 
SVC / Storwize: cache partition analysis (BVQ howto)
SVC / Storwize: cache partition analysis  (BVQ howto)   SVC / Storwize: cache partition analysis  (BVQ howto)
SVC / Storwize: cache partition analysis (BVQ howto)
 
AWS Webcast - AWS Kinesis Webinar
AWS Webcast - AWS Kinesis WebinarAWS Webcast - AWS Kinesis Webinar
AWS Webcast - AWS Kinesis Webinar
 
Public private hybrid - cmdb challenge
Public private hybrid - cmdb challengePublic private hybrid - cmdb challenge
Public private hybrid - cmdb challenge
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Cs556 section3
Cs556 section3Cs556 section3
Cs556 section3
 
Sept 2017 internetworking
Sept 2017   internetworkingSept 2017   internetworking
Sept 2017 internetworking
 
Scalable Web Apps
Scalable Web AppsScalable Web Apps
Scalable Web Apps
 
Network protocols and vulnerabilities
Network protocols and vulnerabilitiesNetwork protocols and vulnerabilities
Network protocols and vulnerabilities
 
Unit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer networkUnit-5_Application_QoS.pdfcomputer network
Unit-5_Application_QoS.pdfcomputer network
 
Building Big Data Streaming Architectures
Building Big Data Streaming ArchitecturesBuilding Big Data Streaming Architectures
Building Big Data Streaming Architectures
 
Apache flume - an Introduction
Apache flume - an IntroductionApache flume - an Introduction
Apache flume - an Introduction
 
Heartbleed
HeartbleedHeartbleed
Heartbleed
 
UNIT II DIS.pptx
UNIT II DIS.pptxUNIT II DIS.pptx
UNIT II DIS.pptx
 
What is a MS Windows Network Drive
What is a MS Windows Network DriveWhat is a MS Windows Network Drive
What is a MS Windows Network Drive
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 

Presentation.pptx

  • 1. Node Js Streams & Async Genrators
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. The problem Data increased over time and reach a point when can’t be handle in simple rest anymore.
  • 7. Reasons: •Server limited in Memory size today each node server as 5G of heap memory •V8 can’t store string larger than 64 bit which is ~2GB in RAM
  • 8.
  • 9. • A stream is bassicly a pipe of data between 2 or more sources • To make it easy to think Its bassicly an abstraction of batching mechanisem when we don’t need to manage the batch size or triggerring call to next batch and all network overhead are spared . What is a stream?
  • 10. Streams types Writable stream is an abstraction that allows you to write data over a destination. In a way you can see Writable streams as an abstraction for output. Duplex and Transform streams A Duplex stream is essentially a stream that is both Readable and Writable. It is an ideal abstraction to represent readable and writable pipes like TCP connections. Readable stream A readable stream represents a source from which data is consumed. In a way, you can see Readable streams as an abstraction to consume some input.
  • 11. Pipe Bassicly the glue between streams The same as in terminal command streamA.pipe(StreamB).pipe(… The output of streamA became the input of streamB
  • 12. Problem with node stream • A lot of Cognitive load • Documentation Not keeping the same format of examples • Documentation Not using intuitive examples • API In my opinion not written well
  • 13. Readable Streams • - Read a file from the filesystem: `fs.createReadStream(file)` • - Command line standard input: `process.stdin` • - An HTTP response (received by a client) • - An HTTP request (received by a server
  • 14. Readable Streams • Readable stream as 2 types • Flowing mode - When using flowing mode, the data is read from source automatically and chunks are emitted as soon as they are available. • Paused mode – When using paused mode on a Readable stream, a consumer does not receive chunks, but instead, it has to call the `read` method explicitly to read chunks of data from the stream. The stream emits a `readable` event to signal that new data is available and that `read()` should be called to read the data.
  • 15. Readable Streams - Custom • Im most cases we are not going to read from file and we need to create our input source For example, data from apis or data base • to create a custom Readable stream we must extend the `Readable` class and implement the `_read()` method
  • 16. Duplex and Transform streams • Duplex streams are a special class of Duplex streams in which the data that is written in one end of the stream is internally modified so that it can be read in its new form on the other end. This essentially a way to be able to do in flight transformations and it's very useful in multiple cases: - Compression / Decompression • - Encryption / Decryption • - Data filtering and aggregation • - Data enrichment • - Media transcoding
  • 17. Duplex and Transform streams • Creating custom Transform streams is unsurprisingly similar to creating custom Readable streams. Also in this case it's just a matter of extending the `Transform` class. This time though, we have to implement the `_tranform` method which accepts 3 arguments: • `chunk`: the current chunk of data to transform • `enc`: a string that represents the current encoding of the data • `cb`: a callback to invoke when the transformation is done. This allows you to have asynchronous transformations.
  • 18. Duplex and Transform streams Manipulate data after function ? 
  • 19. Writable Streams • A Writable stream is an abstraction that allows you to write data over a destination. In a way you can see Writable streams as an abstraction for output. Some examples of Writable streams: - Writing to a file with `fs.createWriteStream()` • - Command line standard output and standard error (`process.stdout`, `process.stderr`) • - An HTTP request (when sent by a client) • - An HTTP response (when sent by a server)
  • 20. Writable Streams • Same api as for implemention as the duplex stream which accepts 3 arguments and override _write method: • `chunk`: the current chunk of data to transform • `enc`: a string that represents the current encoding of the data • `cb`: a callback to invoke when the transformation is done. This allows you to have asynchronous transformations.

Editor's Notes

  1. היום בפלטפורמה אנחנו עובדים בתצורה של Rest מכינים גוש של את ה data ומעבירים אותו בחזרה
  2. Express code response json , send https://github.com/expressjs/express/blob/ee228f7aea6448cf85cc052697f8d831dce785d5/lib/response.js#L174 https://github.com/expressjs/express/blob/ee228f7aea6448cf85cc052697f8d831dce785d5/lib/response.js#L122
  3. אני חייב רגע לעצור ולהגיד שלדעתי ה תצורה שבה כתוב היום ה אפי של stream הוא לא משהו ודיי נוגד את כל הסמנטיקה של node ואני מניח גם שזאת הסיבה שרוב המפתחים מסתבכים עם הנושא הזה וגם השאלות ב stack over flow תמיד חוזרות על עצמם אני ינסה לפשט את זה כמה שאני יכול אחר כך מי שרוצה לצלול קצת יותר בכיף
  4. Examples: Basic-examples/readable-basic-flowing.js Basic-examples/readable-basic-paused.js
  5. Examples: Basic-examples/costum-readable/cls.js Basic-examples/costum-readable/push-directly.js Expose push function inside _read bad api Different typt of implemantation can confuse From now on all examples I show will be with class inharatance
  6. Example code upercasify
  7. Example code upercasify