Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routes #4

Closed
nikhan opened this issue Aug 27, 2014 · 7 comments
Closed

routes #4

nikhan opened this issue Aug 27, 2014 · 7 comments
Labels

Comments

@nikhan
Copy link
Contributor

nikhan commented Aug 27, 2014

No more query routes and rules.

Instead, every block has a number of inputs, a number of outputs, and a number of states.

Inputs
The only parameter an input has is path. This allows a user to specify where in the incoming JSON object to look. This path parameter is a simplified version of gojee, such that, it always returns a single value or it returns an error if a value is not found. It removes the capability of doing a query across array elements, such that .foo[].bar is no longer a valid (.foo[0].bar is still valid, however).

Instead of rules, there are a number of inputs. For instance: a count block would have a msg input and a window input. The window does not accept rules, it accepts a stream of parameters that are used to effect the state of the block. These parameters would look like a stream of strings, 30s.

(depends on #3)

State
Each block can have a number of states. These states can optionally have a pollable input pin/output pin emitter as well as an HTTP endpoint. The benefit of having a state over our current implementation is that it combines the functionality the production of a message for an HTTP endpoint as well as for the rest of the ST system, meaning a block author does not need to write multiple bits of code that do the same thing.

Outputs
Instead of having a single output, a block can have multiple outputs. These should be able to be named.

@nikhan nikhan changed the title simplification of routes, rules routes Aug 27, 2014
@mikedewar
Copy link
Collaborator

does state == rule?

@nikhan
Copy link
Contributor Author

nikhan commented Aug 27, 2014

@nikhan
Copy link
Contributor Author

nikhan commented Aug 27, 2014

States are any information the block needs to paramaterize its function.

*edit I realize that this is wrong usage of the word "state" but the point still stands

@mikedewar
Copy link
Collaborator

in streamtools there's quite a distinction between rules (like Interval) and states (like Count). I think you're getting rid of that.

@nikhan
Copy link
Contributor Author

nikhan commented Aug 27, 2014

there is a distinction because you can't send a message and set state Count
you can send a message and change Window

@mikedewar
Copy link
Collaborator

ok so in st-core there are no rules

@mikedewar mikedewar added the spec label Aug 27, 2014
@jacqui
Copy link

jacqui commented Nov 24, 2014

I like this new system of anarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants