wip(processing): analysis and render job handlers, render node client (interrupted)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-02 16:33:27 +00:00
1 parent f4e2f285a9
commit fee198f627
30 files changed
+2262 -21

No files matched your search

+7 -3
View File
@@ -7,17 +7,21 @@ namespace Titano.Server.Storage;
/// <summary>
/// The archive engine behind the server (BRIEF §7, §14.4): ingest of verified uploads, lookup of proxies and
/// thumbnails, and its job handlers (scan, rebuild, verify, import, thumbnails, proxies, maintenance). Decoding is
/// managed only (BRIEF §4.2).
/// thumbnails, and its job handlers (scan, rebuild, verify, import, thumbnails, proxies, maintenance), plus the
/// analysis handlers of <see cref="ProcessingModule"/>. Decoding is managed only (BRIEF §4.2).
/// </summary>
public static class ArchiveModule
{
/// <summary>Name the server writes into the archive's lease files.</summary>
public static string Owner { get; } = "server@" + Environment.MachineName;
public static void Register(IServiceCollection services)
{
services.AddSingleton(sp => new ArchiveService(sp.GetRequiredService<TitanoDatabase>(),
new ArchiveServiceOptions { Decoder = DecoderFactory.CreateServer(), Owner = "server@" + Environment.MachineName }));
new ArchiveServiceOptions { Decoder = DecoderFactory.CreateServer(), Owner = Owner }));
services.AddSingleton<IArchiveIngest>(sp => sp.GetRequiredService<ArchiveService>().Ingest);
services.AddSingleton<IJobHandlerProvider>(sp => sp.GetRequiredService<ArchiveService>());
services.AddSingleton<IFrameAssetLocator, ArchiveAssetLocator>();
ProcessingModule.Register(services);
}
}
@@ -0,0 +1,30 @@
using Titano.Core.Export;
using Titano.Core.Imaging.Decoders;
using Titano.Core.Video.Managed;
using Titano.Data;
using Titano.Data.Archiving;
using Titano.Data.Jobs;
using Titano.Data.Processing;
using Titano.Server.Configuration;
namespace Titano.Server.Storage;
/// <summary>
/// Analysis and render engine of the server (BRIEF §4.2, §10, §14.6): light and deep analysis job handlers with managed
/// decoders, so the light analysis queued after uploads runs here. Its render handler is registered too, but the job
/// engine host never runs render jobs: render nodes claim them (BRIEF §14.7).
/// </summary>
public static class ProcessingModule
{
public static void Register(IServiceCollection services)
{
services.AddSingleton(sp => new ProcessingService(sp.GetRequiredService<TitanoDatabase>(), new ProcessingOptions
{
Archive = new ArchiveServiceOptions { Decoder = DecoderFactory.CreateServer(), Owner = ArchiveModule.Owner },
Encoders = [new ManagedEncoderProvider()],
Host = EncoderHost.Server,
ProducedBy = sp.GetRequiredService<ServerOptions>().ServerName,
}));
services.AddSingleton<IJobHandlerProvider>(sp => sp.GetRequiredService<ProcessingService>());
}
}