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

Compiling nools from different sources #6

Closed
fmatar opened this issue Aug 22, 2012 · 6 comments
Closed

Compiling nools from different sources #6

fmatar opened this issue Aug 22, 2012 · 6 comments
Assignees

Comments

@fmatar
Copy link

fmatar commented Aug 22, 2012

Nools should allow compiling flows and rules from different sources. Currently the rules compiler is reading the flow definition file from the file system, this should be changed to be read from a stream, this way people have the flexibility to store the rules wherever they please, in the file system, building them through an interface and storing them in memory, read them from a different location, etc...

The mechanism of having the rules stored only in file systems is neither flexible nor secure, rules might be a critical factor in evaluating business operations

@ghost ghost assigned doug-martin Aug 24, 2012
@doug-martin
Copy link
Contributor

I agree this would be a great addition, should be in the next release.

@fmatar fmatar closed this as completed Nov 6, 2012
@fmatar fmatar reopened this Nov 6, 2012
@hazkiel
Copy link

hazkiel commented Nov 6, 2012

Hi, I'm also interested in this feature. When can we expect it?

@doug-martin
Copy link
Contributor

Hi,

We plan on addressing both #6 and #5 in the next couple of weeks if you have any specific use cases you would like addressed please provide an example! In the next release we plan on providing the functionality of compiling nools DSL from a stream such as a file stream, once the end event has been issued we will finish the compilation. The biggest issue is the conflict from issue #5 which requires a source to be available which will require a shim in order to to work as it currently stands. If either of you has comments or requirements for the API let us know and we will try to incorporate them in to the spec.

-Doug

@hazkiel
Copy link

hazkiel commented Nov 7, 2012

Hi again,

I read some bits of your code and I don't see why there's a conflict with the other issue.
We only need a generic version of the "compile" method which would be identical to the existing one but would accept a string (containing the flow data) instead of a file path. This way, you would directly parse the given string instead of reading from the FS and continue normally.

Thanks,
Hazkiel

@fmatar
Copy link
Author

fmatar commented Nov 7, 2012

Instead of a string you could use a stream, a stream is more generic and would allow your rules to be read from even an external source, such as a url

@doug-martin
Copy link
Contributor

So as of v0.1.0 you can now parse and compile source strings from the nools.compile method. Using a string allowed us to keep the compile method sync, where with a stream it would have to become async. So instead of having two different versions one being sync and one async you can gather the source from wherever you want to let nools parse and compile it.

-Doug

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

No branches or pull requests

3 participants