Ir al contenido principal

Entradas

Mastering the Transactional Outbox Pattern

Architectural Patterns Mastering the Transactional Outbox Pattern Distributed Systems Data Consistency Resilience Solving the "Dual Write" problem to ensure 100% message delivery. "In a distributed system, you cannot assume the network is reliable. The Outbox Pattern is your insurance policy against partial failures and inconsistent states." 1 The Problem: The Myth of Total Reliability When building .NET APIs, we often update a database and immediately publish an event to a Message Broker (like RabbitMQ or Azure Service Bus). This is known as the Dual Write Problem . What happens without Outbox? 1. Your DB update succeeds. ✅ 2. The Message Broker is down or the network blips. ❌ 3. Your event is lost forever . Your system is now in an inconsistent state (The "Ghost Change"). ...
Entradas recientes

Zero Ops on Mac Mini M4: Native CI/CD for C# APIs

Advanced DevOps Guide Zero Ops on Mac Mini M4: Native CI/CD for C# APIs Launchd Agents Automated Deploy Git-Driven Transforming your Mac Mini into a self-healing, auto-deploying production server. "The goal is simple: Git Push and forget. No manual terminals, no complex Docker layers—just pure macOS native resilience." 1 The Core: Deployment Script We create a dedicated deploy.sh script. This "heart" of the system handles compiling the ARM64 binary and restarting the service. Script Location: ~/code/csharp/be-real-doctor-api/deploy.sh #!/bin/bash # 1. Explicitly define PATH so Launchd can find git and dotnet export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet" PROJECT_DIR="/Users/ismael/code/csharp/repo-name" PUBLISH_DIR="$PROJECT_DIR/src/publish" ...

Deploying C# 8.0 on Mac Mini M4: High-Performance Setup

Full-Stack Deployment Guide Deploying C# 8.0 on Mac Mini M4: High-Performance Setup Apple Silicon M4 .NET 8.0 Ollama AI Optimizing 16GB RAM and M4 architecture for high-performance API delivery. "The Mac Mini M4 is not just a desktop; it's a powerhouse for C# developers , allowing local LLMs and APIs to run with zero thermal throttling." 1 Environment Variables Configuration To ensure your API connects to Ollama and other local services persistently, you must configure the system environment by editing your .zshrc file. Step-by-step Setup: 1. Open the editor: nano ~/.zshrc 2. Paste these lines at the end of the file: export OLLAMA_HOST="http://localhost:11434" export ASPNETCORE_ENVIRONMENT="Development" 3. Save ( Ctrl+O , Enter ) and Exit ( Ctrl...

Intellectual Property and Git: Avoiding AI Co-authored-by

Software Engineering Guide Intellectual Property and Git: Avoiding AI Co-authored-by Due Diligence AI Agents Git Hooks Maintaining a 100% human history is key to the legal health of your source code. "A golden rule in modern development: the commit message should reflect 'why' the change was made for the business, never 'how' or which tools were used to write it. " 1 Legal Context: Why the Concern? More and more startups and independent developers are facing an invisible problem: patent and copyright offices in the US and EU have determined that AI cannot hold copyrights . Only human creation is protectable. The Danger in Audits (Due Diligence): When a startup seeks investment or is about to be acquired, it undergoes a strict code audit. If the Git history shows bots as co-authors, investors can argue the ...

Anthropic Techniques to Optimize AI

Prompt Engineering Guide Anthropic Techniques to Optimize AI Strategic Prompting Logic Frameworks Power vs. Limits: Running LLMs on the new RTX 5070 Mobile architecture. "To get the most out of advanced models, you must structure your inputs strategically. These techniques help eliminate hallucinations and improve logic. " 1 Memory Injection Providing specific data points or "memories" at the start of the prompt to ground the AI in facts it wouldn't otherwise know. Example: "Note: Our system uses 'Version 4.2' rules. Ignore all mentions of 'Version 3.0' from your training data. Now, analyze this code..." 2 Reverse Prompting Asking the AI to generate the prompt that would lead to a specific output. This helps in understanding and replicating complex styles. Exam...

Integrating Claude Code with LM Studio

Documentation & Setup Integrating Claude Code with LM Studio Official Integration Guide Local API Setup Power vs. Limits: Running LLMs on the new RTX 5070 Mobile architecture. "Claude Code can talk to LM Studio via the Anthropic-compatible POST /v1/messages endpoint. However, usually you are going to have problems with the model if you don't set the right context . If the window is too small, the CLI overhead will cause the agent to fail." 1 How to fix context in LM Studio Navigate to Server: Open the "AI Chat" or "Local Server" tab (the double arrows or server icon on the left). Select Your Model: Choose your active model (e.g., openai/gpt-oss-20b ) from the dropdown. Adjust Context Length: On the right-hand sidebar, find Context Length (or n_ctx ). It is likely set to 2048 or 4096. ...

The 8GB VRAM Challenge: Optimizing Local AI

Hardware & Performance The 8GB VRAM Challenge: Optimizing Local AI Technical Review Real Hardware Benchmarks Power vs. Limits: Running LLMs on the new RTX 5070 Mobile architecture. "Building a local AI powerhouse in a laptop is a game of balance. With an Intel Core Ultra 9 and 64GB of RAM , the processing floor is high, but the 8GB VRAM on the RTX 5070 is the ultimate gatekeeper. Here is the stable, no-filler configuration for coding, reasoning, and technical chat." The Hardware Specs GPU RTX 5070 8GB VRAM (Bottleneck) RAM 64GB DDR5 System Overflow Ready CPU Ultra 9 285H Top-Tier Processing 1 Model Selection Strategy Size vs. Quantization (The Sweet Spot) ✅ 3B – 7B Models: Gold standard. Q5_K_M (app...