JPPF, java, parallel computing, distributed computing, grid computing, parallel, distributed, cluster, grid, cloud, open source, android, .net
JPPF

The open source
grid computing
solution

 Home   About   Features   Download   Documentation   On Github   Forums 
March 28, 2023, 11:31:49 PM *
Welcome,
Please login or register.

Login with username, password and session length
Advanced search  
News: New users, please read this message. Thank you!
  Home Help Search Login Register  
Pages: [1]   Go Down

Author Topic: i'd better to use jppf?  (Read 9011 times)

jackyhung

  • Guest
i'd better to use jppf?
« on: February 22, 2008, 06:24:27 AM »

hi

   assume we have a website where we should start a new thread for each registered user (that is perfect case. if we worry about the performance, we have to keep several users in one thread.) ,yes, each thread started is a Timer which means should be re-trigged in a certain interval.  for  a long term , there is  definitely a performance problem to have such amount of threads running....

   so could u give me any suggestion on that?


   thanks
Logged

lolo

  • Administrator
  • JPPF Council Member
  • *****
  • Posts: 2272
    • JPPF Web site
i'd better to use jppf?
« Reply #1 on: February 24, 2008, 04:57:40 PM »

Hello,

It appears that you have some of the work already cut out for if you want to integrate with JPPF.
In effect, you will see that it is very easy to convert a Timer Task into a JPPF task: extend JPPFTask instead of TimerTask

So the general design could be to keep only one timer, which would, at regular intervals, submit a set of tasks to the JPPF grid. Each of these tasks would do basically the same thing your timer tasks are already doing, and there would be one task per user.

This works if we assume that you can submit all tasks at the same time, i.e. it is not a requirement to start each task at a specific time.

An advantage of JPPF is that you can submit tasks asynchronously and be notified when the submitted work is complete. This would allow you to optimize the timer, so it would send the next batch of tasks only if the previous batch has been completed.

If you have more details about your application architecture, or more questions, we can certainly discuss this further.

I hope this helps,
-Laurent
Logged
Pages: [1]   Go Up
 
JPPF Powered by SMF 2.0 RC5 | SMF © 2006–2011, Simple Machines LLC Get JPPF at SourceForge.net. Fast, secure and Free Open Source software downloads