ernstl / flowd Goto Github PK
View Code? Open in Web Editor NEWAn inter-language runtime for flow-based programming (FBP)
License: Other
An inter-language runtime for flow-based programming (FBP)
License: Other
Allow creation of all kinds of TCP-based servers for FBP network input.
Reasons:
Thus, remove in favor of IIPs (#43), which are now implemented.
Goal: No more argument passing to components necessary anymore.
compMeta
specification in currently-used .fbp parserQuickly detect connection having gone away.
tcp-server
component.tcp-client
component.Goal: To allow launch
instances and their components to run without a terminal, ie. in the background.
Requires:
launch
encounters (network etc.)
-debug
to require a debugging destination-err
duplicate of #13
libflowd
systemd
socket activation is roughly the functionality of inetd
. It passes in a file descriptor, which is the network connection.
Where could this be useful?
Useful resources:
Implementation:
tcp-server
would need the file descriptor.Resolution:
Send in a frame of type control.EOF
or something and note name of port somewhere. Or, end of stream, rather.
What needs to be changed:
flowd
has to send port-closed notification frame to downstream components if a component has exited (normally), eg. file has been read in full.libflowd.ParseFrame()
should forward io.EOF
on first Read()
so that ...flowd
knows this is a normal EOF and can react accordingly.flowd
should handle EOF from component differently than non-zero exit code.Question: What to do with any possibly missing IPs? - Solution: Once the IP is written to component Stdin, it is the problem of the component. Even if a component would acknowledge each IP, this could not prevent crashes.
Question: How to return the component to the same state as before? Certainly, some components are stateful. Which IPs to re-send? What if the component crashed in the middle of a chain of IPs, which depend on each other and only make sense as a whole? Maybe implement a safe-keeper component, which caches a chain of IPs until it gets acknowledgment of successful completion from downstream.
flowd
monitors and keeps connection with all its launch
subprocessesChanges necessary:
Add way to give name of port on other side so that a frame's destination Port can be set and verification be done according to port name.
Recognition of correctly addressed frames on input endpoint. How to do this? In launch in the URL specification.
Currently detected using the name in the Port
frame header field. If keeping discrimination via some header field: Who should set the correct Port
header field - sender or receiver? Does the sender have to know the name of the target port? How is this done in other protocols, for example SMTP with regards to its From
and To
header fields.
flowd -deps
to copy / scp list of these components over to target machine(s) and restart systemd service for the network via ssh.flowd
, but list of components can be output.-deps
flag for flowd
displaying the list of component dependencies for the given network.-deps
flag code.Add a descriptive project info file.
out[*]
should copy it to all defined out[0..n]
output ports. The responsible launch
instance should do this.libunixfbp.ArrayPortMemberWriters("OUT")
and then serializing into all writers.libflowd
could serialize once into a buffer then write the bytes into the given multiple writers.Probably best done as extension to orchestrator.
launch
instance back to the orchestrator.Probably best done as extension to orchestrator.
launch
instance back to the orchestrator.out[2:max]
and out[2:4]
.Launches a network of components based network description file.
.drw
) and a .fbp
format.fbp
parser libraryflowd
Need possibility to pass command-line arguments and pipe something into it, then catching output. Recently removed support to pass args via metadata (#45), but this was limited anyway.
Implementation:
iip=args
?launch
: Read all output from command into one IP, send this on into FBP network for further processing.framing=off
... but how to handle multiple incoming IPs? Line-separate them? Zero-byte-separate them?Notes toward a solution:
launch
, therefore handle this in a component extcmd
or pipecmd
or similar.Further notes:
launch
with flag -external=[stream/perip]
to enable this feature.element <drawfbp_file> closed by </net>
Many useless conversions and indirections and more complicated code because of it being a pointer of []byte
. Sounded like a good idea in the beginning (moving data around as a pointer), but so far incurred many useless temporary variables and conversions etc.
May be reversed in the future, but so far this seems like a sensible choice to make it []byte
.
@
at the beginningCan inspect state of component, statistics, etc. and its launch instance during runtime.
flowd
.launch
instance back to the orchestrator.Generates certificates for mutual authentication of component connections, one for each component, or even one for each port. So this tool must be flexible.
openssl ca
tool or tinyca
.Not required any more as described initially:
flowd
has no notion of LAN network connections any more.Resolution:
gate
.Content ideas:
launch:
examples:
ssh-agent
connection to remote server (with cmd
component).NOTE: Already possible using cmd
component using the security-audited OpenSSH.
Options:
Content-Coding
, see the HTTP spec for a useful list.In flowd, there is no negotiation like in HTTP. So it might be tricky to introduce new compression methods. OTOH, at least inside own organization / application, the launch program is always homogeneous.
For organization traversal, a special component would have to do cross-organization authentication anyway and could also do any necessary re-encoding.
Golang packages:
Ideas:
Probably need a Scanner with a custom scan function.
Since the ZeroMQ successor nanomsg is v1.0-production now, inclusion of its socket capabilities would be a good fit.
Nanomsg bindings for Go see this list.
Status:
Goal: allow creation of web API.
Steps:
http-id
or req-id
header field, same idea as in tcp-server
component.tcp-server+conf -> HTTP+conf -> Router+conf -> Handlers -> HTTP in -> tcp-server in
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.