Explain the core concepts of Akka Streams and their purposes, including Reactive Streams, Processor, Publisher, and Subscriber.
Akka Streams is a library for processing and transferring data streams, built on the Reactive Streams initiative. It aims to provide back-pressure control, ensuring efficient resource usage.
Reactive Streams is an API specification that defines asynchronous stream processing with non-blocking backpressure. It enables interoperability between different libraries and systems.
Processor represents a stage in Akka Streams that can both receive and emit elements. It acts as a bridge between Publisher and Subscriber, performing transformations or computations on the data.
Publisher is responsible for producing data elements in the stream. It adheres to the demand signaled by its Subscribers, ensuring no overflow occurs due to uncontrolled production rates.
Subscriber consumes data elements from the Publisher. It signals its demand for more elements, allowing backpressure control and preventing overwhelming resources.