Ir al contenido

Buscar en el Ecosistema EricksonLopez.*

Escribe el nombre de una librería, ID de paquete NuGet, tipo .NET o concepto arquitectónico para buscar en el portal.

EricksonLopez.Idempotency — Visión General

EricksonLopez.Idempotency (2.0.0 en NuGet, L2) garantiza ejecución lógica exactamente una vez frente a reintentos, timeouts y peticiones concurrentes duplicadas mediante leases distribuidos y huella SHA-256 del payload.

  • Lease atómico y verificación de huella: IdempotencyEngine.ExecutePipelineAsync asegura un único ejecutor activo por (TenantId, Scope, IdempotencyKey) y rechaza cambios de payload (FingerprintMismatch).
  • Sanitización de cabeceras (v2.0.0): IdempotencyOptions.ResponseHeadersBlocklist elimina cabeceras sensibles (Set-Cookie, Authorization, etc.) antes de persistir respuestas reproducibles (SEC-001).
  • Límites estrictos de clave y alcance: IdempotencyKey (1..128 caracteres) e IdempotencyScope (1..64 caracteres) son readonly record struct; claves malformadas devuelven HTTP 400 (RFC 9110) en vez de 500.
  • Adopción transversal: Utilizada directamente por EricksonLopez.Outbox y EricksonLopez.Messaging.
flowchart LR
Req["Request + IdempotencyKey + Fingerprint"] --> Eng["IdempotencyEngine"]
Eng -- New Key --> Lease["Acquire Lease -> Execute Delegate"]
Lease --> Save["Persist ExecutionResponse"]
Eng -- Completed + Same Fingerprint --> Replay["Replay Stored ExecutionResponse"]
Eng -- Completed + Different Fingerprint --> Mis["FingerprintMismatch"]
Eng -- Active Lease --> Conf["InFlightConflict"]
Máquina de Estados de Lease y Replay de IdempotenciaLa solicitud ingresa a IdempotencyEngine con su clave y huella SHA-256, ejecutando una vez bajo lease activo, reproduciendo la ExecutionResponse guardada o fallando por InFlightConflict o FingerprintMismatch.
Ver descripción textual y tabla accesible

La solicitud ingresa a IdempotencyEngine con su clave y huella SHA-256, ejecutando una vez bajo lease activo, reproduciendo la ExecutionResponse guardada o fallando por InFlightConflict o FingerprintMismatch.

flowchart LR
Req["Request + IdempotencyKey + Fingerprint"] --> Eng["IdempotencyEngine"]
Eng -- New Key --> Lease["Acquire Lease -> Execute Delegate"]
Lease --> Save["Persist ExecutionResponse"]
Eng -- Completed + Same Fingerprint --> Replay["Replay Stored ExecutionResponse"]
Eng -- Completed + Different Fingerprint --> Mis["FingerprintMismatch"]
Eng -- Active Lease --> Conf["InFlightConflict"]

Los 13 paquetes están publicados en 2.0.0 en NuGet (6,193 descargas totales; localVersion: 3.1.0 en disco), orientados a net8.0;net9.0;net10.0 y con IsAotCompatible=true / EnableTrimAnalyzer=true (Full AOT):

  • Core y Abstracciones: Idempotency (622), Idempotency.Abstractions (2,548).
  • Web, Mediator, Result y Testing: AspNetCore (267), Mediator (275), Result (266), Testing (285).
  • Stores: MySql (317), MariaDb (281), PostgreSql (277), Redis (273), Oracle (270 — nota en ejecución: Oracle.ManagedDataAccess.Core usa reflexión en tiempo de ejecución), Sqlite (258), SqlServer (254).

Estado de Benchmarks: hasBenchmarks: false — no se publican reportes de BenchmarkDotNet para dotnet-idempotency.