twisted / twisted/twisted

Improved service support

Open
#6,813 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core enhancement new priority-normal
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

dustin's avatar @dustin reported
Trac ID trac#6813
Type enhancement
Created 2013-11-05 22:50:29Z

Buildbot is a major consumer of services. A big service tree is created at startup, services come and go during operation, and the service tree gets a major pruning during reconfigs.

All of this turns up some design deficiencies:

  • [ticket:5941 services do not start asynchronously], leaving the caller of startService uncertain as to when the service is actually fully started
  • the startService and stopService methods do not check whether the service is already running. Neither does MultiService check whether its child services are running before calling their start/stop methods. Related: #4366
  • MultiService handles deferreds from stopService incorrectly (this is a straight-up bug, #6790)

There was some discussion of this in #4366, but it appears that the issues cannot be fixed within the current implementation. Maybe they can, or maybe we need a new, alternative implementation.

Searchable metadata
trac-id__6813 6813
type__enhancement enhancement
reporter__dustin dustin
priority__normal normal
milestone__ 
branch__ 
branch_author__ 
status__new new
resolution__None None
component__core core
keywords__ 
time__1383691829000000 1383691829000000
changetime__1385696679000000 1385696679000000
version__None None
owner__ 
cc__lvh cc__exarkun

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 reading the service lifecycle and MultiService implementation, then review tickets #5941, #4366, and #6790 for the existing discussion and known behavior. Determine whether asynchronous startup, repeated start/stop checks, and correct stopService deferred handling can fit the current implementation or require an alternative design; done means the service tree handles these lifecycle cases reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.