nuts-foundation / nuts-foundation/nuts-node

Clearer distinction between New, Configure and Start

Open
#2,299 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
28
Forks
23
Avg merge
1d 10h
Merged PRs (30d)
76

Description

We could homogenise New by passing a single *ServiceRegistry which points to all engines/services. New only fills structs and returns a pointer which is then added to the registry. After all New methods have been called. Configure is called which opens DB connections, reads files and does consistency checks. Then Start opens sockets, starts publishers and starts go routines.

By using *ServiceRegistry, New can also create sub-services that are now created in Configure.

Contributor guide

No contributing guide indexed for this repository

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 service lifecycle entry points named in the issue: New, Configure, Start, and ServiceRegistry. Map when services and sub-services are created, then verify that New only constructs and registers services, Configure handles connections, files, and consistency checks, and Start handles sockets, publishers, and goroutines.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
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.