Skip to content

Refactor jetcd watch #95

Closed
Closed
@wangweicugw

Description

@wangweicugw

Description:

The current implementation of jetcd watch logic is difficult to read and maintain. The code is complex and has too many nested loops, which makes it hard to understand the flow of execution. To improve the code, we propose refactoring the watch logic to use a thread pool and listener pattern.

The thread pool will allow us to handle multiple watch events concurrently, improving the system's efficiency and reducing latency. Meanwhile, the listener pattern will help decouple the watch logic from the rest of the system, making it more modular and easier to maintain.

Some possible steps to implement this refactoring include:

  • Creating a thread pool to handle watch events
  • Refactoring the watch logic to use a listener pattern
  • Updating the code to use the new thread pool and listener pattern
  • Adding tests to ensure that the refactored code works correctly

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions