Skip to content

Commit 351129d

Browse files
author
Danny Logsdon
committed
# 1.4.0
- Rollup Release
1 parent 7d930a1 commit 351129d

32 files changed

Lines changed: 939 additions & 485 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,22 @@ None
6060
### SemaphoreService
6161
This provides a locking mechanism for shared resources in the infrastructure. Using the CacheData object, multiple concurrent services try creating the same key/record in the backing storage, the one that wins pulls records, then releases/deletes the lock. Processes will delay and retry creating the lock until it obtains it or times out. See the SemaphoreOptions for the full list of values used.
6262

63-
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache/Service/SemaphoreService.cs)
63+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/SemaphoreService.cs)
6464

6565
### SingleServerProcessService
6666
This interface stores a key in cache used for syncing across load-balanced applications so that only one server would process records at a time (see SingleWorkService). It provides a heartbeat, so that other instances will pickup and start processing, should the main running server be shut down.
6767

68-
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache/Service/SingleServerProcessService.cs)
68+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/SingleServerProcessService.cs)
6969

7070
### SingleWorkService class
7171
This abstract class implements the WorkService and the ISingleServerProcessService to provide a single ordered work queue across multi-application instances.
7272

73-
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache/Service/SingleWorkService.cs)
73+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/SingleWorkService.cs)
7474

7575
### LockedWorkService class
7676
This abstract class provides a way to lock the underlying data store and use it as a queue, so that multiple, simultaneous running workers do not return the same records. While the APIConcurrrency rule provides some protection, this class will provide the full solution.
7777

78-
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache/Service/LockedWorkService.cs)
78+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/LockedWorkService.cs)
7979

8080
## Application Settings
8181

ReleaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.4.0
2+
- Rollup Release
3+
14
# 1.4.0-e
25
- Minor fixes
36
- New test home page

src/V1/ServiceBricks.Cache.AzureDataTables/Resource/readme.md

