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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Asynchronous?

pnash
1-Visitor

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

ACCEPTED SOLUTION

Accepted Solutions
AdamR
14-Alexandrite
(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
14-Alexandrite
(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-Visitor
(To:AdamR)

Many thanks Adam, this is most helpful!

VinayVaidya
12-Amethyst
(To:AdamR)

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
14-Alexandrite
(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

Announcements


Top Tags