Commit Graph

16 Commits

Author SHA1 Message Date
Ben Marsh
8684b930ed Remove implicit conversions from string to Utf8String. This conversion is not free, and recent versions of the MongoDB driver do not handle implicit conversions correctly at runtime.
[CL 28456358 by Ben Marsh in ue5-main branch]
2023-10-04 10:49:04 -04:00
Ben Marsh
320107efd8 Horde: Compute service refactor.
- Message framing changed back to use simple
- Support for multiplexing multiple requests over a single socket. Requests are tagged with an arbitrary channel id and routed to a queue for the appropriate IComputeChannel on the client.
- Clients can now request a message writer through the IComputeChannel interface, allowing pooling of write buffers for generating new messages and reducing data copies.
- Added accounting for machine resources in compute leases. Compute requests specify min/max desired resources, receive allocated resources in respoonse.
- Switched to AES-GCM for encryption. Message length is unencrypted but validated as part of the message packet.

#preflight none

[CL 24521844 by Ben Marsh in ue5-main branch]
2023-03-06 09:55:49 -05:00
Ben Marsh
f69c510598 EpicGames.Serialization: Fix writing of CB fields at the root of the output object.
* CbWriter was expecting BeginObject/BeginArray call before any fields were written, so did not handle writing fields directly to the root scope.
* Fields written at the root scope were not being flushed immediately after writing. Rest of the class assumes that any complete fields at root scope had already been accounted for in object size.

#preflight none
#fyi Joakim.Lindqvist

[CL 24520927 by Ben Marsh in ue5-main branch]
2023-03-06 09:00:40 -05:00
Ben Marsh
6fac200317 EpicGames.Serialization: Refactoring CbWriter.
* New base class (CbWriterBase) has a virtual method to allocate chunks of memory for output, while still sharing common functionality for tracking scope state.
* Data for fixing up size/offset fields is written to blocks of memory returned by the CbWriterBase allocator rather than just to the final output buffer.
* Added support for embedded externally allocated blocks of data into the output stream, correctly updating size fields of containing fields.

#preflight none
#fyi Joakim.Lindqvist

[CL 24505997 by Ben Marsh in ue5-main branch]
2023-03-03 15:37:45 -05:00
Ben Marsh
e1b1f8dbe1 Horde: CI warning fixes.
#preflight none

[CL 24375139 by Ben Marsh in ue5-main branch]
2023-02-22 21:49:01 -05:00
Ben Marsh
ea191aeda1 Horde: Rework C++ remote execution to use direct connection to initiator.
#preflight none

[CL 24372198 by Ben Marsh in ue5-main branch]
2023-02-22 18:07:45 -05:00
Ben Marsh
ad0ec47532 EpicGames.Serialization: Refactor CbWriter to be an interface with extension methods, to make it easier to iterate on less allocation-heavy methods for piecing together CB objects.
#preflight none

[CL 24365307 by Ben Marsh in ue5-main branch]
2023-02-22 13:35:58 -05:00
Ben Marsh
27ff743762 Fix xmldoc warnings in EpicGames.Serialization.
#preflight none

[CL 20777344 by Ben Marsh in ue5-main branch]
2022-06-22 13:31:00 -04:00
Ben Marsh
a11561ae5f Support for serializing signed and unsigned VarInt types from C#.
#preflight 62b1f6898e03312ad86e0757

[CL 20760159 by Ben Marsh in ue5-main branch]
2022-06-21 13:00:33 -04:00
Ben Marsh
508c144999 Horde: Last batch (hopefully) of static analysis fixes/suppressions.
#preflight 623e144c8073508cfc117a87

[CL 19517822 by Ben Marsh in ue5-main branch]
2022-03-25 15:35:47 -04:00
Ben Marsh
6b226011d7 Change EpicGames.Serialization library to match standard coding style.
#preflight none

[CL 19501703 by Ben Marsh in ue5-main branch]
2022-03-24 15:56:16 -04:00
Ben Marsh
17ddfdfdfc Horde: More improvements to Bundles.
- Now does all string manipulations in UTF8 rather than converting to and fro with data received from Perforce
- Added support for reading a stream out of a CbWriter object. This allows pushing data directly to Horde Storage from the piecemeal 1kb buffers it allocates without having to concatenate everything into a contiguous array first, removing some big allocations and data copying on the common path for serializing objects into Horde Storage.
- Refactored the way that BundleNodeRef objects work so they don't need to track the Bundle that owns them, so we can add some serialization/deserialization tests without having to set up as much framework code.

#preflight none

[CL 19345769 by Ben Marsh in ue5-main branch]
2022-03-10 19:56:01 -05:00
Ben Marsh
184f8d56fb Change IoHash to be a pure struct rather than wrapping a ReadOnlyMemory<byte> buffer.
#preflight 620a675317632e9484560674

[CL 18978869 by Ben Marsh in ue5-main branch]
2022-02-14 09:35:17 -05:00
Ben Marsh
1efd86c9da Horde: Use Horde.Storage for remote execution storage, rather than the legacy storage implementation in Horde.Build.
- Agent and server both use the IStorageClient interface in EpicGames.Horde to communicate with the storage backend.
- An instance of Horde.Storage is run in the same process as Horde.Build for local development, but is compiled out for containerized builds.
- Compute clusters are defined in global config file, and control permissions for who can create remote execution jobs. In the future it will likely be used to control access for different machines, prioritization, etc...
- Each compute cluster has an identifier, and the API for starting/monitoring jobs includes that identifier as part of the route (ie. /api/v1/compute/<cluster-id>).
- Removed gRPC interface for storage and compute services. May be resurrected in the future.

#preflight none

[CL 18784247 by Ben Marsh in ue5-main branch]
2022-01-29 14:50:26 -05:00
Ben Marsh
9e6e68ba17 CS: Add overloads for commonly serialized compact binary types.
#preflight 61e4a67d7b0f77175a5d6621

[CL 18630220 by Ben Marsh in ue5-main branch]
2022-01-16 18:26:30 -05:00
Ben Marsh
5e131f7ddc CS: Rename compact binary files to match the classes they contain.
#preflight none

[CL 18628533 by Ben Marsh in ue5-main branch]
2022-01-15 13:33:44 -05:00