Lines changed: 82 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,105 @@
1-
![ServiceBricks Logo](https://github.com/holomodular/ServiceBricks/blob/main/Logo.png)
1+
![ServiceBricks Logo](https://raw.githubusercontent.com/holomodular/ServiceBricks/main/Logo.png)
22

3-
[![NuGet version](https://badge.fury.io/nu/ServiceBricks.svg)](https://badge.fury.io/nu/ServiceBricks)
4-
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/holomodular-support/bdb5c7c570a7a88ffb3efb3505273e34/raw/servicebricks-codecoverage.json)
3+
[![NuGet version](https://badge.fury.io/nu/ServiceBricks.Cache.Microservice.svg)](https://badge.fury.io/nu/ServiceBricks.Cache.Microservice)
4+
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/holomodular-support/a4914be5332dc8c9536889edf1f00ace/raw/servicebrickscache-codecoverage.json)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-389DA0.svg)](https://opensource.org/licenses/MIT)
66

7-
# ServiceBricks: The Microservices Foundation
7+
# ServiceBricks Cache Microservice
88

99
## Overview
1010

11-
[ServiceBricks](https://ServiceBricks.com) is a powerful microservices platform designed to streamline the development, deployment, and maintenance of distributed systems using artificial intelligence.
12-
Leveraging Domain-Driven Design (DDD), Event-Driven Architecture (EDA), and a host of advanced features, ServiceBricks empowers teams to create scalable, customizable services tailored to specific business domains.
11+
This repository contains the cache microservice built using the ServiceBricks foundation.
12+
The cache microservice exposes a key/value pair object that can be used for simple data storage.
13+
It includes a semaphore, exposing a locking mechanism that can be used by multiple servers when needing to access a shared resource.
14+
A background expiration task can be enabled, with an initial delay and interval, to delete expired cache items once their expiration date occurs.
15+
The expiration process duals as an orphaned lock cleanup, should a lock not be released within the timeout period.
1316

14-
## Why ServiceBricks?
17+
## Data Transfer Objects
1518

16-
* **Artificial Intelligence:** Use our online generator to create production-grade microservices in seconds using only a single human sentence as input.
17-
* **Advanced Architecture:** Provides the core architectural patterns, implementation, standardization, and governance for your microservices.
18-
* **REST APIs:** Expose standardized, secure REST APIs to manage your data.
19-
* **Storage Agnostic:** Interchangeably supports relational, document, cloud or embedded database engines
20-
* **Seamless Integration:** Switch storage providers without impacting microservice operations and avoid vendor lock-in.
19+
### CacheDataDto - Admin Policy
20+
Key and Value pair storage object along with an expiration date to denote when it can be deleted.
2121

22+
```csharp
2223

23-
## Major Features
24+
public partial class CacheDataDto : DataTransferObject
25+
{
26+
public DateTimeOffset CreateDate { get; set; }
27+
public DateTimeOffset UpdateDate { get; set; }
28+
public string CacheKey { get; set; }
29+
public string CacheValue { get; set; }
30+
public DateTimeOffset? ExpirationDate { get; set; }
2431

25-
* **Artificial Intelligence Integration:** Use large language models to build, query and manipulate your microservice data using simple human input.
26-
* **Generics:** Extensive use of generics, allowing the compiler to generate most of the required source code.
27-
* **REST API Services:** Templated, repository-based services for quickly exposing standard CRUD+QPV (Query, Patch, Validate) methods or custom methods.
28-
* **[ServiceQuery Integration](https://github.com/holomodular/ServiceQuery):** Supports standardized, polyglot, dynamic data querying for all database engines.
29-
* **[Business Rule Engine](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/BusinessRuleEngine.md):** Polymorphic techniques to build reusable business logic.
30-
* **[Domain-Driven Design (DDD)](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/FlowOfData.md) & [Event-Driven Architecture (EDA)](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/EventDrivenArchitecture.md):** Customize business logic for any supported object and method.
31-
* **[Background Processing](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/BackgroundTasks.md):** Supports asynchronous processes, tasks, and rules.
32-
* **[Relational, Document, Cloud and Embedded Database Support](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/SupportedDatabaseEngines.md):** Works standard with Azure Data Tables, Cosmos DB, InMemory, MongoDB, Postgres, SQLite, SQL Server and more.
33-
* **[Service Bus Engine](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/BroadcastsAndServiceBus.md):** Supports broadcasts of system data with InMemory and Azure Service Bus.
34-
* **[Classic or Modern REST API Design](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/ClassicVsModernRestApi.md):** Choose between Classic or Modern modes, with various response formats.
35-
* **[NuGet Packages](https://github.com/holomodular/ServiceBricks-Documentation/blob/main/V1/NuGet.md):** Quickly build new services and applications.
36-
* **Testing Framework:** Comprehensive Xunit test framework for robust unit and integration testing with thousands of tests available.
37-
* **Open Source:** All referenced assemblies are open source and licensed under MIT or an equivalent license.
32+
}
3833

34+
```
3935

40-
## Getting Started with Examples
4136

42-
Explore our [ServiceBricks-Examples](https://github.com/holomodular/ServiceBricks-Examples) repository for practical examples on hosting and deploying your ServiceBricks foundation. From single, monolithic web applications to distributed, multi-deployment, containerized web applications, these examples provide the building blocks to create and scale your own foundations quickly.
37+
## Background Tasks and Timers
4338

44-
## Documentation
39+
### CacheExpirationTimer class
40+
This background timer can be enabled, with an initial delay and interval, to execute the CacheExpirationTask.
4541

46-
Check out our [ServiceBricks-Documentation](https://github.com/holomodular/ServiceBricks-Documentation) repository for comprehensive documentation on the platform, including guides on using all components and developing your own microservices.
42+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache/Background/CacheExpirationTimer.cs)
4743

48-
## Official Pre-Built Microservices
44+
### CacheExpirationTask class
45+
This background task queries for all CacheData records with an expiration date is less than the current date/time, then deletes expired records.
4946

50-
Get started quickly with our pre-built microservices:
47+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache/Background/CacheExpirationTask.cs)
5148

52-
* [ServiceBricks-Cache](https://github.com/holomodular/ServiceBricks-Cache): Generic data storage microservice with a built in expiration process and a distributed semaphore for cache-level locking for multi-instance deployments.
53-
* [ServiceBricks-Logging](https://github.com/holomodular/ServiceBricks-Logging): Service-scoped or centralized logging and a web request auditing microservice.
54-
* [ServiceBricks-Notification](https://github.com/holomodular/ServiceBricks-Notification): Notification and delivery for emails and SMS messages.
55-
* [ServiceBricks-Security](https://github.com/holomodular/ServiceBricks-Security): Authentication, authorization, and application security with JWT bearer token support for multi-instance deployments.
56-
* [ServiceBricks-Work](https://github.com/holomodular/ServiceBricks-Work): Work queue microservice for reliable, event-driven background processing.
49+
## Events
50+
None
5751

58-
## Trademarks
52+
## Processes
53+
None
5954

60-
“ServiceBricks”, "ServiceQuery" and “HoloModular” are trademarks of HoloModular LLC. The MIT License covers code only; it does not grant rights to use our trademarks, logos, or brand assets (including in modified or redistributed versions) without permission.
55+
## Service Bus
56+
None
6157

62-
## About
58+
## Additional Services
59+
60+
### SemaphoreService
61+
This provides a locking mechanism for shared resources in the infrastructure. Using the CacheData object, multiple concurrent services try creating the same key/record in the backing storage, the one that wins pulls records, then releases/deletes the lock. Processes will delay and retry creating the lock until it obtains it or times out. See the SemaphoreOptions for the full list of values used.
62+
63+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/SemaphoreService.cs)
64+
65+
### SingleServerProcessService
66+
This interface stores a key in cache used for syncing across load-balanced applications so that only one server would process records at a time (see SingleWorkService). It provides a heartbeat, so that other instances will pickup and start processing, should the main running server be shut down.
67+
68+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/SingleServerProcessService.cs)
69+
70+
### SingleWorkService class
71+
This abstract class implements the WorkService and the ISingleServerProcessService to provide a single ordered work queue across multi-application instances.
72+
73+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/SingleWorkService.cs)
74+
75+
### LockedWorkService class
76+
This abstract class provides a way to lock the underlying data store and use it as a queue, so that multiple, simultaneous running workers do not return the same records. While the APIConcurrrency rule provides some protection, this class will provide the full solution.
77+
78+
[View Source](https://github.com/holomodular/ServiceBricks-Cache/blob/main/src/V1/ServiceBricks.Cache.Model/Service/LockedWorkService.cs)
79+
80+
## Application Settings
81+
82+
```csharp
83+
{
84+
"ServiceBricks":{
85+
"Cache":{
86+
"Expiration": {
87+
"TimerEnabled": false,
88+
"TimerIntervalMilliseconds": 7000,
89+
"TimerDueMilliseconds": 1000
90+
},
91+
"Semaphore": {
92+
"DelayMilliseconds": 3000,
93+
"CancellationMilliseconds": 20000,
94+
"OrphanTimeoutMilliseconds": 10000
95+
}
96+
}
97+
}
98+
}
99+
```
100+
101+
# About ServiceBricks
102+
103+
ServiceBricks is the cornerstone for building a microservices foundation.
104+
Visit http://ServiceBricks.com to learn more.
63105

64-
ServiceBricks is owned and maintained by HoloModular LLC and authored by Danny Logsdon (Founder). Visit our websites at https://HoloModular.com, https://ServiceBricks.com or https://www.linkedin.com/in/danlogsdon to learn more.

src/V1/ServiceBricks.Cache.AzureDataTables/ServiceBricks.Cache.AzureDataTables.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>1.4.0-e</Version>
4+
<Version>1.4.0</Version>
55
<Description>The open source microservices platform. Visit https://ServiceBricks.com to learn more.</Description>
66
<PackageId>ServiceBricks.Cache.AzureDataTables</PackageId>
77
<Title>ServiceBricks.Cache.AzureDataTables</Title>
@@ -36,6 +36,6 @@
3636
<ProjectReference Include="..\ServiceBricks.Cache\ServiceBricks.Cache.csproj" />
3737
</ItemGroup>
3838
<ItemGroup>
39-
<PackageReference Include="ServiceBricks.Core" Version="1.4.0-e" />
39+
<PackageReference Include="ServiceBricks.Core" Version="1.4.0" />
4040
</ItemGroup>
4141
</Project>

0 commit comments

Comments
 (0)