HOME

TheInfoList



OR:

In
computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
, a sink, or data sink generally refers to the destination of data flow. The word sink has multiple uses in computing. In
software engineering Software engineering is a branch of both computer science and engineering focused on designing, developing, testing, and maintaining Application software, software applications. It involves applying engineering design process, engineering principl ...
, an event sink is a class or function that receives events from another object or function, while a sink can also refer to a node of a
directed acyclic graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ...
with no additional nodes leading out from it, among other uses.


In software engineering

An event sink is a
class Class, Classes, or The Class may refer to: Common uses not otherwise categorized * Class (biology), a taxonomic rank * Class (knowledge representation), a collection of individuals or objects * Class (philosophy), an analytical concept used d ...
or function designed to receive incoming events from another
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an a ...
or function. This is commonly implemented in C++ as callbacks. Other
object-oriented languages Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impleme ...
, such as
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and C#, have built-in support for sinks by allowing events to be fired to delegate functions. Due to lack of formal definition, a sink is often misconstrued with a gateway, which is a similar construct but the latter is usually either an end-point or allows bi-direction communication between dissimilar systems, as opposed to just an event input point . This is often seen in C++ and hardware-related programming , thus the choice of nomenclature by a developer usually depends on whether the agent acting on a sink is a producer or consumer of the sink content.


In graph theory

In a
Directed acyclic graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ...
, a source node is a node (also known as a vertex) with no incoming connections from other nodes, while a sink node is a node without outgoing connections. Directed acyclic graphs are used in instruction scheduling,
neural networks A neural network is a group of interconnected units called neurons that send signals to one another. Neurons can be either Cell (biology), biological cells or signal pathways. While individual neurons are simple, many of them together in a netwo ...
and
data compression In information theory, data compression, source coding, or bit-rate reduction is the process of encoding information using fewer bits than the original representation. Any particular compression is either lossy or lossless. Lossless compressi ...
.


In stream processing

In several computer programs employing streams, such as
GStreamer GStreamer is a Pipeline (computing), pipeline-based multimedia framework that links together a wide variety of media processing systems to complete complex workflows. For instance, GStreamer can be used to build a system that reads files in one f ...
, PulseAudio, or PipeWire, a sink is the starting point of a pipeline which consumes a stream of data, while a source is the end point which emits a stream a data (often after performing some processing function on the data). An example is an audio pipeline in the PulseAudio sound system. An input device such as a microphone is an audio device which will send data to a sink for consumption. The audio signal will then be made available as an audio source, which may have undergone audio processing, such as volume adjustment. Typically, it will also pass through other stages, such as audio mixing. In this way the volume adjustment processing receives audio samples via its sink, emits them from its source, which is then connected to a mixer sink, which mixes audio, ultimately emitting the processed audio from its source. Referred to as an output source in PulseAudio. The configuration and connection of these pipelines can be complex and dynamic. The terms sink and source may be confusing, but they specifically refer to the point of entry (source) and exit (sink) in systems. The terminology is exactly analogous to that used in other domains, such as electrical engineering.


Other uses

The word sink has been used for both input and output in the industry. Mobile sink is proposed to save sensor energy for multihop communication in transferring
data Data ( , ) are a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted for ...
to a base station (sink) in
wireless sensor network Wireless sensor networks (WSNs) refer to networks of spatially dispersed and dedicated sensors that monitor and record the physical conditions of the environment and forward the collected data to a central location. WSNs can measure environmental ...
s.


See also

*
Flow network In graph theory, a flow network (also known as a transportation network) is a directed graph where each edge has a capacity and each edge receives a flow. The amount of flow on an edge cannot exceed the capacity of the edge. Often in operations re ...
*
Event-driven architecture Event-driven architecture (EDA) is a software architecture paradigm concerning the production and detection of Event (computing), events. Event-driven architectures are Continuous design, evolutionary in nature and provide a high degree of fault to ...


References

Object-oriented programming Network theory Networks {{Comp-stub