Welcome to the Marten documentation! Join also our friendly Discord channel to learn more with us and the community!
What is Marten?
Under the hood, we're using Postgresql, changing it into:
The basis for our work is the unique Postgresql support for JSON storage.
Thanks to that and other Postgresql capabilities, Marten brings strong consistency into those approaches.
Marten is feature-rich and focused on accessibility, but we do that without compromising performance.
Whether you're working on a new greenfield project or a bigger enterprise one, Marten will help you to quickly iterate and evolve your system with a focus on business value.
Some of the highlights of the main Marten features:
|Document Storage||Marten allows to use of Postgresql as a document database. That makes development much more flexible, as you store your entities as JSON. It helps in easier evolving your data model.|
|Event store||Accordingly, you can also use Postgresql as a full-fledged event store for Event Sourcing. This approach can help you capture all the business facts in your system.|
|Strong consistency||Marten uses Postgresql transactions capabilities to allow you to have trust in your storage engine. That applies to both document-based and Event Sourcing approaches.|
|Advanced Linq querying capabilities||You can filter your documents using the LINQ queries. That's the most popular .NET way of doing that. We also support full-text search and custom SQL queries.|
|Events Projections||Marten gives a unique feature to store both events and read models in the same storage. You can write your projections and get flexibility in interpreting your events. Projections can be applied in the same transaction as appended event or asynchronously.|
|Automatic schema management||We know that schema management in relational databases can be tedious. That's why we're offering to deal with it for you. Thanks to the simpler storage with JSON format, that gets much easier.|
|Flexible indexing strategies||To get a better performance, you can define various indexing strategies to fit your usage characteristics. Document-based approach doesn't have to mean schema-less!|
|ASP.NET integration and Command Line tooling||We provided a set of build-in helpers to get you quickly integrate Marten with your applications without much of a hassle.|
|Built-in support for Multi-tenancy||Being able to have data isolation for different customer is an essential feature for storage engine. We provide multiple ways of dealing with multi-tenancy: multiple databases, different schemas and sharded-table. Those strategies apply both document and event store parts.|
.NET Version Compatibility
Marten aligns with the .NET Core Support Lifecycle to determine platform support. Marten currently targets
|Marten Version||.NET Framework||.NET Core 3.1||.NET 5||.NET 6||.NET 7|
History and origins
Marten was originally built to replace RavenDB inside a very large web application that was suffering stability and performance issues. The project name Marten came from a quick Google search one day for "what are the natural predators of ravens?" -- which led to us to use the marten as our project codename and avatar.
The Marten project was publicly announced in late 2015 and quickly gained a solid community of interested developers. An event sourcing feature set was added, which proved popular with our users. Marten first went into a production system in 2016 and has been going strong ever since. The v4 release in 2021 marks a massive overhaul of Marten's internals, and introduces new functionality requested by our users to better position Marten for the future.