mirror of
https://github.com/hanzoai/jube-fork.git
synced 2026-10-30 18:33:33 +00:00
The Redis connection is created at startup and added to Dependency Injection, which is different to the connection to Postgres which has its connection newed on each call to the database, because of the way the driver pools its connections. Some new Cache entities were added, such as Latest, to capture the most recent event for a model invocation, for each Search Key. New accompanying repositories created for new entities, including their POCO’s for Linq2DB. The Redis Key Value, Hash Sets and Sorted Sets are a mish mash as compared to the Postgres Cache tables, with the trade off of there being no need to index and - especially in the implementation of Sorted Sets - much better performance under load. Redis will certainly be the focus moving forward. The most current model Reference Date identification, which is used extensively in background threads, was very clumsily and inefficiently handled in previous versions, whereas it is now stored in Cache, Postgres or Redis, updated on each event invocation, for each model. A general audit of the Cache repositories interfaces ensure that they now fully support multi-tenancy. Implemented Time To Live for Cache data at the model, and the Search Key, although only in the case of Redis does the Search Key Time To Live have effect as there is no similar Sorted Set concept in Postgres indexes. Updated the User Interface to support Time To Live requiring update to Model and RequestXPath Pages, Controllers, DTO’s, Validations and associated repositories. Created a new regular Time To Live purge thread which is supported by both the Postgres and Redis implementations. Migrations exist to create Postgres objects in support of the above, with TTL Counter Values being default to 1 Day, given legacy data otherwise null. Updated Stress Test to include TPS Snapshot and Response Time write out. Some improvements in the request thread start while also making it more realistic in dithering load. Included a time drift of x seconds added to the Reference Date for each transaction to allow background purge and TTL Counter Decrement threads to be tested under load. Updated documentation to include Redis functionality. Documentation presents Redis as being the default and recommended Cache. Some new Environment Variables to support new or updated functionality. Given the manner in which the Cache is presented via Interfaces and Builders, except for new functionality, no changes have been made to the invocation flow, or indeed the wider system. Some TODO's were removed which should not have been in code. Code tidy here and there if adjacent to the project.
59 lines
2.8 KiB
C#
59 lines
2.8 KiB
C#
/* Copyright (C) 2022-present Jube Holdings Limited.
|
|
*
|
|
* This file is part of Jube™ software.
|
|
*
|
|
* Jube™ is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License
|
|
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
* Jube™ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
|
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
|
|
|
* You should have received a copy of the GNU Affero General Public License along with Jube™. If not,
|
|
* see <https://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
using System;
|
|
using Jube.App.Dto.Interfaces;
|
|
|
|
namespace Jube.App.Dto
|
|
{
|
|
public class EntityAnalysisModelDto : IUpdated
|
|
{
|
|
public string Name { get; set; }
|
|
public Guid Guid { get; set; }
|
|
public bool Active { get; set; }
|
|
public bool Locked { get; set; }
|
|
public string EntryXPath { get; set; }
|
|
public string ReferenceDateXPath { get; set; }
|
|
public string EntryName { get; set; }
|
|
public char MaxResponseElevationInterval { get; set; }
|
|
public int MaxResponseElevationValue { get; set; }
|
|
public int MaxResponseElevationThreshold { get; set; }
|
|
public char MaxActivationWatcherInterval { get; set; }
|
|
public int MaxActivationWatcherValue { get; set; }
|
|
public int MaxActivationWatcherThreshold { get; set; }
|
|
public double ActivationWatcherSample { get; set; }
|
|
public bool EnableCache { get; set; }
|
|
public bool EnableSanctionCache { get; set; }
|
|
public bool EnableTtlCounter { get; set; }
|
|
public bool EnableElasticsearchArchive { get; set; }
|
|
public bool EnableRdbmsArchive { get; set; }
|
|
public bool EnableActivationArchive { get; set; }
|
|
public bool EnableActivationWatcher { get; set; }
|
|
public bool EnableResponseElevationLimit { get; set; }
|
|
public string ReferenceDateName { get; set; }
|
|
public int CacheFetchLimit { get; set; }
|
|
public char CacheTtlInterval { get; set; }
|
|
public int CacheTtlIntervalValue { get; set; }
|
|
public byte EntryPayloadLocationTypeId { get; set; }
|
|
public byte ReferenceDatePayloadLocationTypeId { get; set; }
|
|
public double MaxResponseElevation { get; set; }
|
|
public int Id { get; set; }
|
|
public string CreatedUser { get; set; }
|
|
public DateTime CreatedDate { get; set; }
|
|
public string UpdatedUser { get; set; }
|
|
public DateTime UpdatedDate { get; set; }
|
|
public int Version { get; set; }
|
|
public string DeletedUser { get; set; }
|
|
public DateTime DeletedDate { get; set; }
|
|
}
|
|
} |