Commit Graph

35 Commits

Author SHA1 Message Date
Loretta cde2b5e529 Refactor serializer tests, fix deserializer bugs, add Gzip
Major overhaul of binary serializer/deserializer tests: split and expand test coverage for primitives, objects, navigation, generics, circular refs, and edge cases. Fix critical bugs in property skipping, string interning, type mismatch diagnostics, nullable assignment, and VarInt decoding. Add WASM-optimized deserialization options with string caching. Switch SignalR compression from Brotli to Gzip and introduce GzipHelper. Add comprehensive StockTaking test models and real-world bug reproductions. Improve diagnostics, test discovery, and add benchmark/utility scripts.
2025-12-19 19:29:12 +01:00
Loretta 762088caf7 Refactor and expand SignalR data source tests
Split SignalRDataSourceTests into multiple focused files and introduce an abstract base test class for comprehensive coverage. Add concrete test classes for all serializer and collection type combinations. Move data source implementations to separate files. Test coverage now includes edge cases, interface compliance, and advanced scenarios.
2025-12-15 19:28:20 +01:00
Loretta bc30a3aede Refactor: Add high-perf JSON serializer & merge support
- Introduced AcJsonSerializer/AcJsonDeserializer in AyCode.Core.Serializers.Jsons, optimized for IId<T> reference and circular reference handling.
- Added AcJsonSerializerOptions/AcSerializerOptions for configurable reference handling and max depth.
- Implemented fast-path streaming (Utf8JsonReader/Writer) with fallback to DOM for reference scenarios.
- Added type metadata/property accessor caching for performance.
- Provided robust object/collection population with merge semantics for IId<T> collections.
- Added AcJsonDeserializationException for detailed error reporting.
- Implemented UnifiedMergeContractResolver for Newtonsoft.Json, supporting JsonNoMergeCollectionAttribute to control merge behavior.
- Added IdAwareCollectionMergeConverter<TItem, TId> for merging IId<T> collections by ID.
- Included helpers for ID extraction and semantic ID generation.
- Added DeepPopulateWithMerge extension for deep merging.
- Optimized with frozen dictionaries, pre-encoded property names, and context pooling.
- Ensured compatibility with both System.Text.Json and Newtonsoft.Json.
2025-12-14 19:34:49 +01:00
Loretta 2f1c00fd5c Remove MessagePack; unify SignalR serialization model
Major refactor to eliminate MessagePack from SignalR messaging.
All serialization now uses explicit binary methods (.ToBinary/.BinaryTo)
and Brotli-compressed JSON, managed via a new SignalRSerializationHelper.
Custom stream classes and MessagePack attributes are removed.
API is now consistent, type-safe, and easier to maintain.
Test code and all message handling updated to use the new model.
2025-12-14 01:45:17 +01:00
Loretta ac6735ebd8 Unify SignalR response serialization (JSON/Binary/Brotli)
Major refactor: all SignalR responses now use a single unified `SignalResponseDataMessage` type with binary payloads. JSON responses are Brotli-compressed for efficiency. Removed legacy JSON/Binary response types and MessagePack server-to-client serialization. Updated all serialization extensions for zero-allocation binary ops. Refactored client/server/data source/test code to use new message and serialization model. Improved deserialization robustness for primitives. Modernized and streamlined test suite.
2025-12-13 23:01:18 +01:00
Loretta f69b14c195 AcBinary: Major perf/memory optimizations & new benchmarks
- Zero-allocation hot paths for primitive (de)serialization using MemoryMarshal/Unsafe
- FrozenDictionary-based type dispatch for fast deserialization
- Optimized span-based UTF8 string handling, stackalloc for small strings
- Specialized fast-paths for primitive arrays (int, double, etc.)
- Binary header now uses flag-based format (48+) for metadata/ref handling
- Improved buffer management with ArrayPool and minimum size
- Property access via for-loops for better JIT and less overhead
- SignalR test infra supports full serializer options (WithRef/NoRef)
- Added comprehensive AcBinary vs MessagePack benchmarks (speed, memory, size)
- Added rich HTML benchmark report (benchmark-report.html)
- Updated JsonUtilities for new header detection
- Improved documentation and code comments throughout
2025-12-13 01:24:48 +01:00
Loretta 6faed09f9f Fix binary deserializer string interning and add regressions
- Fix: Ensure property names and skipped strings are interned during binary deserialization, preventing interned string index mismatches.
- Add: Extensive regression tests for string interning edge cases, including property mismatch (server has more properties than client), deeply nested objects, repeated/unique strings, and empty/null handling.
- Add: New test DTOs and infrastructure for property mismatch scenarios.
- Update: SignalR test helpers and services to support both JSON and Binary serialization in all tests.
- Improve: SignalRRequestModelPool now initializes models on Get().
- These changes address production bugs and ensure robust, consistent string interning and property skipping in AcBinarySerializer.
2025-12-13 00:12:21 +01:00
Loretta 1a9e760b68 Fix Binary serialization of string DateTimes in attributes
Add regression tests for string-stored DateTime values in GenericAttribute-like collections, ensuring exact value preservation in Binary serialization. Fix AcBinaryDeserializer to only intern strings >= 4 chars, matching serializer logic and preventing intern table index mismatches. Refactor SignalR tests to run under both JSON and Binary modes, and add comprehensive tests for edge cases and production bug scenarios. Clean up test code and comments for clarity.
2025-12-12 22:59:54 +01:00
Loretta 09a4604e52 Add binary serialization support for SignalR responses
Introduces SignalResponseBinaryMessage for efficient binary serialization of response data alongside existing JSON support. Adds utilities to detect serializer type and updates both server and client logic to handle JSON or binary formats automatically. Refactors response creation, logging, and deserialization for consistency and performance. Updates benchmarks and ensures all MessagePack operations use ContractlessStandardResolver.Options. Improves robustness and backward compatibility in client callback handling.
2025-12-12 21:40:48 +01:00
Loretta c29b3daa0e Refactor JSON/SignalR infra; add full test & benchmark suite
Major overhaul of JSON serialization/deserialization:
- Added AcJsonDeserializationException for clearer error reporting.
- Robust JSON validation, type checking, and double-serialization detection.
- Fast-path primitive (de)serialization for all common .NET types.
- Direct support for Dictionary<TKey, TValue> and improved collection handling.
- Enhanced $id/$ref reference resolution and in-place merging.
- Optimized property metadata caching and filtering.
- Comprehensive error handling with detailed messages.
- Extensive new tests for primitives, collections, references, and error cases.
- Benchmarks for serialization, deserialization, and merge scenarios.

