Define a function that can be used in Stellar

2018-01-16 Thread Ali Nazemian
Hi all, Is there any way that we can define a function that can be used rather than duplicating a logic multiple times? Cheers, Ali

Re: Define a function that can be used in Stellar

2018-01-17 Thread Simon Elliston Ball
At present you can certainly create custom stellar functions in Java. I’m guessing however that what you’re looking to do is create a kind of function that combines a number of stellar functions to avoid repetition, or to ensure consistency of certain parameters for example. Is that what you’re

Re: Define a function that can be used in Stellar

2018-01-17 Thread Ali Nazemian
Hi Simon, Yes, that is exactly what we are looking for. Is there any example regarding adding a Stellar function in Java? Hopefully, we don't need to rebuild the corresponding modules for this? Cheers, Ali On Wed, Jan 17, 2018 at 8:40 PM, Simon Elliston Ball < si...@simonellistonball.com> wrote:

Re: Define a function that can be used in Stellar

2018-01-17 Thread Simon Elliston Ball
https://github.com/apache/metron/tree/master/metron-stellar/stellar-3rd-party-example gives good details on how to add a stellar function. Stellar will pick up an annotated function on its class path, so to

Re: Define a function that can be used in Stellar

2018-01-17 Thread Ali Nazemian
Thanks, Simon. We have already got a script to deal with classpath management for the parsers. We should be able to use it for this extension as well. Yeah, I agree. It will be much easier to define functions on the fly and use them afterwards. It could be defined as Lambda or custom function. Re

Re: Define a function that can be used in Stellar

2018-01-17 Thread Nick Allen
Ali - Can you describe the logic that you are trying to perform? That would be useful as a use case to help drive a discussion around creating named functions in Stellar. On Wed, Jan 17, 2018 at 6:29 AM Ali Nazemian wrote: > Thanks, Simon. We have already got a script to deal with classpath >

Re: Define a function that can be used in Stellar

2018-01-17 Thread Ali Nazemian
It is a bit complex. We want to create a function that accepts a list of arguments for an asset and generate an asset identifier that can be used as a row_key for the enrichment store. The logic would be complicated, though. We may need to include some sort of similarity aware hash function as a pa

Re: Define a function that can be used in Stellar

2018-01-17 Thread Simon Elliston Ball
Have you looked at the recent TLSH functions in Stellar? We already have that for similarity preserving hashes. Simon > On 17 Jan 2018, at 12:35, Ali Nazemian wrote: > > It is a bit complex. We want to create a function that accepts a list of > arguments for an asset and generate an asset ide

Re: Define a function that can be used in Stellar

2018-01-17 Thread Nick Allen
If something we have already does not fit the bill, I would recommend creating that function in Java. Since you described it as "a bit complex" and "the logic would be complicated" I don't see any value in defining something like this in Stellar with named functions. Best On Wed, Jan 17, 201

Re: Define a function that can be used in Stellar

2018-01-17 Thread Matt Foley
;user@metron.apache.org" Date: Wednesday, January 17, 2018 at 4:46 AM To: "user@metron.apache.org" Subject: Re: Define a function that can be used in Stellar If something we have already does not fit the bill, I would recommend creating that function in Java. Since you de

Re: Define a function that can be used in Stellar

2018-01-17 Thread Ali Nazemian
user@metron.apache.org" > *Date: *Wednesday, January 17, 2018 at 4:46 AM > *To: *"user@metron.apache.org" > *Subject: *Re: Define a function that can be used in Stellar > > > > > > > > If something we have already does not fit the bill, I would recommend >

Re: Define a function that can be used in Stellar

2018-02-01 Thread Ali Nazemian
*Date: *Wednesday, January 17, 2018 at 4:46 AM >> *To: *"user@metron.apache.org" >> *Subject: *Re: Define a function that can be used in Stellar >> >> >> >> >> >> >> >> If something we have already does not fit the bill, I would r

Re: Define a function that can be used in Stellar

2018-02-02 Thread Simon Elliston Ball
.apache.org/current-book/metron-stellar/stellar-common/3rdPartyStellar.html> > > > From: Nick Allen mailto:n...@nickallen.org>> > Reply-To: "user@metron.apache.org <mailto:user@metron.apache.org>" > mailto:user@metron.apache.org>> > Date: Wednesday, January 17

Re: Define a function that can be used in Stellar

2018-02-02 Thread Ali Nazemian
gt; there is some documentation at http://metron.apache.org/curre >>> nt-book/metron-stellar/stellar-common/3rdPartyStellar.html >>> >>> >>> >>> *From: *Nick Allen >>> *Reply-To: *"user@metron.apache.org" >>> *Date: *Wednes

Re: Define a function that can be used in Stellar

2018-02-02 Thread Simon Elliston Ball
-stellar/stellar-common/3rdPartyStellar.html >> >> <http://metron.apache.org/current-book/metron-stellar/stellar-common/3rdPartyStellar.html> >> >> >> From: Nick Allen mailto:n...@nickallen.org>> >> Reply-To: "user@metron.apache.org <mailto:user@metron.ap

Re: Define a function that can be used in Stellar

2018-02-02 Thread Ali Nazemian
>>> On Thu, Jan 18, 2018 at 5:43 AM, Matt Foley wrote: >>> >>>> Besides the example code Simon mentioned at >>>> https://github.com/apache/metron/tree/master/metron-stellar/ >>>> stellar-3rd-party-example , >>>> there is some docume

Re: Define a function that can be used in Stellar

2018-02-02 Thread Nick Allen
on mentioned at >>>>> https://github.com/apache/metron/tree/master/metron-stellar/stellar-3rd-party-example >>>>> , >>>>> there is some documentation at >>>>> http://metron.apache.org/current-book/metron-stellar/stellar-common/3rdPartyStel

Re: Define a function that can be used in Stellar

2018-02-02 Thread Simon Elliston Ball
xample> >>> , >>> there is some documentation at >>> http://metron.apache.org/current-book/metron-stellar/stellar-common/3rdPartyStellar.html >>> >>> <http://metron.apache.org/current-book/metron-stellar/stellar-common/3rdPartyStellar.html> >&

Re: Define a function that can be used in Stellar

2018-02-02 Thread Casey Stella
all. >>>>> >>>>> Cheers, >>>>> Ali >>>>> >>>>> On Thu, Jan 18, 2018 at 5:43 AM, Matt Foley wrote: >>>>> >>>>>> Besides the example code Simon mentioned at >>>>>> https://gi

Re: Define a function that can be used in Stellar

2018-02-02 Thread Otto Fowler
Nick. It is highly related to our use case and the way that we >>>>> are going to enrich events with assets and vulnerability properties. It is >>>>> not a general case at all. >>>>> >>>>> Cheers, >>>>> Ali >>>>> >>>>> O

Re: Define a function that can be used in Stellar

2018-02-02 Thread Ali Nazemian
gt;>>> >>>>>> Thanks, All. >>>>>> >>>>>> Yes, Nick. It is highly related to our use case and the way that we >>>>>> are going to enrich events with assets and vulnerability properties. It >>>>>> is >>