[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro edited comment on WFLY-12581 at 9/26/19 1:01 PM:
--------------------------------------------------------------
[~flavia.rainone] For @Stateful EJBs using the DistributableCache with a local, passivating Infinispan cache, the performance of the refactored scheduler is on par with the expiration scheduler introduced in WFLY-12321. See attached chart.
was (Author: pferraro):
For @Stateful EJBs using the DistributableCache, using a local, passivating Infinispan cache, the performance of the refactored scheduler is on par with the expiration scheduler introduced in WFLY-12321. See attached chart.
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: EJB DistributableCache (passivating).png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: (was: EJB SimpleCache.png)
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro updated WFLY-12581:
--------------------------------
Attachment: EJB DistributableCache (passivating).png
EJB SimpleCache.png
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFWIP-213) Can't resolve artifact for module when executing CLI modification
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFWIP-213?page=com.atlassian.jira.plugin.... ]
Brian Stansberry reassigned WFWIP-213:
--------------------------------------
Assignee: Jean Francois Denise (was: Brian Stansberry)
[~jdenise] At a glance this sounds like a provisioning problem. [~luck3y] FYI.
> Can't resolve artifact for module when executing CLI modification
> -----------------------------------------------------------------
>
> Key: WFWIP-213
> URL: https://issues.jboss.org/browse/WFWIP-213
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Jan Blizňák
> Assignee: Jean Francois Denise
> Priority: Blocker
>
> Using image {{docker-registry.upshift.redhat.com/kwills/eap-cd-openshift-rhel8:18.0-EAP7-1216}} when we workaround the issues WFWIP-208 & WFWIP-212 the CLI modification still won't process successfully because of the exception:
> {code:java}
> I0926 13:20:23.465008 1 sti.go:697] Exception in thread "main" org.jboss.modules.ModuleLoadException: Error loading module from /opt/eap/modules/system/layers/base/org/apache/xerces/main/module.xml
> I0926 13:20:23.465037 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:339)
> I0926 13:20:23.465047 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:295)
> I0926 13:20:23.465052 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:256)
> I0926 13:20:23.465060 1 sti.go:697] at org.jboss.modules.LocalModuleFinder.parseModuleXmlFile(LocalModuleFinder.java:250)
> I0926 13:20:23.465067 1 sti.go:697] at org.jboss.modules.LocalModuleFinder.lambda$findModule$1(LocalModuleFinder.java:195)
> I0926 13:20:23.465075 1 sti.go:697] at java.base/java.security.AccessController.doPrivileged(Native Method)
> I0926 13:20:23.465082 1 sti.go:697] at org.jboss.modules.LocalModuleFinder.findModule(LocalModuleFinder.java:195)
> I0926 13:20:23.465089 1 sti.go:697] at org.jboss.modules.ModuleLoader.findModule0(ModuleLoader.java:696)
> I0926 13:20:23.465096 1 sti.go:697] at org.jboss.modules.ModuleLoader.findModule(ModuleLoader.java:689)
> I0926 13:20:23.465103 1 sti.go:697] at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:499)
> I0926 13:20:23.465110 1 sti.go:697] at org.jboss.modules.DelegatingModuleLoader.preloadModule(DelegatingModuleLoader.java:57)
> I0926 13:20:23.465117 1 sti.go:697] at org.jboss.modules.Module.addPaths(Module.java:1252)
> I0926 13:20:23.465125 1 sti.go:697] at org.jboss.modules.Module.link(Module.java:1622)
> I0926 13:20:23.465132 1 sti.go:697] at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650)
> I0926 13:20:23.465141 1 sti.go:697] at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:299)
> I0926 13:20:23.465147 1 sti.go:697] at org.jboss.modules.Main.main(Main.java:437)
> I0926 13:20:23.465153 1 sti.go:697] Caused by: org.jboss.modules.xml.XmlPullParserException: Failed to resolve artifact 'xerces:xercesImpl:2.12.0.SP02' (position: END_TAG seen ...esources>\n <artifact name="xerces:xercesImpl:2.12.0.SP02"/>... @26:57)
> I0926 13:20:23.465159 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseArtifact(ModuleXmlParser.java:1063)
> I0926 13:20:23.465177 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseResources(ModuleXmlParser.java:950)
> I0926 13:20:23.465206 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseModuleContents(ModuleXmlParser.java:710)
> I0926 13:20:23.465211 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseDocument(ModuleXmlParser.java:471)
> I0926 13:20:23.465217 1 sti.go:697] at org.jboss.modules.xml.ModuleXmlParser.parseModuleXml(ModuleXmlParser.java:337)
> I0926 13:20:23.465224 1 sti.go:697] ... 15 more
> {code}
> Because jboss-modules will try to resolve artifact from ~/.m2/settings.xml and galleon integration replaces this file before this error, there must be something wrong.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFWIP-187) Changes to PVC are not reflected in Operator
by Martin Choma (Jira)
[ https://issues.jboss.org/browse/WFWIP-187?page=com.atlassian.jira.plugin.... ]
Martin Choma edited comment on WFWIP-187 at 9/26/19 12:40 PM:
--------------------------------------------------------------
[~jmesnil] was it necessary to introduce new annotation on StatefulSet. There is currently Kubernetes standard {{metadata.generation}}. I just want to make sure you have considered this option as well.
EDITED: or the reason was recreation of StatefulSet is needed? Is recreating StatefulSet safe operation?
Anyway, it is not how I would expect to behave. I see my changes in SS {{2Mi}}, but it is not propagated into pvc object, where there is always {{1Mi}}
{code}
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: operator-updated-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Mi
status:
phase: Pending
{code}
PVC:
{code}
Status:
Bound to volume vol41
Capacity:
allocated 1 GiB
Requested Capacity:
1 MiB
Access Modes:
RWO (Read-Write-Once)
{code}
EDITED:
- adding in runtime works as expected. PVC is not there and is created.
- removing in runtime does not work as I would expect. PVC is still there
was (Author: mchoma):
[~jmesnil] was it necessary to introduce new annotation on StatefulSet. There is currently Kubernetes standard {{metadata.generation}}. I just want to make sure you have considered this option as well.
EDITED: or the reason was recreation of StatefulSet is needed? Is recreating StatefulSet safe operation?
Anyway, it is not how I would expect to behave. I see my changes in SS {{2Mi}}, but it is not propagated into pvc object, where there is always {{1Mi}}
{code}
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: operator-updated-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Mi
status:
phase: Pending
{code}
PVC:
{code}
Status:
Bound to volume vol41
Capacity:
allocated 1 GiB
Requested Capacity:
1 MiB
Access Modes:
RWO (Read-Write-Once)
{code}
> Changes to PVC are not reflected in Operator
> --------------------------------------------
>
> Key: WFWIP-187
> URL: https://issues.jboss.org/browse/WFWIP-187
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Martin Choma
> Assignee: Jeff Mesnil
> Priority: Blocker
> Labels: operator
>
> Any chnages (adding, removing or updating) made to PVC after WildFlyServer CR was created are not reflected in underlying PVC kubernetes object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFWIP-187) Changes to PVC are not reflected in Operator
by Martin Choma (Jira)
[ https://issues.jboss.org/browse/WFWIP-187?page=com.atlassian.jira.plugin.... ]
Martin Choma edited comment on WFWIP-187 at 9/26/19 12:32 PM:
--------------------------------------------------------------
[~jmesnil] was it necessary to introduce new annotation on StatefulSet. There is currently Kubernetes standard {{metadata.generation}}. I just want to make sure you have considered this option as well.
EDITED: or the reason was recreation of StatefulSet is needed? Is recreating StatefulSet safe operation?
Anyway, it is not how I would expect to behave. I see my changes in SS {{2Mi}}, but it is not propagated into pvc object, where there is always {{1Mi}}
{code}
volumeClaimTemplates:
- metadata:
creationTimestamp: null
name: operator-updated-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Mi
status:
phase: Pending
{code}
PVC:
{code}
Status:
Bound to volume vol41
Capacity:
allocated 1 GiB
Requested Capacity:
1 MiB
Access Modes:
RWO (Read-Write-Once)
{code}
was (Author: mchoma):
[~jmesnil] was it necessary to introduce new annotation on StatefulSet. There is currently Kubernetes standard {{metadata.generation}}. I just want to make sure you have considered this option as well.
> Changes to PVC are not reflected in Operator
> --------------------------------------------
>
> Key: WFWIP-187
> URL: https://issues.jboss.org/browse/WFWIP-187
> Project: WildFly WIP
> Issue Type: Bug
> Components: OpenShift
> Reporter: Martin Choma
> Assignee: Jeff Mesnil
> Priority: Blocker
> Labels: operator
>
> Any chnages (adding, removing or updating) made to PVC after WildFlyServer CR was created are not reflected in underlying PVC kubernetes object.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro edited comment on WFLY-12581 at 9/26/19 12:30 PM:
---------------------------------------------------------------
Applying this new expiration scheduler to the EJB simple cache effectively doubles the performance of @Stateful EJB invocations under load. See attached chart.
was (Author: pferraro):
Applying this new expiration scheduler to the EJB simple cache effectively doubles the performance of EJB invocations under load. See attached chart.
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months
[JBoss JIRA] (WFLY-12581) Optimize distributed web/ejb expiration schedulers
by Paul Ferraro (Jira)
[ https://issues.jboss.org/browse/WFLY-12581?page=com.atlassian.jira.plugin... ]
Paul Ferraro commented on WFLY-12581:
-------------------------------------
For @Stateful EJBs using the DistributableCache, using a local, passivating Infinispan cache, the performance of the refactored scheduler is on par with the expiration scheduler introduced in WFLY-12321. See attached chart.
> Optimize distributed web/ejb expiration schedulers
> --------------------------------------------------
>
> Key: WFLY-12581
> URL: https://issues.jboss.org/browse/WFLY-12581
> Project: WildFly
> Issue Type: Enhancement
> Components: Clustering
> Affects Versions: 18.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
> Attachments: EJB DistributableCache (passivating).png, EJB SimpleCache.png, Schedulers for distributed workloads.png, Schedulers for local workloads.png
>
>
> WFLY-12321 added a new expiration scheduler implementation for SFSBs specifically optimized for non-distributed environments. The key features of this implementations are:
> * Uses a single scheduled task instead of a scheduled task per SFSB
> * Uses a double-linked list to track SFSBs to be expired
> Because most scheduled tasks will be canceled before they are executed, the performance of a given scheduler implementation is primarily limited by the cost of insertion and removal into the backing data structure. The goal of this jira is to generalize the scheduler implementation introduced by WFLY-12321 such that it can be used for scheduling of both local and distributed web sessions and SFSBs.
> In the scheduler implemented as part of WFLY-12321, the use of a linked queue is based on the following assumptions:
> # All SFSB using a given scheduler use the same @StatefulTimeout
> # A given call to Scheduler.schedule(...) is always the last item to be scheduled
> Unfortunately, the second assumption is not valid for distributed SFSBs as a member may assume the responsibility of expiring a SFSB previously owned by another member.
> Additionally, the second assumption is not valid for local nor distributed web sessions, as a given web session can override the default session timeout of the application.
> This jira proposes the following:
> * Generalize the Scheduler interface for reuse between SFSBs and web sessions.
> * Generalize the new local scheduler implementation such that the same scheduler can support both local and distributed objects using different data structures for tracking scheduled items
> * Replace ExpirationTracker with a ConcurrentDirectDeque to support local case, which has O(1) add/remove characteristics
> ** ConcurrentDirectDeque outperforms ExpirationTracker under concurrent load (see attached graph)
> * Local web sessions and all distributed use cases will store scheduled entries within a ConcurrentSkipListSet, which has O(log N) add/remove characteristics
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 10 months