cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Asynchronous?

pnash
1-Newbie

Asynchronous?

Hi All

I have noticed a new feature on services called 'Asynchronous' but after researching this feature I am unsure of what it does. There doesn't appear to be much/any documentation on this.

Can anybody please clarify?

Thanks

Ashley

1 ACCEPTED SOLUTION

Accepted Solutions
AdamR
12-Amethyst
(To:pnash)

Asynchronous services will create and execute in their own thread.  They cannot have a return value since, when you run them the thread is created and runs independently on the platform.  If called from within another service the calling service will not wait for the async service to complete.  This can be very useful for long running services, especially ones on timers, that update background data structure or perform system maintenance tasks.

View solution in original post

4 REPLIES 4
AdamR
12-Amethyst
(To:pnash)

Asynchronous services will create and execute in their own thread.  They cannot have a return value since, when you run them the thread is created and runs independently on the platform.  If called from within another service the calling service will not wait for the async service to complete.  This can be very useful for long running services, especially ones on timers, that update background data structure or perform system maintenance tasks.

pnash
1-Newbie
(To:AdamR)

Many thanks Adam, this is most helpful!

Curious about:

1. Does that mean that there is no guarantee of completing that activity in case of a catastrophic failure? Or are these activities persisted and retried?

2. How is resource usage controlled?

AdamR
12-Amethyst
(To:pnash)

Vinay,

1. No, there is no guarantee of completion.  The service thread will run but in the case of failure will no persist it's status and continue after recovery.

2. Resource usage is handled by the JVM just as all other transaction on the platform.  Currently there is no direct view/control on the amount of resource usage, it is allocated based on the need of that service to execute and the settings of the JVM in Tomcat.

Thanks,

Adam

Top Tags