Re: [jgroups-users] FW: Failover for ExecutionService / "Cluster wide task execution" ?
Brought to you by:
belaban
From: William B. <mud...@gm...> - 2013-01-10 14:30:14
|
> From: mat...@gt... [mat...@gt...] > Sent: Thursday, January 10, 2013 7:51 AM > To: jav...@li... > Subject: [jgroups-users] Failover for ExecutionService / "Cluster wide > task execution" ? > > Hello, > > is there a best practice to enable "Failover" for the JGroups "Cluster > wide task execution" building block? > > > http://www.jgroups.org/manual-3.x/html/user-building-blocks.html#ExecutionService > > > I see the round-robin selection among the registered "worker nodes" > working all right. > "Worker nodes" are those that have some ExecutionRunner run by some worker > thread on the channel. > So, some "client" node attaches to the channel, sends a "Job" via > ExecutionService, and *one* of the worker nodes processes it. Works great. > > > Now let's assume the selected worker has some local issue while executing > the request there throws some Exception. This would not be network-related. > As a contrived example, consider local disk space. The Job may require more > disk space than is availble on the selected worker, and hence would fail on > some, but probably not all of the worker nodes. > > Today, I see that this exception escapes the "exec_service.submit(new > MyCallable()).get()" call that fetches the result from the cluster (see > sample code in above link). I don't quite understand what you mean by escapes. Any exception thrown by the submitted callable will be sent back to the person who submitted it. Thus the client could retry this for a different node if desired. The problem is if this is the only node you will just get the error over and over. > Q: Is there a way to make the ExecutionService _fail over transparently_ > to some of the other worker nodes? > > The service will automatically fail over to another node if the node that is currently running the submitted callable is detected to have gone down via your failure detection protocol. Also to note that if the node that submits the task goes down and the running node then it will not be resubmitted. If the submitting node goes down the running node will still run the task to completion. > > Thanks in advance for your input, > Matthias > > > P.S. I am thinking about a ResponseFilter, but I am not sure how to attach > that to that to the ExecutionService. That seems to be related to Rpc > (only?) > > http://www.jgroups.org/manual-3.x/html/user-building-blocks.html#RspFilter As far as I am aware a response filter will not work with this protocol. This is more for returning early if a certain number of responses meet a certain criteria instead of blocking for all. Bela could explain better though. > > > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712 > _______________________________________________ > javagroups-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javagroups-users > > |