Personal repository of common building blocks that I keep running into over and over again.
TODO: Soon with reference implementations (maybe in multiple languagues).
A service is structure that starts a background thread or task, and accepts inputs to process them asynchronously with respect to the caller.
A service manager is a structure that manages multiple services instances of the same service. For example: A service manager that manages services for each multiple incoming data streams. Each service instance is an instantiation of a service.
A structure at the center of an application that accepts complex input structure such as a request or command, and does what the request or command describes.
A structure that wraps some resource-intensive function, but stores the results with respects to each observed set of parameters and returns the cached result if the input was already observed before.
An identifier is a structure that wraps some pointer-like data, but prevents the caller from creating one themselves that is invalid.
[related to type modelling] [related to Facade]
A structure that can be easily mapped to a serialized counterpart such as a file or a network packet.
A structure that represents a connection to some external service. It will typically provide the caller with functions to interact with the external service, and represents a single "connection" to such an external service. Often used in the context of databases, or internet APIs.
A structure that takes binary or text input and turns it into a sturctured format.
Note: Hard to do correctly since they often have the property that whilst building the representation their internal state is incomplete and unstable.
[relate to representation]
The opposite of a format parser.
Often unnecessary since they can be directly implemented as function on their representation object.
[opposite of format parser]
A structure that provides and interface for adding (pushing) objects, but internally buffers those items before forwarding it further. For example: Some object that takes video frames as input, but instead of writing them to a file, buffers them to a fixed (or configurable) amount, and only then writes them as a batch.