How do I override SIddhi's default sequence and pattern matching functionality? - wso2

I'd like to write an extension to Siddhi that changes the way it finds event sequences and patterns, but I'm not sure which classes I should override/look into. Is anyone familiar enough with the source code to give me pointers? Is there an active dev mailing list?

Mailing list is dev#wso2.org. You can subscribe by using WSO2 Mailing web page [1]
New SiddhiQL 3.0 has been released with WSO2 CEP 4.0.0. Please refer latest documentation on how to write Extensions [2]
In order to write a Siddhi extension your class needs to be extended from an Executor. There are few Executors on math, function and condition. Please refer whole list of executors [3].
Before writing an extension it is better to refer existing extensions and check how those have used executors [4]. Math PowerFunctionExtension is a simple extension which has been developed by extending function extension [5].
[1] http://wso2.com/mail/
[2] https://docs.wso2.com/display/CEP400/Writing+Extensions+to+Siddhi
[3] https://github.com/wso2/siddhi/tree/master/modules/siddhi-core/src/main/java/org/wso2/siddhi/core/executor
[4] https://github.com/wso2/siddhi/tree/master/modules/siddhi-extensions
[5] https://github.com/wso2/siddhi/blob/master/modules/siddhi-extensions/math/src/main/java/org/wso2/siddhi/extension/math/PowerFunctionExtension.java

Related

How to document WSO2 mediation sequences

is there any preferred way how to document WSO2 mediation sequences in Enterprise Integrator? For example, if we design the sequence to be reusable (= can be attached to an API or called from other sequences), we would like to document the inputs and outputs of the sequence. So far we didn't find any built-in mechanism for this, just discovered that XML comments disappear from the sequence source files when edited in Enterprise Integrator Tooling.
We are thinking to place a Script mediator as a first one in the sequence. It would be without actual code, but with comments describing the sequence.
Can you perhaps share how you document the mediation sequences?
Thank you in advance.
We used to use WsoDeveloper Studio to manager integrator related projects. Final result is just car file. Despite integrator "erase" comments in deployed files, they are still available in sources. git helps to remember how project is evolved.
Sequence has special field for description.
It can be modified in design screenshot and source view.
<sequence>
...
<description>Bla-Bla</description>
</sequence>
You don't have to use git to see what is this sequence for.

WSO2 ML Cross Validation and Grid Search

I would like to know if the WSO2 ML implement Cross-Validation and Grid Search for best model selection.
Presently, (as of version 1.1.0) WSO2 Machine Learner does not have a direct method for hyper-parameters optimization. As mentioned in your question, we are planning to include Random Search and Grid Search in one of the upcoming releases. In order to track the progress of this process, I have created a public JIRA [1]. So when the new feature is ready I will notify you via this SO Question.
Next, let me briefly describe cross-validation process we use in WSO2 Machine Learning server. In the third step of the ML Wizard of the ML Server, you can set the training data fraction (please see the attached screen shot).
So let's say you pick 0.7 of your data for training. Then, model building process will use 70% of your data for training and rest of the dataset (i.e. 30%) will be used for cross-validation. As you might recognize this a most basic approach for cross-validation and it is not particularly suitable for small datasets. So in upcoming releases, we are planning to include K-fold cross-validations [2] in addition to the currently available cross-validation method.
Yandi, if you need further help regarding this question or anything related to our product please let me know.
Thanks,
Upul
[1] https://wso2.org/jira/browse/ML-313
[2] https://en.wikipedia.org/wiki/Cross-validation_(statistics)#k-fold_cross-validation

Invoke a Java class and get a return value in WSO2 BPS 3.2.0

I know that it's possible to invoke a JAVA class within a BPEL process in WSO2 BPS 3.2.0. Sources and tutorial can be found here:
http://hasithaa.github.io/java4bpel/
My question is: Is it possible not to only invoke a JAVA class but also get a return value from invoked class/method?
Thanks in advance!
Yes, It is possible. There are two ways of achieving it.
1) By writing a custom xpath function. Refer this for more details. ( I think you are looking for this one) http://ode.apache.org/custom-xpath-functions.html
2) By writing a extension similar to Java4bpel. But you have to set your output to a variable.

Any other Flex service code generation plugins?

In Flash Builder 4, there's a setting for what code generator you want to use for the data/services utilities. The only option I have is "Default", and I haven't been able to find if there are any other options out there, and how to use them.
I dislike how the default code generator works, so I'd love to find out how difficult it would be to implement our own, or if there are any better ones out there. So I suppose my question is: does it get better in the latest version of flash builder, or are there any other good alternatives?
What is your server side technology? Here is a possible answer if you are using Java.
GraniteDs - http://www.graniteds.org - which is an alternative to BlazeDs includes automatic generation of typed AS3 objects (valueObjects) and AS3 service proxies. This feature is available as a plugin for Eclipse, Maven and Ant.
See chapter 5 of the GraniteDs documentation. http://www.graniteds.org/public/docs/2.3.2/docs/reference/en-US/html/graniteds.gas3.html#gas3.overview

Why would one use RDF in a Web service definition?

I've been looking at the resources definition of the Change Management module of the OSLC. Why using RDF?
Is this use related to semantic Web services?
Thanks
Put simply because RDF is portable, inter-operable and reusable
Using RDF means the data in your system is intrinsically reusable even by applications which know nothing of your specific data model (i.e. vocabularies and ontologies etc) since they can still process the data and extract information from it.
Also using RDF means you don't tie yourself to a proprietary/application-specific format or to a specific XML schema and you can easily extend your data model or add annotations which are ignored by the main application as you see fit.
Expanding on the OSLC concept —
OSLC aims provide common means of integrating resources through a common architecture using discovery, linked data, and common resource formats.
There are community topics on alignment to the W3c linked data and semantic web.
You can find out more here : http://open-services.net
A good introduction can be found here: http://open-services.net/html/case4oslc.pdf