How to assign Job-Agent to Web Services?
Hi There,
As i know, since RM8, all processes were executed by Job-Agents. My question is if using Web-Service, how to make them executed on a certain Job-Agent? If so, we will be able to set permissions by each queue for users/groups.
Things I've tried were, I have a process called "ReadCsv.rmp" deployed as a web service, an there are two queues on my RM8 Server as below:
I'm going to execute "ReadCsv.rmp" by using a user called "csvusr", which is obviously not existed on each Permitted groups above, and I expected an error or permission deny message. HTTP request shown below:
curl --user csvusr:csvusr123456 --upload-file /Users/user/Desktop/test.csv http://VM-Rapidminer:8080/api/rest/process/ReadCsv?
But it successfully executed, it seems like processes executed from Web Services does not take permission settings on Queues, and neither do I know which queue execute "ReadCsv.rmp" this process.
Back to the subject, I would like to know how to make a web service execute on certain Queue/Job-Agent?
Any suggestion would be appreciated.
Sincerely,
Ray Jhong.
Answers
-
Hi Ray,
In principal you are correct, that processes are executed by Job-Agents. But as you can see in the attached architecture overview, Web-Services and Web-Apps are execute by the central node. So you have to set the permissions directly for the web service, as there is no job agent involved.
This makes sense, as otherwise you would have slight communication overhead, which could be inconvinient for online applications.
RapidMiner Server architecture
Best,
David
5 -
According to my understanding, web services and web apps cannot run distributedly yet, right?
0 -
Hi @RayJhong,
That is correct. In the current architecture only the central node (i.e. RapidMiner Server itself) is always running whereas the JobAgent only spawns Job containers for running processes when requested.
Especially when using webservices you want a short response time and not wait until a Job container has been started.
Happy Mining,
Edin
3 -
Hi @RayJhong,
you could use the Schedule Process operator within the web service/web app, in order to delegate a heavy process to a job agent. You would have to fetch the results later, but it's still a good way to execute a process which may fail through HTTP.
Kind regards,
Sebastian
3