Commit Graph

17 Commits

Author SHA1 Message Date
Ben Marsh 72816a627d Horde: Store tools in new storage backend.
Data is currently stored as a single file node; may be worth changing to a proper chunked tree in the future.

#preflight none

[CL 24501529 by Ben Marsh in ue5-main branch]
2023-03-03 12:48:45 -05:00
Ben Marsh 68c4185701 Horde: Remove type aliases for ObjectId<> types. Use concrete record types instead.
#preflight none

[CL 23977505 by Ben Marsh in ue5-main branch]
2023-02-02 15:32:29 -05:00
Ben Marsh 0c5b2e8436 Horde: Change StringId types to be implemented as records rather than using aliases.
#preflight none

[CL 23975056 by Ben Marsh in ue5-main branch]
2023-02-02 14:34:59 -05:00
Ben Marsh 5162b519d2 Horde: Refactor codebase to use new config system.
* IOptions<GlobalConfig> is now authoritative for all configuration data.
* ProjectCollection/ProjectService have been removed, since they only contained a redundant copy of the config data. StreamService has been removed due to no longer providing any functionality over IStreamCollection.
* Global configuration file can now include project/stream definitions directly, or can include them in other files. Each file can include other files using the "Include" property at top level scope.

#preflight none

[CL 23685875 by Ben Marsh in ue5-main branch]
2023-01-13 16:01:14 -05:00
Ben Marsh e6fadeab30 Horde: Refactor Tools collection to have an interface more similar to other collections, with an interface for each document and config classes in a separate file.
#preflight none

[CL 23621519 by Ben Marsh in ue5-main branch]
2023-01-09 17:56:07 -05:00
Ben Marsh 06f2b0e96a Horde: Refactoring of the runtime config system, which adds support for including other JSON files and provides access via regular C# IOptions/IOptionsMonitor etc... DI types.
Combined config state is serialized back into a JSON object and compressed, then stored in Redis and broadcast to other server instances via pub/sub events. Update notifications are supported via IChangeTokens and callbacks on IOptionsMonitor.

Exists in parallel with the legacy config system for the time being.

#preflight none

[CL 23599785 by Ben Marsh in ue5-main branch]
2023-01-06 12:42:07 -05:00
Ben Marsh 5fa7a88b48 Horde: Add custom storage endpoints for uploading log files, and set up a default namespace for receiving them.
#preflight none

[CL 23193998 by Ben Marsh in ue5-main branch]
2022-11-18 09:37:01 -05:00
carl bystrom 8dd1868e7b Horde: Mark unawaited transaction commands as fire-and-forget
Prevents task cancellation exceptions from being thrown.
#preflight 63481139e948501224cf6013

[CL 22502870 by carl bystrom in ue5-main branch]
2022-10-13 09:26:12 -04:00
Ben Marsh 8e71afbfa3 Horde: Rename current IStorageClient implementation to ILegacyStorageClient.
#preflight none

[CL 22086962 by Ben Marsh in ue5-main branch]
2022-09-19 21:55:12 -04:00
Ben Marsh 026f64a35b Horde: Add an "Analyze" configuration to the Horde.Build project which enables the standard NET analyzers, and fix up existing warnings.
#preflight none

[CL 21776062 by Ben Marsh in ue5-main branch]
2022-09-03 09:28:43 -04:00
Ben Marsh 60fb2115fb Horde: Upgrade all NuGet packages to latest.
#preflight 630cf402e1124837752f0cb3

[CL 21682720 by Ben Marsh in ue5-main branch]
2022-08-29 13:34:15 -04:00
carl bystrom 86d53262a2 Horde: Use a connection pool for all Redis commands
Only expose ConnectionPool from RedisService to avoid using Database or ConnectionMultiplexer directly.
#preflight 62f2661d3b773d041627aad0

[CL 21286130 by carl bystrom in ue5-main branch]
2022-08-09 09:55:46 -04:00
Ben Marsh 84c453ad8f Horde: Move files into namespaces corresponding to their location on disk.
#preflight none

[CL 20543973 by Ben Marsh in ue5-main branch]
2022-06-07 15:53:33 -04:00
Ben Marsh 59e5d48548 Horde: Finish re-org of Horde solution started a while ago.
* Controllers and messages are now stored alongside their related classes.
* "Impl" folders have been removed to allow more logical grouping of code by subject area rather than implementation details.

#fyi Josh.Engebretson, Carl.Bystrom
#preflight none

[CL 20540527 by Ben Marsh in ue5-main branch]
2022-06-07 13:05:00 -04:00
Ben Marsh f5baa9ad34 Horde: Allow querying the state of tools without any deployments.
#preflight none

[CL 19779826 by Ben Marsh in ue5-main branch]
2022-04-16 10:24:41 -04:00
Ben Marsh 98f3482e70 Horde: Fix tests.
#preflight none

[CL 19637316 by Ben Marsh in ue5-main branch]
2022-04-05 20:38:13 -04:00
Ben Marsh 83041dec73 Horde: Add a subsystem for hosting tools on Horde.
- Each tool can have a number of deployments which are rolled out over time. Clients can specify a "phase" value indicating where in the queue they want to take updates (ie. whether they want to be early- or late-adopters), and deployments can be paused and cancelled.
- Tool channels are configured through the global configuration file. Tools can be marked "public", meaning that they do not require authentication against Horde for access. This can be useful for auto-update scenarios.
- The most recent 5 deployments are kept in the tool at any time.

The collection and controller implementation here is an experiment in reducing the amount of boilerplate currently adopted as a pattern in Horde. Notably:

- Model and collection classes are concrete rather than interfaces (since we don't generally mock them anyway).
- The same model class with annotations is used for response objects (paving the way to supporting patching and filtering using the same public model as the internal model).
- The VersionedCollection class is used to handle automatic migration of documents across schema versions, and cache document values with Redis.
- MongoDB property names are explicit and short, rather than just taking variable names.

#preflight none

[CL 19636699 by Ben Marsh in ue5-main branch]
2022-04-05 20:17:50 -04:00