Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Support multi-threaded contexts in java #23

Open
lwoodson opened this issue Aug 5, 2016 · 1 comment
Open

Support multi-threaded contexts in java #23

lwoodson opened this issue Aug 5, 2016 · 1 comment

Comments

@lwoodson
Copy link
Contributor

lwoodson commented Aug 5, 2016

Gumshoe does not work well for the use case where multiple elements of a unit of work are parallelized across threads. The common scenario would be web request handling in an SOA that requires multiple API calls to different services for data to complete the request. A common optimization in this case is to parallelize the calls to the APIs via threads to collect the necessary data in as time-efficient manner as possible. Gumshoe should have support for this baked in.

  • Provide executor that manages Gumshoe contexts for asynchronous tasks (decorator)
  • It should be possible to have Gumshoe operate in its current thread-local way with the executor -- a task starts with an empty context
  • It should also be possible to have Gumshoe propagate the context from the task scheduling thread to the task executing thread
  • It should be possible to configure the preferred default context-handling behavior for the executor
  • It should be possible when scheduling a task to override the default context-handling behavior used when executing the task
  • In either mode of context handling, any contexts created within the task should be cleaned automatically up on task exit
@lwoodson
Copy link
Contributor Author

lwoodson commented Aug 5, 2016

Might want to consider how this could apply to java 8 parallel streams, but that is probably outside the scope of this specific issue (thanks @joeslice)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant