r/moderndotnet • • 7d ago

how do you transition from writing "code that just works" to "highly performant, production-grade code"?

0 Upvotes

Hi everyone,

I’m a full stack developer (mostly working with ASP.NET Core / C#), and I’m currently focusing on leveling up my engineering skills.

Right now, I can confidently write code that solves the business problem and passes the tests. However, I want to shift my mindset from just writing "code that works" to writing "optimal, highly performant code" that scales well, similar to the standards at big tech companies.

I have two main questions for the experienced engineers here:

  1. Performance & Code Quality:

When you are reviewing code or writing a new feature, what is your mental framework for optimization? What are the biggest "red flags" you look for in a PR regarding performance (e.g., memory leaks, inefficient time complexity)? How do you train your intuition to write optimal code from the start?

2. Architecture Trade-offs:

When starting a new project with complex business rules, how do you decide on the architecture? How do you know when a Modular Monolith (like Onion/Clean Architecture + DDD) is enough, and when Microservices are an absolute must? How do you avoid over-engineering in the early stages?

Any recommended mental models, profiling tools, or resources would be highly appreciated.

Thank you in advance!


r/moderndotnet • • 16d ago

What does 1–2 years of professional experience actually teach you that building complex personal projects can't?

0 Upvotes

I'm a .NET backend developer with no full-time commercial experience, and I've been thinking about this question a lot lately.

I've built several backend projects using ASP.NET Core, SQL databases, Redis, RabbitMQ, Docker, and other technologies.

Even though most of my projects haven't been used in real production environments, I try to think beyond simply making things work.

For example, when designing a feature, I try to consider:

  • What happens when multiple instances of the application are running?

  • What happens when multiple requests try to modify the same data simultaneously?

  • How do I handle race conditions, idempotency, and data integrity?

  • Where do I need transactions, and what happens if something fails halfway through?

  • What are the trade-offs between different approaches, and is the added complexity actually justified?

I also use AI extensively during development. However, I try not to blindly accept generated code. I ask questions, challenge its suggestions, propose my own solutions, and try to understand why one approach might be better than another.

One thing that makes this particularly frustrating is the job market.

When I look at .NET backend job postings, I often find that I meet virtually all of the technical requirements. I'm familiar with the technologies they list, and I've gained substantial hands-on experience using them in my own projects.

The one requirement I usually don't meet is the 2+ years of commercial experience. And that alone seems to be enough to prevent me from even getting an interview.

I understand that knowing a technology and having used it in a professional production environment aren't necessarily the same thing. But it's frustrating when I feel capable of discussing and demonstrating the required technical skills, yet don't get the opportunity to prove it.

Here's what I'm struggling to understand:

What exactly makes someone with 1-2 years of commercial experience a better developer than someone who has spent a similar amount of time seriously studying and building complex projects independently?

I understand that professional experience involves teamwork, code reviews, deadlines, maintaining legacy systems, and dealing with real users. But how much of that translates into technical ability?

Someone could spend two years at a company doing relatively simple tasks without developing much, while someone else could spend those two years independently studying architecture, concurrency, distributed systems, and building projects.

I'm not claiming that I'm a mid-level developer. I genuinely don't know where I stand.

Sometimes I feel like my theoretical knowledge might be approaching mid-level, but without professional experience, it's difficult to know whether that understanding would hold up in a real engineering environment.

So I'd really appreciate hearing from experienced developers:

  1. What did working in a real company teach you that you couldn't have learned through personal projects?

  2. What weaknesses do you commonly notice in developers who have strong personal projects but little or no commercial experience?

  3. Is requiring 1–2 years of commercial experience still a meaningful hiring criterion, or should demonstrated technical ability matter more?

  4. How can someone in my position objectively evaluate their actual engineering level without having worked professionally?

I'm especially interested in concrete examples rather than general statements like "production is different."

I'd genuinely appreciate honest perspectives, even if they challenge my assumptions.


r/moderndotnet • • Oct 02 '26

Drawing & Text Shaping -- all open source, cross platform, and AOT compatible

2 Upvotes

Have you ever needed to draw into a canvas and export that into PNG, JPG, WebP, or AVIF?

How about paint some properly shaped text into that image?

There's several options on the market today, but they are all either commercial paid offerings or are wrappers around native libraries and thus have deployment complications and don't run everywhere .NET does

Well, as some of you know, I'm the maintainer of PeachPDF (https://peachpdf.net/), an open source HTML to PDF rendering engine. Today, I'm not talking about that, though 0.9.21 did land today. Well, any HTML layout engine needs to draw shapes and layout text, most of the work is determining what to paint and where, and then actually painting it into a canvas, and for text, it also needs to know exactly what glyph to put where, and for rasterized text (rare for a PDF admittedly), whether or not to hint the text.

Well, PeachPDF gained some new .NET dependencies this week, though it's mostly just PeachPDF code being liberated from only ever serving PeachPDF! Those dependencies are the PeachDrawing suite of libraries:

  • PeachDrawing.Text: This is your font, text shaping, and hinting engine. This loads OpenType, TrueType, CFF, WOFF, and WOFF2 fonts, shapes some text using those fonts, and tells you which glyph to place and where. You can extract text outlines, you can subset a font, and it has some convenience helpers for things like laying out a whole paragraph.

  • PeachDrawing.Core: Core Canvas abstractions, including integration with PeachDrawing.Text. This is what you would use if you wanted to build your own canvas abstraction, and it's what PeachPDF uses to build a PDF-backed canvas

  • PeachDrawing: A raster canvas implementation with PeachImage integration, so you can export to any PeachImage supported format.

These libraries are maintained and versioned alongside PeachPDF, but are designed to be used outside of PeachPDF. If there are API gaps, or you want to contribute, contributions or suggestions or bugfixes are welcome. The current API surface is what an HTML layout engine needs, which admittedly is a lot, but is far from complete or the best.

If you are currently using SkiaSharp and wished you had something pure managed and AOT-compatible, this is likely a good replacement. Alternatively, if using ImageSharp or SixLabors.Fonts, and you don't qualify for using it under the broadly available Apache 2.0 license grants available, and you are unable or unwilling to license it commercially, this should cover at least some of your needs. If there's a gap, I'd love to hear about it! Most of the API surface exists to be able to render various CSS and SVG constructs, so there are likely gaps in available features.

All of these libraries are currently pre-1.0, but the goal is to release 1.0 in early 2027.

They are all BSD 3-clause licensed. They are free and open source forever. They do include MIT and BSD-licensed third party code that was bundled into PeachPDF before.

You can find them on GitHub in the PeachPDF repo (https://github.com/jhaygood86/PeachPDF), they are live on NuGet, and there's documentation online on the PeachPDF website.


r/moderndotnet • • 4d ago

Building Acta, an embedded durable execution library for .NET

6 Upvotes

My post was just removed from r/dotnet, bitter feeling. Maybe this modern group is the right home.

What have I been working on since March? A minimalistic execution framework called Acta. Check it out.

I design and plan with Fable, code with Opus and review with Codex. I own all of it. Especially the data model.

Self-funded. The library is Apache-2.0 and free forever.

Examples, documentation, and source code: https://useacta.net/

I'm building Acta in the open. If you think something is wrong, pick it apart. It will help me make it better!

Happy jobbing!

Repo: https://github.com/acta-dotnet/acta


r/moderndotnet • • Oct 17 '26

Modern .net is GOD !!!

5 Upvotes

I have worked on various personal and enterprise project in .NET and azure. Recently I was learning LLD from Milan jovanovic , I got to know about a whole different side of .Net.

The things I always complained about in my mind it's all solved and that's what we call modern the CQRS.

Instead of sliding 20 services DI in a service file or controller just use the mediatR properly give it the command and query properly defined and BOOMM ....

Instead of injecting multiple service add scoped stuff in program file just use the assembly reference with scrutiny library scan function and your garbage program file is modern.

Bro where i was living till now 🫡🫡

Sorry for the delay i guess I will drop on a really good project soon I have a great idea too with these modern topics.

Really appreciate the senior modern .net developers to help me get out of the pool!!!!


r/moderndotnet • • 2d ago

I built AiDotNet to show the world that it is possible for .NET to do AI better than Pytorch

18 Upvotes

I wanted to showcase the project I have been working on for the past 4 years and the progress I have made so far. The work is mostly completed but I have some remaining performance issues that I want to focus on some model families such as audio AI models. I was hoping to get some feedback and overall show everyone how easy it is to use this library to create AI models with basically no experience necessary. You could literally pass in input and output such as data you have such as stock prices and output such as the actual prices that you would like to predict and you receive a fully trained AI model you could easily host with AiDotNet.Serving or save locally and run it on demand.

I would love to get your thoughts on my passion project and a reminder that it is 100% C# and open source so feel free to contribute if you would like. We have our website at www.aidotnet.dev with easy examples and guides.

Here is an easy example of how to use the library and the configuration options you get:

using AiDotNet;
using AiDotNet.Data.Loaders;
using AiDotNet.Models.Results;
using AiDotNet.Regression;
using AiDotNet.Tensors.LinearAlgebra;

// Five days of closing prices for a fictional stock.
double[] days = [ 1, 2, 3, 4, 5];
double[] prices = [100, 102, 104, 106, 108];

// Give the builder the examples and let it learn the trend.
var model =
await new AiModelBuilder<double, Matrix<double>, Vector<double>>()
.ConfigureModel(new SimpleRegression<double>())
.ConfigureDataLoader(DataLoaders.FromArrays(days, prices))
.BuildAsync();

// Ask the trained model what price it expects on day 6.
var daySix = new Matrix<double>(new double[,] { { 6 } });
double predictedPrice = model.Predict(daySix)[0];

Console.WriteLine($"Predicted closing price for day 6: ${predictedPrice:F2}");

Tested with AiDotNet 0.234.0 on .NET 10. It prints:

Predicted closing price for day 6: $110.00

This is a super easy example but with ConfigureModel here are over 2,100 model types in the library. To get a feel for the range, the repo includes examples for finding objects in a photo, adapting an existing language model to your own material, and packaging a trained model for another app to use. Browse the examples

What you’re seeing in the 17-second video. We trained the same LSTM model in AiDotNet and PyTorch. Each got a separate turn on the same laptop graphics card, starting from the same model settings and seeing the same examples in the same order. Both had eight practice updates before the clock started. The two recordings play side by side at actual speed.

After 4,096 training updatesAiDotNetPyTorch
Time on a GeForce GTX 1660 Ti2.60 seconds15.00 seconds
Correct answers on 320 new signals302301

r/moderndotnet • • Aug 27 '26

discuss How many of you have stopped using IDEs regularly?

Thumbnail x.com
8 Upvotes

I was looking at this tweet from Luke Parker (Windows dev for OpenCode) about uninstalling Rider after having not used it for a couple of years and it made me sad.

Then I realized that I've done very little IDE work on a day to day basis myself - almost all of the programming I do these days is through Slack or via the CLI.

Is this where things are going for all developers over the next few years?


r/moderndotnet • • 9d ago

ScriptLangCore

0 Upvotes

I built a scripting engine that ships as a single file, with no runtime to install.

ScriptLangCore runs `.slc` scripts: a C#-flavoured language with classes, interfaces, generics, structs, tuples, pattern matching, lambdas, coroutines, `async`/`await`, exceptions and a Windows UI toolkit.

Deployment is the part I care most about. The engine is compiled ahead of time with NativeAOT, so the .NET runtime lives inside the executable (18.8 MB). A machine needs Windows x64 and nothing else: no .NET installation, no Visual C++ redistributable, no Universal CRT.

It is more than a command line:

• `ScriptLangCore.exe`: run a script, compile it to a bundle, dump bytecode, or open a REPL • `ScriptLangCore.dll`: an embeddable engine with a C ABI of 22 `slc_*` verbs, so C, C#, Python, PowerShell and bash hosts can create a session, run scripts, call into them and read the verdict as JSON • The same DLL inside SQLite: six functions, so SQL can evaluate a script over a row, fold a set or map a list • A 15 KB launcher: package a script into its own Windows executable • A VBA module: 64-bit Excel calls the DLL directly

Under the hood there are two engines. Bodies the compiler can model run on a bytecode VM; every shape it cannot runs on a tree walker. Both must answer the same way, which is what the 539-script test corpus checks, together with sweeps that compile every script, compare each compiled bundle with its source, and re-run scripts on both engines.

Docs, samples and the installer: https://github.com/LyttleG/ScriptLangCore

MIT licensed.

\#Scripting #CSharp #DotNet #NativeAOT #Windows #ProgrammingLanguages #OpenSource


r/moderndotnet • • 8d ago

Self-Hosted platform for agentic apps in C#

2 Upvotes

A few weeks ago we had a post about GenHTTP Lambda, a platform that allows a coding agent to write and deploy C# apps via MCP. The platform brings common features and governance for every app, such as databases, versioning, analytics or logging. Currently we have around 100 apps deployed, serving several hundred thousands of requests a day.

Our main goal is still to test the stability of the underlying web server, especially the ioxide engine.

Therefore we decided to provide a community version of the platform as a docker image, with the same feature set but a different landing page. If you want to try it, you can run the following docker command:

docker run -d -p 8080:8080 -v lambda-data:/data -e LAMBDA_ADMIN_TOKEN=secure-password genhttp/lambda

You can access the platform via http://localhost:8080 and connect your agent to the MCP server, for Claude this would be:

claude mcp add --transport http genhttp http://localhost:8080/mcp

Afterwards you can run a prompt such as

Create a multiplayer game and deploy it to my local GenHTTP Lambda instance.

Your agent will use the MCP server to create a lambda and host it on the platform running on your device. It will hand you an editor key that allows you (and your agent) to further change the lambda and to view statistics.

You can deploy and run the docker image wherever you want, for example on a home lab server or on a VPS. Code is MIT licensed and will stay open source.

Happy for any feedback on this :)


r/moderndotnet • • 10h ago

[Show & Tell] eQuantic.UI: Write UI components once in C# and compile to vanilla JS (no WASM) on the web or native GPU pixels via Metal/Vulkan (no WebView/Skia)

2 Upvotes

Hey r/csharp,

I have been working on an open-source UI SDK called eQuantic.UI, and I wanted to share the architecture and get some feedback from the community.

The goal is simple: write UI components once in C# using a strongly-typed declarative vocabulary (Box, Row, Column, Text, etc.) and let the SDK compile each target to its real native path, without relying on JavaScript, CSS, Dart, Swift, or platform manifest files.

How it works under the hood:

  • Web (No WASM): At build time, the compiler uses Roslyn to transpile your C# components into optimized vanilla JavaScript and atomic CSS. It supports server-side rendering (SSR) with client hydration and built-in RPC calls via [ServerAction], avoiding the heavy .NET WASM runtime download.

  • Desktop & Mobile (No WebView, No Skia): On macOS, iOS, Android, and Windows, the same component tree renders directly on the GPU through Photon (a custom rendering engine built on Metal and Vulkan).

  • Transactional Email: The subset of components an email client supports compiles into email-safe HTML tables with inline styles, along with a plain-text version from the exact same tree.

  • Zero Node.js friction: You only need the .NET 10 SDK installed. The TypeScript/bundling toolchain ships embedded inside the NuGet SDK package, so there is no npm install, no webpack/vite config, and no manual Info.plist or AndroidManifest.xml setup.

Quick Start:

Bash

dotnet new install eQuantic.UI.Templates
dotnet new equantic-app -n MyApp
cd MyApp && dotnet run

(You can also use dotnet new equantic-native to spin up a native GPU window.)

The project is licensed under MIT and is currently in active preview (0.2.0-preview.* on NuGet). I would love to hear your thoughts on the approach, API design, or any edge cases you see with AST-to-JS transpilation and custom GPU rendering.

GitHub repository (with architecture docs and samples):https://github.com/eQuantic/equantic-ui


r/moderndotnet • • Aug 29 '26

Announcing Brighter Fences, a community Polly fork

17 Upvotes

Fences

Fences is a .NET resilience and transient-fault-handling library that lets developers express resilience strategies such as Retry, Circuit Breaker, Hedging, Timeout, Rate Limiter, and Fallback in a fluent, thread-safe way.

Fences is a community fork of Polly, maintained by Brighter Command. It is not affiliated with, endorsed by, or supported by App vNext or the Polly maintainers. The fork was taken from Polly 8.7.0 to avoid the Open Source Maintainers Fee that will be charged for Polly; see ADR 0002 for the reasoning and NOTICE.md for provenance and attribution.

Github Source
NuGet Source

Why Fences exists

Polly's source is BSD 3-Clause licensed and remains open source. That license lets anyone redistribute it, in source or binary form, provided the copyright notice and disclaimer are retained - which NOTICE.md and LICENSE do. Building and publishing our own binaries from that source is squarely within the grant.

The Open Source Maintainers Fee (OSMF) is App vNext's policy for the binaries they publish: a commercial consumer of those binaries may owe a fee above a revenue threshold. It governs their distribution. It does not change the source license, and it does not reach binaries built by anyone else.

That freedom is the OSMF's own argument. The case for charging for binaries is that it remains OSS precisely because the source is still under an open license and anyone is free to build and publish their own binaries. That is what separates the model from proprietary licensing.

But this door opens both ways: the principle that makes the fee compatible with open source is the same principle that makes Fences legitimate. We are not going around the OSMF - we are walking through the door it tells us that it actively wants to support.

Fences is a binary distribution of Polly's API. We compile from the BSD 3-Clause source, publish under our own branding, but we do not apply the OSMF. Fences binaries are free for everyone - no revenue threshold, no fee. If you use Polly and would rather not pay the fee, Fences is a drop-in alternative: change your package references and your namespaces, as described in the repo's README.md.

We track the Polly API today and expect to keep doing so, and we may adopt upstream changes. But Fences is under Brighter Command's stewardship now and will evolve to suit its users, so a future major version may diverge from Polly and stop being API-compatible. We will say so plainly when it does; it will not arrive in a patch.

This is not a criticism of App vNext contributors, who have maintained Polly for years. Publishing our own binaries is exactly what the license they chose invites us to do, and we have responded to that by doing so. See ADR 0002 for the full reasoning.

This README describes the v8 API. The pre-v8 API is still shipped in the Paramore.Fences package; see the v7 documentation.


r/moderndotnet • • Sep 09 '26

Papyra 1.0 — a fluent .NET library that renders one document model to PDF, DOCX, XLSX and HTML

Post image
14 Upvotes

Hey r/moderndotnet,

I just shipped **v1.0** of **Papyra**, a .NET document library. API style is QuestPDF-inspired, but instead of targeting only PDF, one fluent document model renders to PDF, DOCX, XLSX, *and* HTML:

```csharp
var document = Document.Create(doc => doc
.Table(table => table
.Columns(3)
.Row(row => row.Cell("Name").Cell("Age").Cell("City"))
.Row(row => row.Cell("Alice").Cell("30").Cell("Vienna"))
)
);

byte[] pdf = document.RenderAsPdf();
byte[] docx = document.RenderAsDocx();
byte[] xlsx = document.RenderAsXlsx();
byte[] html = document.RenderAsHtml();
```

Here's an invoice built with it (from the [samples repo](https://github.com/PapyraSoftware/Papyra.Samples)) — same builder call, rendered straight to PDF:

Some of what's under the hood:

- Own PDF writer, not a wrapper around a native engine — full Unicode font subsetting, CJK line breaking + hyphenation, PDF/A-2b/3b/4 (veraPDF-verified), AES-256 encryption, and ZUGFeRD/Factur-X e-invoicing attachments
- DOCX/XLSX via `DocumentFormat.OpenXml`; HTML has zero dependencies
- Optional `Papyra.Svg` package for true-vector SVG across all four formats
- A companion live-preview app (Avalonia) that shows rendered pages + the document tree side-by-side while you build, with click-to-source navigation into Rider/VS Code

Licensing: free for individuals, for companies under $1M annual revenue, and unconditionally for OSS use; paid tiers above that.

Docs, feature matrix, and pricing: https://papyra.rocks
Samples: https://github.com/PapyraSoftware/Papyra.Samples
NuGet: `dotnet add package Papyra`

Would love feedback — what's missing, what looks off, or what would make this worth reaching for over QuestPDF/OpenXML/wkhtmltopdf directly for a multi-format need.


r/moderndotnet • • Sep 19 '26

Building a modern application platform inspired by .NET: neoCLR

10 Upvotes

I want to reveal a "small" project I've been working on called neoCLR, where I'm re-imagining the .NET platform.

Website: https://marinasundstrom.github.io/neoCLR/

Here's a small example, written in Raven:

import System.*
import System.Option.*

func FirstPositive(values: Iterable<int>) -> Option<int> {
    let value = values.First(number => number > 0)?
    return Some(value)
}

The project is being developed with the help of AI (Codex), and the runtime itself is written in Rust. (I just went with it.)

The runtime library is written in Raven, a programming language I originally built for .NET. Building neoCLR with Raven has turned out to be a pretty good stress test: during the nearly two weeks I've been working on this, it has already helped me find numerous bugs in the Raven compiler itself.

The goal is to make the platform feel familiar without simply recreating .NET.

With the benefit of hindsight, I want to explore what we could change if we were designing this kind of application platform today: improving the runtime, making some different choices, and creating a more consistent developer experience.

I also experimented with a more explicit value/reference model, where types were values by default and you explicitly chose whether to store and pass something by value or by reference. It was an interesting model and made the underlying semantics very clear, but I eventually realized that it came at the cost of one of .NET's strengths: its ergonomics. If neoCLR is supposed to explore what a better .NET-like platform could look like, making everyday programming more cumbersome isn't necessarily an improvement. So I returned to the familiar distinction between reference types and value types. Sometimes hindsight tells you that the old design was actually pretty good.

It started out with just the assembly language — neoIL, based on MSIL — until I began implementing a small language based on Raven's syntax to test higher-level programming patterns. At some point I realized it was a bit foolish to build yet another language for the platform, with yet another compiler written in Rust, when I already had Raven. So I switched to targeting neoCLR from Raven instead. The IL is virtually the same, and I get the existing IDE support for free.

Here are some samples in Raven targeting neoCLR: https://github.com/marinasundstrom/neoCLR/tree/main/docs/experiments/raven-target/samples

Features

This is what I've got so far:

  • A .NET-like metadata format

  • Bytecode with a CLI-like instruction set

  • An interpreter — for now

  • A basic garbage collector, with plenty of room for improvement

  • A familiar type system, including .NET-like reference type vs. value type semantics

  • Option and Result unions for recoverable outcomes, plus Fault for non-recoverable failures

  • Rust-inspired methods on Option and Result

  • Void as a real type, so it can be used with generics: Func<int, Void>

  • No I naming convention for interfaces — interfaces aren't treated as a special naming category

  • No utility classes — functions can live directly in namespaces (thanks to Raven)

  • UTF-8 strings, currently with a Swift-inspired API

  • Arrays are invariant, and there is a generic Array<T> type

  • A new collections model with Iterable<T>, ArrayList<T>, and interfaces such as List<T> and Sequence<T> for restricted views

  • LINQ-like operations using names such as Filter and Map

  • Early Threading and Task APIs

  • Initial Time and File System APIs

  • Introspection, where System.Introspection.TypeInfo is the canonical type model, accessed through System.Runtime.RuntimeContext

  • IDE support through the Raven VS Code extension, which currently runs on .NET

Some things I want to explore next:

  • Networking APIs — sockets, HttpServer, HttpClient, etc.

  • Building a web framework on top of the platform — which means getting Networking, Tasks, Threading, and something like System.Text.Json into place

  • Whether function objects make sense in the runtime/type system

  • Better garbage collection and eventually a JIT

  • Different target architectures and devices

  • A modular framework/runtime library

There are also some longer-term ideas around the runtime model:

  • System.Runtime.Reflection as an optional runtime capability attached to the Introspection model

  • System.Runtime.Emit working directly with that same introspection model rather than introducing another parallel object model

  • An ambition to eventually make this a genuine Common Language Runtime, with an interoperability story somewhat inspired by Windows Runtime

Where this is going

I'm not trying to make ".NET, but renamed." A lot of the interesting part for me is figuring out which ideas from .NET have held up extremely well, which ones haven't, and what could be designed differently if you had 25+ years of hindsight.

It's still extremely early, but there's enough working now that I thought it was time to show it.

I'd love feedback — on the runtime and API ideas, things worth exploring, things you think I'm getting completely wrong, or even suggestions for a better name than neoCLR.

I want this to grow into a community project.


r/moderndotnet • • Aug 30 '26

MyServiceBus: Building a messaging library for C# and Java

3 Upvotes

“MyServiceBus” is still a working title. Suggestions for a better name are welcome.

TL;DR: I have built a cross-platform asynchronous messaging library for C# and Java.

Website: https://marinasundstrom.github.io/MyServiceBus/

GitHub: https://github.com/marinasundstrom/MyServiceBus

Background

Back in 2023, I was working as a .NET developer at a company heavily invested in Java. Most of its backend services were built with Java 17.

I was asked to help build a way of handling privacy-related data. One idea was to create a service that could scan systems for data that needed to be deleted and then publish that work to the appropriate services.

I already had experience with asynchronous messaging-particularly RabbitMQ and MassTransit-but I could not find a Java library offering quite the same combination of abstractions and developer experience without being tied to a larger application stack.

So I wrote my own.

The original implementation was loosely inspired by MassTransit. This was before I started using AI in my development work, and I learned a great deal from investigating how to implement things such as consumer discovery, reflection, message dispatch, and dependency injection in Java.

Fast-forward two years. After both MediatR and MassTransit announced changes toward commercial licensing, I decided to restart the project.

This time, I began developing the C# and Java clients side by side.

Initially, I tried to understand the architecture by reading source code and using AI to help me navigate the structure. That proved difficult. MassTransit represents many years of engineering, and reproducing its internal architecture was neither realistic nor necessarily desirable.

Instead, I began working from the concepts and behaviors I actually wanted: publishing, sending, consuming, requesting, retrying, scheduling, and operating the same messaging model across two languages.

RabbitMQ was naturally the first transport. Because I was also focusing on other projects during this period, the implementation did not become meaningfully compatible with MassTransit until more recently.

Like many of my projects, however, this one kept growing.

During the past week, I have made significant progress toward stabilizing the model across C# and Java, documenting the interoperability boundary with MassTransit, publishing the packages, adding cloud transports, and creating a proper website.

The result is still pre-1.0, but it has now become something that other people can realistically evaluate and experiment with.

What it supports today

MyServiceBus currently provides:

  • A MassTransit-inspired programming model for publishing, sending, consuming, and requesting messages

  • Conceptual and behavioral parity between the C# and Java clients

  • RabbitMQ as the verified broker baseline

  • Preview transports for Azure Service Bus and Amazon SQS/SNS

  • Retries and message scheduling

  • A transactional outbox

  • An in-process mediator

  • An aligned testing harness

  • Experimental ahead-of-time compilation optimizations

  • Runtime monitoring and a dashboard

  • Scoped interoperability with MassTransit

The goal is to keep the common core focused while allowing each client to evolve in a way that feels natural in its own language.

C# and Java should share the same messaging concepts and wire-level behavior. They do not need to expose identical APIs when doing so would work against the strengths of either language.

Beyond MassTransit compatibility

MyServiceBus is inspired by MassTransit, but I do not want it to become a source-compatible reimplementation.

There is room to explore ideas that make sense specifically for modern C# and Java.

For example, the C# client already has experimental support for union types in C# 15 and .NET 11. A consumer can use a union as its message type, while each variant is represented as a distinct message in the messaging system.

Union semantics are also available in the request client, allowing the caller to match directly on the possible response types.

Saga support is still pending. I do not immediately want to reproduce MassTransit’s state-machine DSL. My current view is that a state machine should be an abstraction built on top of simpler saga and messaging primitives. I would rather establish those foundations first and learn how people use the library before committing to a particular DSL.

I have also started thinking about how MyServiceBus can connect with my other projects, including the Raven programming language.

Modern consumer models are moving beyond requiring every handler to implement a generic interface. MassTransit, for example, now supports conventional consumer methods with injected parameters, in a style similar to ASP.NET Core controller actions and Minimal APIs.

MyServiceBus has its own version of method-based consumers. In C#, these methods still belong to classes. In Raven, however, they work naturally with namespace-level functions:

async func Consume(
    message: OrderSubmitted,
    publishEndpoint: IPublishEndpoint,
    cancellationToken: CancellationToken
) {
    // Handle the message
}

This removes the need to create a class merely to satisfy the shape of a consumer interface. The method itself becomes the consumer.

For more on Raven: https://marinasundstrom.github.io/raven/

Building it with AI

This project has also become a practical example of what AI-assisted engineering actually looks like.

AI can automate a great deal. It can help generate implementations, shape tests, compare behavior across two languages, investigate unfamiliar codebases, and even set up temporary cloud environments for integration testing.

But building a coherent system still takes time and patience.

The difficult part is deciding what to focus on, in what order, and where compatibility genuinely matters. It also means recognizing when generated implementations only look correct and designing tests that expose the difference.

Working across C#, Java, RabbitMQ, Azure Service Bus, and Amazon SQS/SNS makes those differences very visible. The abstractions may be shared, but the transports do not all behave in the same way.

AI has allowed me to explore a much larger design space than I could have managed alone. It has not removed the engineering work of defining the model, evaluating trade-offs, testing assumptions, and deciding what the project should become.

Ultimately, I wanted to build something that I would use myself.

What MyServiceBus is - and is not

My intention is not to convince enterprises to migrate from MassTransit.

MassTransit is a mature commercial product backed by many years of engineering and professional support. MyServiceBus cannot offer that level of maturity or support, and I do not want to pretend otherwise.

Instead, I want to provide an alternative for developers and teams whose needs, technology mix, or budget are different.

It may be useful if you want to:

  • Connect Java services to an existing .NET messaging environment

  • Use a consistent messaging model across C# and Java

  • Replace an in-process mediator with something that can later grow into distributed messaging

  • Experiment with a smaller and more focused messaging runtime

  • Explore newer language features and alternative consumer models

The project is open source under the MIT license.

It is still early, and there is plenty left to build. But it has reached the point where I want other people to try it, examine the design, and tell me what works-and what does not.

And, of course, I still need a better name.


r/moderndotnet • • Sep 21 '26

JEV / System One wrapper for dotnet (SystemOneDotNet v1.0.1)

Thumbnail
reddit.com
3 Upvotes

r/moderndotnet • • Oct 03 '26

🚀 Un pequeño logro que me motiva a seguir creando para .NET

Post image
0 Upvotes

r/moderndotnet • • 9d ago

Made a small easy to use State Machine.

Thumbnail reddit.com
0 Upvotes

r/moderndotnet • • 7d ago

Looking for Contributors: An Alternative .NET Agent Framework

Thumbnail
reddit.com
0 Upvotes

r/moderndotnet • • Aug 15 '26

Result patters + CQRS! Just want to share wehat I did!

4 Upvotes

Hello!

As you may know( or not), I love result patterns. At some point, of course.

And I have my project https://github.com/managedcode/Communication

And yesterday I found an amazing (or you can tell me about it) idea: CQRS with IAsyncEnumerable!

You may know how annoying it is to implement CQRS properly, but but but!

What if we can call a method which will use SSE (server-sent event) protocol to send chunks, and it will be IAsyncEnumerable in your cleint.

so it's async, but you can wait for it! 

I add full impemention for server and cleint and Orleans(I love orleans)

What do you think?  Give me feedback, please!


r/moderndotnet • • Oct 21 '26

Passenger - a new IDE for C# and .NET

28 Upvotes

Passenger is a new IDE for C# and .NET, written in C# and Avalonia:

https://passenger-ide.net

https://github.com/Zaneris/passenger


r/moderndotnet • • 24d ago

One .NET dev, two desktop apps since summer, and the hard part isn't the code anymore

10 Upvotes

I've been a .NET developer for about 10 years, and for most of that time I wanted to build useful apps of my own. I never had the time.

You know how it goes. You open Visual Studio, start a desktop app, and a month later you're still aligning buttons. Nothing ships.

Agents changed that for me. Development used to be "I have an idea, let me try it, then polish it for half a year before anyone can see it." Now it's a couple of weeks from an idea to something polished enough to put out.

Since the middle of the summer I've started two open-source projects on .NET 10 and Avalonia 12.

The first one came from a small daily pain. On my machine pgAdmin takes 30 to 40 seconds to start. When I need to check something in a database right now, I don't want to sit and wait for it.

So I built pgNimbus, a PostgreSQL client. It's a NativeAOT binary of a few tens of megabytes, and it opens in a few hundred milliseconds. I compared NativeAOT and JIT builds side by side, and the AOT one visibly starts faster, so I stayed with it.

The second pain came from my day job. I'm a developer, but all the DevOps in my team is on me too, which means managing Kubernetes clusters. We use Lens. It has features I really like: you get to the logs fast, and you're in a pod's shell in seconds. But for us it's very expensive, and it's slow.

So I did the same thing again and built kubeNimbus for my own needs. It reached 1.0 this week.

Along the way I wanted both apps to look and behave the same, so I moved the shared design into a separate repo, nimbusUi, and pulled it into both as a git subtree. A bug I fix in one app ends up fixed in the other. The flip side: so do the bugs I introduce.

All of the code is written with Claude Code. I review it, and Claude also tests the apps automatically. That catches a lot, but I still go through every screenshot those runs produce and make my own fixes on top.

So here's what I keep thinking about. It feels like the line has blurred: one person can now ship a tool that holds its own next to products from companies with whole teams behind them. Does that match what you see, or am I fooling myself?

And the other side of it. Shipping a good product was never the same as people using it, and now that building is cheaper, that gap feels even bigger. I don't enjoy talking to people much, posts like this one are hard for me, and I'm barely on social media. But I know nobody will see what I build if I don't show it.

If you're a developer who ships your own stuff: how do you handle the promotion part? What actually worked for you?

Links, if you want to look: https://github.com/Shman4ik/pgNimbus and https://github.com/Shman4ik/kubeNimbus. Both are free and open source.


r/moderndotnet • • 15d ago

ConsoleMonster - For those living in Terminal

Post image
11 Upvotes

While doing some work on my application that requires proper console I had a need for good console experience. Normally I would use Spectre and fight thru some of the issues with workarounds.

With the "new world" - ConsoleMonster was born (well not really).

Historically (few years back) ConsoleMonster used to be only PowerShell module that was putting Spectre & Terminal.Gui libraries for PowerShell users to use with PowerShell 5.1/7, but I never did much with it except make sure I can use Spectre in PowerShell, just enough to play with it. With PwshSpectreConsole module showing up I never really cared to do anything to it, so it stayed silent.

Until today...

ConsoleMonster 2.X is a Codex & Claude baby. 2.X version is complete rewrite but I liked the name so 2.X is used even tho the old one was nothing like it.

The idea is to use it in one of the two ways (probably in more ways but I'll leave that up to you):

  • Everyday use where it can overwrite PowerShell defaults so things like Format-Table, Compare-Object, Show errors, show lists and other things just look much better and act much better, you can also just make nice, simple stuff, like showing logos. It also replaces all the Out-GridView and all other tools that were deprecated by Microsoft or that were PowerShell 7 only.

  • Monster where it tries to give you pieces to build a dream monster console app in easy and intuitive way

Here's the website for it: https://consolemonster.dev/ Here's the source code: https://github.com/EvotecIT/ConsoleMonster (MIT)

The website has all sort of demos shown and each demo has PowerShell code, C# code and C# Fluent depending on what you're building and how. It works in PowerShell 5.1 (Yeap - I will keep supporting it even though it has its limits), PowerShell 7+ (works in 7.4+, soon I guess 7.6+ only).

The library also uses my other projects:

The module/library has really fancy features like console recordings and things that could be used in demos/websites and lets say PowerPoint. The demos on the website are all dog-fooding so all the recordings you see there are real.

- https://consolemonster.dev/demos/

There are no external dependencies (aside my own mentioned above) to it. It's interactive, with mouse support, thread safe and of course multi-platform. It has auto-fallbacks depending on what terminal you're using.

I'm sure there are bugs and issues - but that's why there is Issues/PR section on GitHub. I've made sure the documentation is quite large and easy to follow, but if something is not clear or too complex let me know. We can always improve API.

Enjoy or not, up to you. I'm happy with what I have and I'll improve further :-)