Generate Java code from workflow

michaelhecht
michaelhecht New Altair Community Member
edited November 5 in Community Q&A
Hello,

I wonder if there is a way to export a given workflow from the GUI to a
corresponding, compilable and runnable JAVA code.

From this one could start to generate a personalized JAVA program.

Is there?

Tagged:

Answers

  • StaryVena
    StaryVena New Altair Community Member
    Hi,
    as Marco always writes:

    please use the forum search before posting topics next time, this question has been answered quite a few times already
    Check http://rapid-i.com/rapidforum/index.php/topic,3596.msg13398.html#msg13398

    Cheers,
    Vaclav
  • michaelhecht
    michaelhecht New Altair Community Member
    Hmmm ... thank You for the link, but this is not the answer to my question  ;D
    (or I'm to stupid to understand  :-\ ).

    I'm looking for a RM-Toolbar-Command like: "Export Workflow to Java ..."
    which automatically generates the Java-Code of the workflow.

    The answer of Marco:
    " ...First, if you already have an XML process file, you can simply create the exact process by calling new Process(String xml). Simply feed the contents of the xml file as a string to the Process constructor, and you're good to go. ..."

    might be a solution to execute a workflow from within Java but it isn't the Java-Code of the workflow.
  • StaryVena
    StaryVena New Altair Community Member
    Hi,
    I think (90% sure) there is no such tool. You must write Java code that calls RM, loads process, delivers data and than collect result.

    Vaclav
  • michaelhecht
    michaelhecht New Altair Community Member
    So You think that generating java code is not as straight forward as generation XML-code which is done permanently in the GUI?

    If one is able to parse and process XML and knows how to apply the RM-Java-API it shouldn't be too difficult, should it?

    Ok, until one implements such a function in the next RM version I have to do the coding by myself  :'(

    Nevertheless, thank you.
  • StaryVena
    StaryVena New Altair Community Member

    So You think that generating java code is not as straight forward as generation XML-code which is done permanently in the GUI?
    RM is designe to work with process in XML. But generating some jar file is harder, I guess.

    If one is able to parse and process XML and knows how to apply the RM-Java-API it shouldn't be too difficult, should it?
    I think that is quite difficult. Much easer is do it by Yourself.

    So, good luck  ;)
    Vaclav
  • IngoRM
    IngoRM New Altair Community Member
    Hi,

    creating only the code wrapped around the XML is probably not that difficult but I would say this is probably not enough since you also have to handle in and outputs etc. This might be easy sometimes, but this completely depends on the actual process.

    Anyway: I assume you are asking this since you would like to integrate RapidMiner, or at least an analysis process created with RapidMiner, into another program, right? This is exactly one of the purposes of the RapidAnalytics server:

    http://www.youtube.com/watch?v=SBCUwA6llns

    Create a web service from your process, which is a matter of clicks, and invoke the service. This is much more elegant anyway...

    Just my 2c,
    Ingo
  • michaelhecht
    michaelhecht New Altair Community Member
    Hi Ingo,

    hmmm ... I never had a look at RapidAnalytics, but it seems to be something like the Knime Server, isn't it?

    For Knime Server one has to purchase an annual license. This was the reason I looked for the direkt implementation
    of RapidMiner into my software (up to now I failed but I'm going on to try it  ;) ), since it is difficult to start to convince
    your boss of data mining by demanding money for a software license.

    Providing a WebService of a workflow without programming is a good approach. I will have a look at RapidAnalytics
    in the next time.

    Nevertheless: Is it really difficult to generate a Java programm from the workflow if one has already an XML representation?
    I think this is at maximum a job for a students bachelor work  ;)
  • IngoRM
    IngoRM New Altair Community Member
    Hi,

    no, it's actually much more than the Knime server  ;D

    The freely available open source version already offers a lot of functionalities (links below go to youtube videos explaining the functions): The Enterprise Edition even offers a full process-based reporting and business analytics engine for end-users: More information about the different versions can be found in the table at the end of the following web site:

        http://rapid-i.com/content/view/182/196/

    All videos about RapidAnalytics can be found at

        http://rapid-i.com/content/view/305/232/

    We recently have released version 1.1 of RapidAnalytics which comes with a nice installation program. You still have to setup a database and everything but the installation is nevertheless much easier now.

    Hope that helps,
    Ingo
  • michaelhecht
    michaelhecht New Altair Community Member
    Hi Ingo,

    I'n not sure that RapidAnalytics is comparable to Knime Server. I've open questions (according to database implementation
    and wsdl web-service access) in the RapidAnalytics thread which seem to avoid RapidAnalytics as my fafourite data mining
    server solution. Maybe someone can answer the questions to convince me that RA is the right tool.  ;)

    Summarizing I've the impression that RM as well as RA are quite powerful pieces of software, but lack of sufficient
    documentation. Hopefully this will improve in future. Until this happened, is there a chance to make a kind of FAQ
    collection (maybe it exists) as a summary of this forum. Sometimes ist quite difficult to search all posts and find the
    appropriate topic.
  • IngoRM
    IngoRM New Altair Community Member
    Hi again,

    with all respect: I am afraid relying on the community forum alone is not the optimal approach if you want 24/7 support with guaranteed 4 hours answer times. Contact our sales team and you can make sure that our technical staff will help you in the most professional way as quick as possible for all questions you might have in the future if you like  ;)

    What is your point about the Knime server comparison? Both solutions seem to be quite different and RapidAnalytics, especially the Enterprise Edition, offers much more features and can not only serve as a data mining server but also as a full BI solution in addition (as should be clear after having seen the videos above). I have seen your smiley, but I really doubt that I am actually want to "convince" you here in our community forum that RapidAnalyitcs is the right tool for you. Let me just give you this small hint: either you will need deep experiences in setting up and maintaining enterprise application servers in realistic IT environments or you should make use of professional support for this or you should rely on SaaS solutions which are also offered by Rapid-I - otherwise I doubt that I or somebody else will ever be able to convince you at all that this type of solution is appropriate for you because you only will experience the pain and not the fun ;)

    About documentation: my standard answer about documentation can be found here:

    http://rapid-i.com/rapidforum/index.php/topic,3696.msg13850.html#msg13850

    For RapidAnalytics we have the installation manual (which has helped already thousands of users to successfully finish their installation...) and again a video page already linked above. And of course we also offer professional support for this.

    So my main questions here are simple: What are your suggestions to improve the available documentation? And what can you contribute to this?

    I assume that you are Interested in collaborating and giving something back, right? Then consider writing your answers and solutions in our Wiki (link can be found at the bottom of our forum) and start writing a FAQ there. I did not make an analysis of your posts but I believe that you asked more questions than you have given answers. Maybe you should start with giving something back and contribute by doing this. It's short before christmas - we all should consider giving instead of taking now  ;D

    All the best,
    Ingo
  • michaelhecht
    michaelhecht New Altair Community Member
    Wow ... at least this answer came very quick. ;D
    Im sure asking questions is also a contribution to the forum since I'm sure that there are many potential users which are afraid to ask there own questions and give up if they don't find the right questions and answers in this forum!  Questions often show where is a lack in the documentation.

    Since I'm working in a big industrial company I could make the relation to Rapid-I a commercial one but prior to this I have to convince my bosses that RM and RA is the best solution for our applications.  :-\ This I do by investigating the software on my own time an risk and this forum is the only chance for me to get success.

    Currently I skipped investigating RA since RM seems to be suffcient. Nevertheless I still think that RA coule be beneficial for our company and a much more elegand way to deploy workflows.

    Best regards

    Michael
  • michaelhecht
    michaelhecht New Altair Community Member
    Well, this discussion was not intended by me. What I originally wanted was to mention that I got the impression that Knime Server acts as a "real" java web service with remote procedure call from within a java program while RA doesn't. From this point of view RA is not comparable to Knime Server even if RA has a lot of features to offer.
  • IngoRM
    IngoRM New Altair Community Member
    Yeah, but that's simply wrong as you should be able to tell if you put all the pieces of information available to you together. The answers you got here in the forum and a quick web search for REST web services should help for this, for example:

        http://www.ibm.com/developerworks/webservices/library/ws-restful/
        http://www.oracle.com/technetwork/articles/javase/index-137171.html

    Here is also a nice German example:

        http://www.oio.de/public/xml/rest-webservices.htm

    As you can see, there is more in the web-service-world than just SOAP / WSDL web services. IMHO RCP calls are pretty outdated anyway  ;)

    The fact that we support three types of web services has been stated by Simon in another thread:

        http://rapid-i.com/rapidforum/index.php/topic,4439.msg16125.html

    In this thread, Magick also has pointed out the standard way of embedding processes as REST web services offered by RapidAnalytics. SOAP-like web services are not really useful in almost all cases since you never know what a process is going to deliver (how should we generate generic WSDL for this?). There are, however, SOAP web services for certain tasks in RapidAnalytics and those also include the WSDL description and everything. Ask Simon in the other thread for more information about this if you like - continuing this discussion there is probably the best idea since I am not really the major expert anyway  ::)

    Let me just repeat here that you will probably be more interested in the REST services since they are much more flexible in this context and can be used for all types of processes (and of course for the other advantages like being stateless etc, see links above). You only have to parse the XML results yourself or use XSLT for transforming the XML (possible on the server and the client). The basic approach is actually at least partially covered in the web service video for RapidAnalytics I have posted before, first part starting around minute 7 and second part starting at about minute 9:30.

    Hope that helps for clarifying this misunderstanding about the different types of web services offered by RapidAnalytics.

    Cheers,
    Ingo
  • marcin_blachnik
    marcin_blachnik New Altair Community Member
    I will add one more thing - the cost of energy  :). Before I started to use and implement my own operators for RM I did some small test. I took some dataset (ex. SpamBase from UCI repository more then 4000 samples) and did some tests 10 times 100 fold CV running basic ML algorithms like kNN, etc. Since that experiment I didn't have any more questions - RM was more the 200% faster (I dont know how it is now, but 2 years ago that was the difference).
    Perhaps thats why they need the cluster version  ;D