Comments (4)
Connection payload/meta
Update Connection
to { from addr, to map[addr]payload }
where payload
describes how connector
should interpret incoming message before sending it to receiver.
Payload could be something like:
{
type: PayloadType # normal | struct field reading
structField: []string
}
Pros:
- Compile time safety - structure of message is known before program is running so solution this problem must be part of the program itself, like expression in the tree-based languages
- Allows to execute nested access requests like
x.y.z
in a row without using lots of components and without making the program flow complicated with error checks
Cons
- Leads to modifications of port-address - Must be VERY good thought
Maybe solution for #37
UPD
net:
in:
<name>:
- nodeType: worker
name: <worker_name>
meta:
connectionType: normal | structReading
structPath: [foo, bar] # value.foo.bar
from neva.
Component based approach
Use some generic struct field reader
component with in: struct, field
and out: field
Problems
- Type-checking: since there is no IIP-only ports (ports that are feeded by only
const
nodes) there is no way to compile-time check if struct has some field or not- some
err
port must be introduces which is bad - inGo
we have compile time checks for this set of errors
- some
from neva.
Effect fieldReaders
nodes:
fieldReaders:
userAge:
field: age # must throw compile err if needed
from neva.
#31 (comment) Choosed
from neva.
Related Issues (20)
- [Idea]: Should we write Runtime funcs to use one Goroutine per port? HOT 4
- Multiline Comments HOT 2
- Inconsistent output inside `For` with branching HOT 7
- Match allows array-port overwrite HOT 1
- Consistent naming for boolean components
- Alternative syntax for outports HOT 3
- `Zip` component HOT 2
- Iter should support strings HOT 1
- Race-condition with fan-in pattern HOT 2
- Force Outport Operator HOT 3
- Data processing components out of the box
- `Find` component HOT 1
- `Has` component HOT 2
- `Collate` component
- Reduce noise when using ports by replacing `:` with `.` HOT 1
- HTTP Client
- Improve struct field selectors syntax
- Move println to io HOT 3
- Reduce as higher order component for binary handlers HOT 1
- Move Lock to sync
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neva.