Enhance Async Task Executor

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Enhance Async Task Executor

Hello,

I have noticed that the async task executor can be enhanced by removing some thread sleep in class like AcquireAsyncJobsDueRunnable or AcquireTimerJobsRunnable.

I have already submit this enhancement some times ago (activiti version 5.0.17.), I use to test with the protocol described in this post (http://www.jorambarrez.be/blog/2016/07/20/message-queue-async-executor-benchmark/)

With the last version of activiti (7-201709-EA), I'm encoutering some issues while unacquiring job.

I there a new project to benchmark async tasks execution ?

Thanks,

Guillaume

8 Replies
Highlighted
Senior Member

Re: Enhance Async Task Executor

Hi Guillaume, 

Are you using 7-201709-EA ? 

What kind of of issues are you having when unacquiring job ? 

Can you please provide a reproducer? 

Highlighted
Active Member

Re: Enhance Async Task Executor

HI,

Yes I Use the 7-201709-EA.

You can download my project sample : GitHub - gggrittt/activiti-async-executor-failure 

May be there is an incompatibilty between activiti 5 bpmn and 7.

Highlighted
Senior Member

Re: Enhance Async Task Executor

Hi Guillaume, 

I appreciate the project, but unless you explain what are you trying to achieve with that, I will need to spend some time to understand your test, that contains a main class instead of assertions, so it is pretty time consume to understand what is doing. 

There might be an incompatibility, so let's try to find out what it is. 

Can you please explain a little bit of the context of what you are trying to achieve? 

Are you trying to benchmark the job executor?

because in my experience and as part of Activiti Cloud, we are going to delegate those responsibilities to production ready components. It might be a good time, if you are looking at the EA of 7 you might want to look at  RFC: Activiti Cloud Connectors – Salaboy (Open Source Knowledge) 

It is a very good time to get involved and shape the future of the project, so if you are interested get in touch. 

Highlighted
Senior Member

Re: Enhance Async Task Executor

I've tried your example with 6.0.0 and it shows the same issue, so there might be something fundamentally wrong with the way that the test is executing jobs and executing them. Did you manage to get it working with 6.0.0?

Regards

Highlighted
Active Member

Re: Enhance Async Task Executor

Hello,

No problem, don't invest time in obsolete version !

I read your all blog posts with attention, I'm really impressed by the recent improvements and progress on Activiti 7.

Concerning my enhancement, I thought it's a bad idea to instantiate threads to retrieve jobs to treats and expired jobs (timerJobAcquisitionThread,asyncJobAcquisitionThread & asyncJobAcquisitionThread). It will be better to use a java.util.concurrent.ScheduledExecutorService  or org.springframework.scheduling.TaskScheduler.

I'll provide a sample soon.

Highlighted
Senior Member

Re: Enhance Async Task Executor

That sounds great! 

Highlighted
Active Member

Re: Enhance Async Task Executor

Here it is : GitHub - gggrittt/activiti-scheduled-jobs-acquisition 

I basically just replace the Thread.sleep in *runnable by a scheduled execution with the help of java.util.concurrent.ScheduledExecutorService.

Spring implementation can be easily derived.

It is not a big improvement, but I hope it is useful.

Concerning my initial issue, it has already been reported 

postgres 

NPE - JobEntityManagerImpl.delete(JobEntityManagerImpl.java:35) ~[activiti-engine-6.0.0.jar!/:6.0.0 

Highlighted
Member II

Re: Enhance Async Task Executor

Hi,

Have you got a solution for the NPE- JobEntityImpl.delete issue?

I am unable to find any help on that issue.