You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Bogdan Pistol (JIRA)" <ji...@apache.org> on 2010/08/16 21:34:16 UTC
[jira] Created: (VYSPER-243) Bosh inactivity checking thread
Bosh inactivity checking thread
-------------------------------
Key: VYSPER-243
URL: https://issues.apache.org/jira/browse/VYSPER-243
Project: VYSPER
Issue Type: Improvement
Components: BOSH
Reporter: Bogdan Pistol
Priority: Minor
There should be a single checking thread that will periodically check to see if there are sessions that passed their inactivity time.
Right now this is done for every session with Timer.schedule that creates a thread for every session, which is not scalable (the number of threads increases linearly with the number of concurrent sessions).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VYSPER-243) Bosh inactivity checking thread
Posted by "Ashish Paliwal (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902402#action_12902402 ]
Ashish Paliwal commented on VYSPER-243:
---------------------------------------
I don't think this is correct, that Timer.schedule will create a thread for every session.
Here is note from javadoc
This class scales to large numbers of concurrently scheduled tasks (thousands should present no problem). Internally, it uses a binary heap to represent its task queue, so the cost to schedule a task is O(log n), where n is the number of concurrently scheduled tasks.
However, moving to a more simple approach is better.
> Bosh inactivity checking thread
> -------------------------------
>
> Key: VYSPER-243
> URL: https://issues.apache.org/jira/browse/VYSPER-243
> Project: VYSPER
> Issue Type: Improvement
> Components: BOSH
> Reporter: Bogdan Pistol
> Priority: Minor
>
> There should be a single checking thread that will periodically check to see if there are sessions that passed their inactivity time.
> Right now this is done for every session with Timer.schedule that creates a thread for every session, which is not scalable (the number of threads increases linearly with the number of concurrent sessions).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VYSPER-243) Bosh inactivity checking thread
Posted by "Bogdan Pistol (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902542#action_12902542 ]
Bogdan Pistol commented on VYSPER-243:
--------------------------------------
You are right if you are using a single Timer instance to schedule n tasks. But in the current implementation there are n instances of Timer, and every instance is used to schedule 1 task, hence using n threads to schedule n tasks (for n sessions), which is inefficient.
> Bosh inactivity checking thread
> -------------------------------
>
> Key: VYSPER-243
> URL: https://issues.apache.org/jira/browse/VYSPER-243
> Project: VYSPER
> Issue Type: Improvement
> Components: BOSH
> Reporter: Bogdan Pistol
> Priority: Minor
>
> There should be a single checking thread that will periodically check to see if there are sessions that passed their inactivity time.
> Right now this is done for every session with Timer.schedule that creates a thread for every session, which is not scalable (the number of threads increases linearly with the number of concurrent sessions).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (VYSPER-243) Bosh inactivity checking thread
Posted by "Bogdan Pistol (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bogdan Pistol resolved VYSPER-243.
----------------------------------
Fix Version/s: 0.6
Resolution: Fixed
Committed in rev 1001557.
> Bosh inactivity checking thread
> -------------------------------
>
> Key: VYSPER-243
> URL: https://issues.apache.org/jira/browse/VYSPER-243
> Project: VYSPER
> Issue Type: Improvement
> Components: BOSH
> Reporter: Bogdan Pistol
> Priority: Minor
> Fix For: 0.6
>
>
> There should be a single checking thread that will periodically check to see if there are sessions that passed their inactivity time.
> Right now this is done for every session with Timer.schedule that creates a thread for every session, which is not scalable (the number of threads increases linearly with the number of concurrent sessions).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (VYSPER-243) Bosh inactivity checking thread
Posted by "Niklas Gustavsson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VYSPER-243?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niklas Gustavsson updated VYSPER-243:
-------------------------------------
Fix Version/s: 0.7
(was: 0.6)
0.6 has already been released, so fix version should be 0.7
> Bosh inactivity checking thread
> -------------------------------
>
> Key: VYSPER-243
> URL: https://issues.apache.org/jira/browse/VYSPER-243
> Project: VYSPER
> Issue Type: Improvement
> Components: BOSH
> Reporter: Bogdan Pistol
> Priority: Minor
> Fix For: 0.7
>
>
> There should be a single checking thread that will periodically check to see if there are sessions that passed their inactivity time.
> Right now this is done for every session with Timer.schedule that creates a thread for every session, which is not scalable (the number of threads increases linearly with the number of concurrent sessions).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.