apache / apache/openwhisk-wskdebug

[refactor] better agent abstraction

Open
#31 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
7
Forks
7
PR merge metrics
No merged PRs in 30d

Description

It would be good to abstract the 3 different (client side) agents (concurrency, activation db and ngrok) using an `Agent` class, and fully encapsulating the logic inside Agent. For example, that ngrok is working very different from the others and does not use a polling loop. That loop is currently in `Debugger.run()`, but it should not have to know about these details.

Requirements:
- `Agent` base class
- 3 different implementations in `src/agents/`
- move logic how to install agent specific things from `AgentMgr` into agent (exception: if installing concurrency fails, install activation db agent #7)
- run loop in agent, gets callback for invoker.run() passed in

Contributor guide

Open the contributing guide

Research direction

Start by reading AgentMgr and Debugger.run() to trace installation and the current polling loop, then inspect the three client-side agent paths under src/agents/. The work is done when a base Agent and three implementations own agent-specific installation and run behavior, while the concurrency fallback and invoker.run() callback remain functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.