Browse Prior Art Database

A method for optimizing throughput in event-driven applications using a combination of command pattern and pooled data structures

IP.com Disclosure Number: IPCOM000238508D
Publication Date: 2014-Aug-31
Document File: 3 page(s) / 66K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a method for utilizing a combination of pre-initialized command objects and pooled data objects to achieve concurrent processing and desired throughput, while avoiding the overhead incurred by the traditional approaches.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 51% of the total text.

Page 01 of 3

A method for optimizing throughput in event-driven applications using a combination of command pattern and pooled data structures

Multithreading is used by applications to achieve aggressive application throughput goals. The application must be thread-safe for this purpose. Typically, each thread that spins-up initializes the data structures and resources needed as well as configuration data that drives the processing. Initializing these resources during the processing is counter-productive to the performance goals sought to be achieved by multithreading.

A common solution for preventing such resource spikes is the use of a thread pool. A

pool of processing threads is initialized with the metadata that drives the processing, as

well as data structures and resources needed for processing. A pre-initialized thread is borrowed from the pool by a main thread when processing commences, and then returned to the pool when the processing is completed. In this approach, two threads are involved - a main thread that borrows a pre-initialized thread from the pool, and the pooled thread on which the processing occurs.

Traditional approaches used for concurrent processing have multiple drawbacks. Initializing configuration and resources during processing causes resource spikes that undermine application throughput goals. The use of a thread pool entails additional complexity to ensure that event consumption and processing are handled as a single transaction. In a common variant of the thread pool approach, the metadata needed for processing is loaded by each execution thread during the processing.

The novel contribution is a method for utilizing a combination of pre-initialized command objects and pooled data objects to achieve concurrent processing and desired throughput, while avoiding the overhead incurred by the traditional approaches. The pre-initialized command objects capture the read-only metadata needed for processing. Since this data is inherently thread-safe, it can be initialized once and shared by any number of threads. Pools are initialized for data objects that must not be shared between threads. The method enables processing throughput with the innovative use of a combination of (i) linked command objects that encapsulate the metadata and steps needed for processing, and (ii) one or more pools that supply the data structures needed for thread-safe processing.

When the application begins, the approach is to create command objects with the static metadata that drives task processing. These command objects...