phenix-linking-service
Windows-service-hosted WCF service (TC.Service.Linking / Phenix Location) for searching, retrieving and maintaining accommodation-to-location links in the Location database, plus its contract NuGet package and database scripts.
Health score
0 to 100 across seven weighted factors; nothing is hidden. Green is 75 and above, amber 50 to 74, red below 50. How scoring works.
Facts
| Languages | csharp, sql |
| Frameworks | WCF |
| Runtimes | .NET Framework 4.6.2, .NET Standard 2.0 |
| Tests / CI | some / CI in place |
| Last commit | 2024-01-12 |
| Owner | Owner unknown (mapping to be curated) |
| Domain | Content and destinations (system generated; curate in repo-owners.json to override) |
| Product area | Phenix |
| Hosted | On-prem Deployed to our own machines
|
| Releases | 2 release pipeline(s): \commercial\linking\phenix-linking-database; \commercial\linking\phenix-linking-service |
| Integration | wcf, sqlserver |
| Source | Open in Azure DevOps |
Risk flags
Each flag links to its glossary definition.
Dependencies in context
Entanglement
kernel Bound into the core by 2 mechanism(s).
- Speaks WCF (host)
- Shares core database sqlserver:EventLog
Detaches when its WCF surface gains a modern interface or its WCF calls move to one; and when the shared database group it belongs to gains an owned API or completes schema separation (sqlserver:EventLog).
Migration playbooks
Generated from this repo's assessment data: what is feasible, what blocks it, and the steps in order. Ratings: green means actionable now, amber means sequence other work first, red means blocked, grey means not applicable.
ZDD adoption
A long roadTechnically eligible one day, but the blockers are structural: hosted WCF or SOAP contracts that cannot run two versions at once, or heavy legacy coupling. Sequence the modernisation work first. Hosts WCF or SOAP endpoints: strict serialization contracts cannot safely run two versions at once (the shared-enum trap). End-of-life runtime compounds the work. Shares sqlserver:EventLog: schema changes move in convoy.
- 3 system(s) depend on this repo; during a rolling deploy they will talk to old and new versions at once, so responses must stay compatible
- Shares sqlserver:EventLog with 13 system(s): destructive schema change is prohibited in a single release; expand and contract only
- Runs as a Windows service or scheduled task: deploy between runs or use overlapping instances; the load-balancer drain pattern does not apply directly
- Adopt the four-stage discipline from the ZDD engineering standard: pre-deployment compatibility, deployment, feature activation behind a flag, post-release cleanup.
- Raise automated test coverage first: ZDD trades the end-of-sprint manual gate for continuous automated confidence, so the tests are the entry ticket.
- Make every change dual-version safe: backwards-compatible APIs (new major version for breaking wire changes), expand and contract for any schema change, and consumers tolerant of unknown fields.
- Audit serialized data: anything in Redis, queues or shared caches must deserialize cleanly across adjacent versions.
- Wrap behaviour changes in feature flags so code deploys dark and release becomes a business decision, not a deployment event.
- Route deployments through the Workflow Engine's automated drain, deploy, health-check, return cycle (the path proven by the first automated production run in mid-2026).
- Verify with area-scoped regression rather than the whole-platform cycle, and watch error rates after rollout with automated rollback on alert.
SQL Server exit
Blocked by a shared core databasesqlserver:Location, sqlserver:EventLog are shared, so this system cannot change engine on its own: every sharer moves in convoy. The stage 4 work (named owner, declarative schema, owned API) has to land first; after that, the steps below apply to whatever slice this system ends up owning.
- sqlserver:Location is shared with 1 other system(s)
- sqlserver:EventLog is shared with 13 other system(s) and is a core database
- Inventory the schema and query surface of sqlserver:Location, sqlserver:EventLog: tables, stored procedures, triggers, cross-database joins and anything else engine-specific.
- Confirm the target: PostgreSQL (relational model; keep transactions and joins, swap the engine).
- Replatform to modern .NET first (see the recommended actions): current PostgreSQL and MongoDB drivers and EF Core providers target modern .NET, and doing one risky change at a time is cheaper than doing two.
- Data access is not through an ORM, so port the SQL by hand: translate T-SQL constructs, replace stored procedures with application code or target-native equivalents, and add integration tests around the queries that matter first.
- Stand up the target alongside SQL Server, backfill with an ETL pass (pgloader or an export/import job), then dual-write or replicate until parity is proven.
- Move reads to the target, watch correctness and latency, then cut writes over and keep SQL Server read-only until confidence is earned.
- Decommission the SQL Server database and remove the connection strings and firewall paths that pointed at it.
Containerisation
Feasible after replatformingAppropriate eventually, but not from here: the legacy runtime and the hosted WCF surface both have to go first, and that work is already in this repo's recommended actions.
- .NET Framework only runs on Windows; practical (Linux) containers need modern .NET
- Hosts WCF or SOAP endpoints, which have no home on modern .NET; consumers need a modern interface first
- Replatform to modern .NET first (see the recommended actions), replacing the hosted WCF/SOAP surface with REST, gRPC or messaging so consumers can follow. Containerising then becomes routine.
- Convert the Windows service or scheduled task into a .NET worker service (or an ECS scheduled task) so it has a container-shaped lifecycle.
- Add a Dockerfile and make the app read all configuration from environment variables and the secrets manager, never from machine-local files.
- Log to stdout and expose a health check endpoint so ECS can supervise it.
- Adopt the shared ci.yml pipeline template with the container parameters (awsRegion, containerAfterBuild, ecsTerraformRepo), which is exactly how the estate's existing AWS services deploy.
- Define the service in the Terraform repo, deploy to a non-production environment, then shift traffic and disarm the deployment-group release pipeline.
Recommended actions
Replatform phenix-linking-service to modern .NET
Runs on .NET Framework 4.6.2, .NET Standard 2.0, out of mainstream support. No pinning dependency blocks it; sequence by fan-in (providers before consumers). Shares sqlserver:EventLog, so batch it with its database group (stage 4).
Impact: Unblocks 3 dependent system(s)
proposedAssessment notes
phenix-linking-service
Purpose
The Phenix "linking" (location) service: ILocations and IAccommodation WCF contracts expose operations like filtered accommodation-location search, location lookup and link maintenance over the Location database — the mapping layer that ties provider accommodations to Phenix places. The repo also publishes the TC.ServiceContract.Linking NuGet package (consumed by e.g. phenix-cms) and versions the Location database via Change/Create SQL script projects.
Tech stack
C# .NET Framework 4.6.2. The service is self-hosted WCF in a Windows service (TC.Common.ServiceHost wraps ServiceBase + System.ServiceModel.ServiceHost, with installer classes for service registration) exposing netTcp and wsHttp (secured and insecure) high-performance bindings, configured through per-environment App.*.config transforms. Data access is Dapper plus TC.ConnectionBroker.Sql. The contract package multi-targets net462/netstandard2.0; a small .NET 6 console test tool lives in tools/.
Deployment
Two release pipelines under \commercial\linking\ (phenix-linking-service, phenix-linking-database; release_count 2) from matching build pipelines. YAML builds exist in-repo (build-service-wcf.yml, build-service-contract.yml, build-db.yml) using the shared pipeline templates.
Dependencies
Internal packages: TC.ConnectionBroker.* (tc-connectionbroker) and TC.Exceptions (tc-exceptions) only. No third-party services.
Data stores
SQL Server Location (the linking/location data, schema versioned in src/LocationDatabase) and EventLog for logging, both resolved via ConnectionBroker.
Integration points
WCF only — netTcp for internal high-throughput callers and wsHttp endpoints for others; consumers bind via the published TC.ServiceContract.Linking package. No REST surface or messaging.
Code health
One MSTest project (TC.Service.Linking.Test) with limited coverage, plus a manual WinForms-era test tool. README is untouched boilerplate. Dormant: last commit 2024-01-12. The TC.Common.* hosting/configuration projects are vintage hand-rolled infrastructure predating the estate's shared hosting packages.
Modernisation risks
High: .NET Framework 4.6.2 (out of support) Windows service exposing WCF netTcp/wsHttp — none of which carries forward to modern .NET without a rewrite (CoreWCF or a REST/gRPC replacement). Its consumers bind through the contract package, so migrating means coordinated updates across the Phenix apps that link accommodations (CMS and retail-side tooling). Being dormant but production-deployed, drift risk accumulates while the platform around it moves on.