rapidminer and servlet container
browndar
New Altair Community Member
Hi There,
I have been enjoying using rapid miner as a gui and going through the code in general. I find it incredibly well-written. One problem that I have run into so far is trying to get rapid miner to play nice with a servlet container. Basically, from the standpoint of a webapp, I want to be working with input streams, and this has led to quite a few hurdles with rapidminer. For example, if I want to use the weka operators, I need to specify a path which will point to the weka jar, whether it be directly with a system property or indirectly by setting the rapidminer home etc. The application that I am developing doesn't really have access to anything outside of its webapp world. That means that having rapidminer "installed" in some home directory is impossible. And the classloader for tomcat does not, um... prefer, to work with files directly. For example, if a war is deployed on a server that does not unpack that war, then pulling resources as an input stream is really the only way to get those resources.
So, long story, but my basic question is: has anyone gotten rapidminer working on a servlet containe? If so, is there some documentation that you can point me to?
This is my one (tiny) complaint so far in using rapidminer. There are all of these functions that take a file and immediately produce an input stream with it and do the work. If only we could pass an input stream into these methods directly we could stand on the shoulders of all that great io stuff that java takes care of for us. That being said, I realize that this was designed much more for GUI use and probably less as an API. And the things that you can do with rapidminer are amazing! I am very thankful to play with such a well built tool.
Take care,
Darren
I have been enjoying using rapid miner as a gui and going through the code in general. I find it incredibly well-written. One problem that I have run into so far is trying to get rapid miner to play nice with a servlet container. Basically, from the standpoint of a webapp, I want to be working with input streams, and this has led to quite a few hurdles with rapidminer. For example, if I want to use the weka operators, I need to specify a path which will point to the weka jar, whether it be directly with a system property or indirectly by setting the rapidminer home etc. The application that I am developing doesn't really have access to anything outside of its webapp world. That means that having rapidminer "installed" in some home directory is impossible. And the classloader for tomcat does not, um... prefer, to work with files directly. For example, if a war is deployed on a server that does not unpack that war, then pulling resources as an input stream is really the only way to get those resources.
So, long story, but my basic question is: has anyone gotten rapidminer working on a servlet containe? If so, is there some documentation that you can point me to?
This is my one (tiny) complaint so far in using rapidminer. There are all of these functions that take a file and immediately produce an input stream with it and do the work. If only we could pass an input stream into these methods directly we could stand on the shoulders of all that great io stuff that java takes care of for us. That being said, I realize that this was designed much more for GUI use and probably less as an API. And the things that you can do with rapidminer are amazing! I am very thankful to play with such a well built tool.
Take care,
Darren
Tagged:
0
Answers
-
Hi Darren,
first of all: thanks for your kind words! We really appreciate them.
I am myself not too familiar with servlets (some other of us are but they are on vacation right now) but maybe the following could help (although it would require some coding):
would it be possible to embed the stream into an IOObject which you can create from your servlet and then write one single operator transforming the stream into whatever you need? This is probably more like a workaround but maybe this basic idea could help anyway...
Cheers,
Ingo
0 -
Hi Darren,
I plan to do something similar sometime in the near future, so if I figure anything out I will let you know. I'm excited to see if this can work!
-Eric0 -
Hi Ingo,
thanks very much for the reply!
I did put together an input stream-based model loader and that worked out well. I can't quite figure out how to do some of setup stuff, like loading the weka jar in a stream frriendly or otherwise webapp friendly way, but as long as I stick with core rapidminer and don't use any of the operators that rely on string-based file lookup, I don't see any other big hurdles. If I have any insight to pass on, I'll do so.mierswa wrote:
would it be possible to embed the stream into an IOObject which you can create from your servlet and then write one single operator transforming the stream into whatever you need? This is probably more like a workaround but maybe this basic idea could help anyway...
Take care,
Darren0