SignalR infrastructure improvements:
- Refactored AcSignalRClientBase/AcWebSignalRHubBase for testability (virtual methods, test constructors).
- Added SignalRRequestModelPool for efficient request/response tracking.
- Improved parameter deserialization and IdMessage handling.
- New tags (PingTag, EchoTag) for SignalR messaging.

New test and benchmark infrastructure for SignalR:
- Shared test models and data factories for DTOs, primitives, and complex graphs.
- In-memory, dependency-free SignalR client/hub for round-trip testing.
- Exhaustive test suites for message processing, method invocation, and edge cases (including prior production bugs with Task<T>).
- Benchmarks for SignalR serialization, deserialization, and round-trip performance.

Other changes:
- Improved TaskHelper.WaitTo/WaitToAsync with more accurate polling and cancellation support.
- ExtensionMethods.InvokeMethod now properly unwraps Task/ValueTask results.
- General code cleanup, improved comments, and removal of obsolete code.
- Project references updated for shared test/benchmark infrastructure.

These changes deliver a robust, high-performance, and fully tested JSON/SignalR (de)serialization system, ready for production and advanced testing scenarios.
2025-12-11 21:25:50 +01:00
Loretta f9dc9a65fb High-performance, thread-safe JSON and data source overhaul
- Introduced AcJsonSerializer/Deserializer: fast, reflection-free, streaming JSON with optimized $id/$ref handling and Base62 IDs.
- Default serialization now uses new serializers; falls back to Newtonsoft for complex cases.
- Extensive type/property caching for performance and thread safety.
- Refactored MergeContractResolver and collection merge logic; all merge/populate operations use centralized caches.
- AcObservableCollection and AcSignalRDataSource are now fully thread-safe and support batch operations.
- SignalResponseMessage<T> supports lazy deserialization and direct JSON access.
- Added comprehensive unit tests and benchmarks for serialization, deserialization, and collection operations.
- Updated .gitignore and solution files; refactored core classes for clarity and performance.
2025-12-09 03:24:51 +01:00
Loretta f3ec941774 microsoft packages update 2025-12-01 16:18:36 +01:00
Loretta a56f96903e nuget packages update 2025-10-20 16:45:31 +02:00
Loretta 1a73253867 nuget packages update 2025-09-19 14:42:54 +02:00
Loretta 2edc099017 Add .targets file 2025-08-31 13:07:34 +02:00
Loretta af2eb897f1 build outputpath set to "bin\FruitBank\" 2025-08-28 14:53:12 +02:00
Loretta 6bea2c458d packages update 2025-08-28 14:03:40 +02:00
Loretta ff59d2c2df upgrade to net9.0 2025-08-28 13:58:55 +02:00
Loretta 3e6ba01df2 IAcSoftRemoveEntity 2024-11-13 10:58:39 +01:00
Loretta 4b9fff9521 updates 2024-10-28 14:02:06 +01:00
Loretta 007d01a115 packages updates 2024-08-28 14:20:38 +02:00
Loretta e9af9b1f1f .net packages update to 8.0.8; fixes, etc... 2024-08-14 16:05:32 +02:00
Loretta 4cd37c39df ForgotPassword 2024-08-02 17:58:19 +02:00
Loretta 30c0e69144 ChangePassword 2024-08-01 15:37:20 +02:00
Loretta 956aaa2db6 json fix 2024-07-18 19:20:51 +02:00
Loretta 231c487d5e nuget packages update 2024-06-17 07:03:32 +02:00
jozsef.b@aycode.com 4f736312cc Microsoft packages update 2024-05-29 16:16:00 +02:00
jozsef.b@aycode.com 6fefa1e9d9 Add Profile to ServiceProvider; ServiceProvider to Company in progress... 2024-05-26 09:12:37 +02:00
jozsef.b@aycode.com 4ce3ffea84 improvements, fixes, etc 2024-05-25 22:16:22 +02:00
jozsef.b@aycode.com 986e70bfe5 refactroing, improvements, fixes, etc... 2024-05-18 05:12:23 +02:00
jozsef.b@aycode.com c1b0fcd0d7 refactoring, improvements, fixes... 2024-05-03 15:37:41 +02:00
jozsef.b@aycode.com 93482b5ba6 refactoring, improvements, fixes, etc... 2024-05-01 08:08:14 +02:00
jozsef.b@aycode.com 7360291242 refactoring, improvements... 2024-04-24 06:50:45 +02:00
jozsef.b@aycode.com 2cbc51b143 refactoring, improvements, fixes, etc... 2024-04-23 14:46:37 +02:00
jozsef.b@aycode.com daf35ebf04 Login, Register, ProjectSalt, PasswordHash, meg a faszom sem tudja már... 2024-04-22 17:29:35 +02:00