Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
(WARNING: EXPERIMENTAL)
Framework for parallel data-flow based applications.
It is influenced by, inspired by, and in many cases similar to:
/(((data|signal|packet)?(stream|flow)|pipe(line)?|(flow|event|signal|reactive)-(processing|programming|architecture|computing|language)/
combined with the multitude of parallelization, concurrency, and clustering paradigms, etc. etc...This library and associated commandline tools are most appropriate for these types of (overlapping and somewhat redundant) problems & constraints:
Dataflow-Oriented | Problems where the easiest way to look at it is a (possibly branching) pipeline of operations on a stream of data. |
Steady-State | Where the processing nodes and overall application have upper bounds on their memory requirements in order to safely and reliably handle very long running streams. i.e., bounded online algorithms and streaming-algorithms |
Functional | Most of the generator & processing nodes are usually assumed to be side-effect-free and pure (at least given all previous inputs). |
Composable | Easy to make nodes out of combinations and networks of other nodes |
Proportionate | Very easy and fast to do a simple pipeline (for example some simple functions that mutate an integer from within the console), but easily scales up to more complex production-ready solutions/projects. It strives to maintain the following inequality: effort ≤ problem‐complexity . |
It is additionally tuned for (but doesn't assume) problems with the following properties:
Parallel | For example, map-reduce type problems, or wherever strictly sequential simply isn't required. |
Ordered | When there is a natural ordering to the tokens. e.g., a time-series, or bytes from most IO streams; |
State-Accumulation | Where the tokens can accumulate state and where processing nodes can look at previous process results relative to that token as they pass through the graph. As opposed to destructive changes to the token at each process or lack of tokens altogether (like simple functions). |
Multi-Stream | Potentially create secondary streams that are unsynchronized with the original stream; |
Coordinated | Dataflow type problems where there is a need to synchronize/coordinate multiple orthogonal streams; |
Decoupled | A way to cache intermediate results (e.g., half way through the pipeline) so that multiple stream processing applications can be simultaneously writing results and other unrelated processes reading a stream of results- sometimes in sync with when they are being written by the decoupled process. (some good examples to come). |
Daemonized | Where certain stream sources and graphs of processors and sinks should be managed as a single long-lived system process when desired. |
Simulations/Reruns | Persistent caching nodes (nexus decouplers) etc. allow one to easily simulate reruns of past parts of a stream- possibly generating a new version of subsequently persisted results. |
Rewinding | Processing nodes that require (bounded) rewinding that propagates to other nodes. |
Use Little's law for queue bounds
+---+ +------+ +------+
| G | --> | f(x) | --> | g(x) | -->
+---+ +------+ +------+
->(x){Math.sin(x/100.0)}
)each
method (will be made lazy if it isn't already)Thing | Otherwise Known As | |
---|---|---|
Stream | Flow, Signal | Related ordered data representation- bundled into tokens (chunks). A gradually consumed state |
Token | Packet, Event, Chunk, Element, Sample | Coherent instance of stream data being mutated and passing through the pipelines (potentially in parallel) - special values of EOF & Exceptionals |
Defined by:
Stream == token type == (the data accumulated in the token are related) & especially (same intervals/timing)
A node may be a generator for one or more streams AND/OR a sink for one or more streams, AND/OR an operator on one or more streams (accepting tokens from one or more upstream nodes and emitting them to one (or more?) downstream nodes. Generally though most nodes will deal with only a single stream- and most of those will be processor nodes, sandwiched between a generator at the beginning and a sink at the end.
Aspect | Otherwise Known As | |
---|---|---|
Generator | Observable, Source, Origin, Enumerator, Producer, Start | Has one or more output streams that originate there & are not among its incoming streams (although the incoming streams may have participated in its creation). |
Sink | Consumer, Iteratee, Fold, Reducer, End | folds over one or more input streams & emits nothing except a final result/stats if the done/EOF token is encountered. Usually in charge of any external side-effects. |
Processor | Observable, Filter, Enumeratee, Operator, Function, Convolution-operation, Transformer | Receives a token from a stream and either passes it through or advances its state before outputting the same stream-type. |
Junction | Whenever a node has input from more than one signal |
Most nodes are intra-stream nodes...
Parameterization (applying the specified or calculated parameters) only happens once, when the first token is about to hit the node. Any state change after that needs to be handled manually.
(maybe nodes with no generators applied get default behavior if they are run standalone- integer sequence generator, for example, or default to stdin, argf, etc...)
Operate on data within a single stream
Type | Behavior |
---|---|
Pipe | Chains intra-stream nodes together to operate on a token sequentially |
Branch | Sends same token down multiple parallel branches (w/ or w/o conditions, w/ or w/o automatic remerge (wait) (?), w/ or w/o infered token subselection). Some paths may be skipped/short-circuited due to conditions. |
Tap | Observer, splice, tee ... Semantic sugar to specify a non-synchronizing branch off of a point in a stream from the perspective of the branch (as if it were a generator). Can also be dynamic and/or temporary. |
(Cached) | Wrap around a node if it has referential transparency (given all previous input). Might not implement for a while |
Process | (Map, Node, Function, ...) Simple function on latest token data |
System | A specialized Process that interfaces with an external application (via stdin/stdout/stderr for the most part?) |
External | Another specialized Process that interfaces with an external application, this time via some other IPC call/response mechanisms |
View | (Select?) Changes what the next node will consider the "active data" for the token. |
Recombine | (Wait, Merge, Synchronize, Waypoint) Named synchronization point that also causes a "view" to be the combination of all merged branches. timeout logic, subselection logic, etc. |
NOTES:
Wait
nodes might include logic that allows a "partial" token to go ahead depending on certain system
conditions etc.Application
: Adhoc collection of process networks meant to be run by itself. Usually with a single generator and a
single final output sink- although that stuff can be inferred potentially. While it's meant to be standalone, other
nodes should still be allowed to use it when composing more.
Generators
: Shorthand for a node with zero input streams and one or more output streams. In a broader semantic
perspective a generator is a node that creates any new streams regardless of whether it has input streams (maybe we
should call those Originators
or something instead?)
tail -f
-like or even -F
)Projections
(one input stream, one different output stream with timing change & probably data change):
:+
for sum).
Merge
junctions:
Scatter
junctions:
Generic custom Junction
s: Implementing a Junction node requires that it has to actively use actor-like semantics
(including timeouts and possibly polling multiple streams) to request tokens on the input streams. [implemented by the
fact that in reality it is waiting on all streams at all times, and then decides whether it applies to the given wait
condition].
(could have just as easily been named 'Stream Processing Graph' or 'Nodus Application Specification', ...)
Technically a normal node that happens to:
nodus
execution engineIn practical terms, it:
nodus
command)Token: any object instance but usually openstruct with hash-like access as well (so like HashWithIndifferentAccess) but with WRITE-ONCE semantics! (throws error if the same process/node tries to write the same field a second time)
suggested behavior:
Copyright (c) 2014 Joseph Wecker. MIT License. See LICENSE.txt for further details.
FAQs
Unknown package
We found that nodus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.