sidequestjs / sidequestjs/sidequest

Events / Callbacks

Open
#160 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1k
Forks
25
Avg merge
12h 17m
Merged PRs (30d)
5

Description

Do you think it would be possible to expose an event emitter on the engine which fires events when jobs are completed/failed?

I'd like to be able to do things in my application in response to jobs completing without having to poll for changes.

If such a system were implemented, then an additional Job convenience method of "event" would also be helpful for allowing me to emit an event manually.

The immediate and most obvious downfall of a system like this would be whom receives the event, in a distributed system you may pick up an job that was enqueued on a different node. Would you expect the enqueuing node to receive the event, or the node running the job?

For my use case it's absolutely fine that that stays a problem for the user in user land, and that the node that processes the job receives the event.

Are there any glaring issues which make this non-viable?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the engine's job completion and failure handling, then review the Job API described in the issue. Determine how an event emitter and a manual Job event would fit, including which node receives events in distributed execution. Done requires a documented event contract and a settled delivery model.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.