Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge/clean up SAEA and ABJEA, and remove the promises-of-results, futures-of-handles, etc. #1218

Closed
kshakir opened this issue Jul 29, 2016 · 6 comments

Comments

@kshakir
Copy link
Contributor

kshakir commented Jul 29, 2016

AsyncBackendJobExecutionActor (ABJEA) uses a completionPromise: Promise to tell its parent actor, the BackendJobExecutionActor (BJEA), when the async job is done.

I doesn't seem obvious why we're passing around references to scala.concurrent.Promises when akka has a perfectly good message system already.

Worst case, if one needed two different states and didn't want the framework to use an FSM, the BJEA could context.become(initializing), start the async job, then context.become(asyncRunning), and wait for the message from the ABJEA.

@katevoss
Copy link

This is unblocked and ready for fixing.

@kshakir
Copy link
Contributor Author

kshakir commented Mar 28, 2017

More details that emerged over the past couple weeks:

In the past, the Local and JES backends extended the ABJEA. When the Local and JES backends were merged into Standard, there was a lot of work in the Standard not to mess with the existing ABJEA. This turns out to have not been necessary. The only known extension of the ABJEA is now the Standard implementation, the StandardAsyncExecutionActor (SAEA).

Thus, one is now free to merge the SAEA and ABJEA, and remove the promises-of-results, futures-of-handles, etc. with a simplified actor/fsm.

Similarly, while there is a Standard actor that extends the BackendJobExecutionActor (BJEA), this isn't necessary either! As the actors are untyped, any implementation that receives and responds to correct messages will work. Thus the StandardSyncExecutionActor (SSEA) could be refactored also, and even merging the SSEA and the SAEA into a single actor/fsm.

Also, when considering rewrites, it was also noted that the term "sync/async" in the SSEA/SAEA names were confusing. Possible alternatives were StandardFutureExecutionActor / StandardMessagingExecutionActor. Again this may be moot if the actors are merged into a single actor.

@katevoss
Copy link

@kshakir Can you give me an idea of the effort involved for this?

@kshakir
Copy link
Contributor Author

kshakir commented Sep 27, 2017

I'd call this a "medium" effort for a developer. It's not a quick fix, while not as much as an effort as "implement CWL". A couple weeks of refactoring, a round of testing and team review, then another two weeks to polish it off.

@katevoss
Copy link

As a user developing a backend for Cromwell, I want the execution actor naming and system to be simple and concise, so that I can more easily work with Cromwell, and don't add unnecessary code.

  • Effort: Medium
  • Risk: Small
  • Business value: Small
    • Not to devalue cleaning up tech debt, but there are higher value items on our docket.

@katevoss katevoss changed the title Investigate Promise between Backend Executor and Async Merge/clean up SAEA and ABJEA, and remove the promises-of-results, futures-of-handles, etc. Nov 14, 2017
@geoffjentry
Copy link
Contributor

Closing this as it's a year and a half old

@kshakir - if you'd like something to change in this regard, put together a tech doc of what you'd like to see happen.

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

No branches or pull requests

4 participants