how to deploy an executable ?

sekhar 
Joined: 2008-05-27
Posts: 5
User is offline
how to deploy an executable ?

Hi,

I have gotten fabric up and running on my Windows XP. I have been able to deploy Java apps. But how do I deploy a windows executable?
The webinar mentioned that people have deployed fortran executables successfully but I didnt find any documentation that addressed this aspect.

Also I would like to know whether executables can take advantage of a) failover services b) the Request object and c) FAM
My guess is they would not. So the best bet would be to write a Java wrapper around the exec?

Thanks
Sekhar Atteri

mark  Appistry employee
Joined: 2007-12-21
Posts: 88
User is offline

sekhar wrote:
I have gotten fabric up and running on my Windows XP. I have been able to deploy Java apps. But how do I deploy a windows executable?

To make sure that I am clear on your question, you want to deploy a pre-compiled executable and use it in your task. You can include any supporting files within your application. This is done by adding a tag to your fabric application .xml file. In this case, you would want to add something like this to your application .xml file.

<support-files>
  <file name="hello_world_client.exe" />
</support-files>

You can then reference or run this executable from your tasks.

I will try to get answers for your other questions soon.

sekhar 
Joined: 2008-05-27
Posts: 5
User is offline

Hi Mark,

Thanks for your response.

So I guess the task itself will have be implemented in Java/.NET/C/C++. The task will interact with FAM, the Request object and act as a wrapper for the underlying executable.
Am I right?

My final question is how does fabric determine that a particular task has failed and failover is needed?

Thanks
Sekhar Atteri

guerry  Appistry employee
Joined: 2007-12-21
Posts: 95
User is offline

Hi sekhar,

Currently a wrapper approach is the right idea. It can be done in Java, .NET or C/C++.

As soon as I can, I will post a Java wrapper sample that you could use as a starting point. It may be a day or two.

Incidentally, supporting executables directly is planned for release later this year.

Thanks,

Guerry

mark  Appistry employee
Joined: 2007-12-21
Posts: 88
User is offline

sekhar wrote:
So I guess the task itself will have be implemented in Java/.NET/C/C++. The task will interact with FAM, the Request object and act as a wrapper for the underlying executable.
Am I right?

Yes, your Java/.NET/C/C++ task can interact with the FAM, use the request object to pass information back and forth, and your task could also communicate with your support file executable that is included in that application. I assume you want to use the FAM because of your statement because it is not technically required to include the FAM if you are just planning to run another executable. These actions could be separated into seperate tasks in your process flow as well. You have many options.

Quote:
My final question is how does fabric determine that a particular task has failed and failover is needed?

This answer gets a little complicated, and I will do my best to explain it. On a high level, the task will return it status to the process flow. If that status is failure to execute in anyway, it checks to see if it is "retriable". If it is retriable, it will retry that task. If it is not retriable, it will return an error and message back to the client.

Now lets take one step deeper into the process flow. The process flow has states in which run tasks. A task can be a wrapper around your executable like mentioned above. If that executable fails for some reason, you would want to try to relay the failure from the task back to the process flow with the request. This will allow your process flow to take proper action. You can take different actions by using arc-status and states in the process flow that are contigent on different results from the task. If for some reason the task does not return, it will attempt the retry logic if that task is marked retriable in the process flow.

In summary, the fabric will determine that the particular task is failed whether or not it has received a successful result from that task. You can provide different results from your task depending on what you set in your task. If it does not receive a result, it will retry if it is configured to.

Also, I must mention that you do not need to use process flows in order to use the fabric, but currently, the process flow / task method provides the most reliabilty options.