An open API service indexing awesome lists of open source software.

https://github.com/foundatiofx/foundatio

Pluggable foundation blocks for building distributed apps.
https://github.com/foundatiofx/foundatio

abstractions aws azure c-sharp distributed distributed-locks distributed-systems foundatio job-scheduler jobs lock logging message-bus messaging metrics queue redis s3 statsd storage

Last synced: 27 days ago
JSON representation

Pluggable foundation blocks for building distributed apps.

Awesome Lists containing this project

README

          

![Foundatio](https://raw.githubusercontent.com/FoundatioFx/Foundatio/master/media/foundatio-dark-bg.svg#gh-dark-mode-only "Foundatio")![Foundatio](https://raw.githubusercontent.com/FoundatioFx/Foundatio/master/media/foundatio.svg#gh-light-mode-only "Foundatio")

[![Build status](https://github.com/FoundatioFx/Foundatio/workflows/Build/badge.svg)](https://github.com/FoundatioFx/Foundatio/actions)
[![NuGet Version](http://img.shields.io/nuget/v/Foundatio.svg?style=flat)](https://www.nuget.org/packages/Foundatio/)
[![feedz.io](https://img.shields.io/badge/endpoint.svg?url=https%3A%2F%2Ff.feedz.io%2Ffoundatio%2Ffoundatio%2Fshield%2FFoundatio%2Flatest)](https://f.feedz.io/foundatio/foundatio/packages/Foundatio/latest/download)
[![Discord](https://img.shields.io/discord/715744504891703319)](https://discord.gg/6HxgFCx)

Pluggable foundation blocks for building loosely coupled distributed apps.

## โœจ Why Choose Foundatio?

- ๐Ÿ”Œ **Pluggable implementations** - Swap Redis, Azure, AWS, or in-memory with no code changes
- ๐Ÿงช **Developer friendly** - In-memory implementations for fast local development and testing
- ๐Ÿ’‰ **DI native** - Built for Microsoft.Extensions.DependencyInjection
- ๐ŸŽฏ **Interface-first** - Code against abstractions, not implementations
- โšก **Production ready** - Battle-tested in high-scale applications
- ๐Ÿ”„ **Consistent APIs** - Same patterns across caching, queues, storage, and more

## ๐Ÿงฑ Core Building Blocks

| Feature | Description |
|---------|-------------|
| [**Caching**](https://foundatio.dev/guide/caching) | In-memory, Redis, and hybrid caching with automatic invalidation |
| [**Queues**](https://foundatio.dev/guide/queues) | Reliable message queuing with Redis, Azure, AWS SQS |
| [**Locks**](https://foundatio.dev/guide/locks) | Distributed locking and throttling |
| [**Messaging**](https://foundatio.dev/guide/messaging) | Pub/sub with Redis, RabbitMQ, Kafka, Azure Service Bus |
| [**Jobs**](https://foundatio.dev/guide/jobs) | Background job processing with queue integration |
| [**File Storage**](https://foundatio.dev/guide/storage) | Unified file API for disk, S3, Azure Blob, and more |
| [**Resilience**](https://foundatio.dev/guide/resilience) | Retry policies, circuit breakers, and timeouts |

## ๐Ÿš€ Quick Start

```bash
dotnet add package Foundatio
```

```csharp
// Caching
ICacheClient cache = new InMemoryCacheClient();
await cache.SetAsync("user:123", user, TimeSpan.FromMinutes(5));
var cached = await cache.GetAsync("user:123");

// Queuing
IQueue queue = new InMemoryQueue();
await queue.EnqueueAsync(new WorkItem { Data = "Hello" });
var entry = await queue.DequeueAsync();

// File Storage
IFileStorage storage = new InMemoryFileStorage();
await storage.SaveFileAsync("docs/readme.txt", "Hello World");

// Distributed Locks
ILockProvider locker = new CacheLockProvider(cache, messageBus);
await using var handle = await locker.AcquireAsync("resource-key");
```

## ๐Ÿ“ฆ Provider Implementations

| Provider | Caching | Queues | Messaging | Storage | Locks |
|----------|---------|--------|-----------|---------|-------|
| [In-Memory](https://foundatio.dev/guide/implementations/in-memory) | โœ… | โœ… | โœ… | โœ… | โœ… |
| [Redis](https://github.com/FoundatioFx/Foundatio.Redis) | โœ… | โœ… | โœ… | โœ… | โœ… |
| [Azure Storage](https://github.com/FoundatioFx/Foundatio.AzureStorage) | | โœ… | | โœ… | |
| [Azure Service Bus](https://github.com/FoundatioFx/Foundatio.AzureServiceBus) | | โœ… | โœ… | | |
| [AWS (S3/SQS/SNS)](https://github.com/FoundatioFx/Foundatio.AWS) | | โœ… | โœ… | โœ… | |
| [RabbitMQ](https://github.com/FoundatioFx/Foundatio.RabbitMQ) | | | โœ… | | |
| [Kafka](https://github.com/FoundatioFx/Foundatio.Kafka) | | | โœ… | | |
| [Minio](https://github.com/FoundatioFx/Foundatio.Minio) | | | | โœ… | |
| [Aliyun](https://github.com/FoundatioFx/Foundatio.Aliyun) | | | | โœ… | |
| [SFTP](https://github.com/FoundatioFx/Foundatio.Storage.SshNet) | | | | โœ… | |

## ๐Ÿ“š Learn More

**๐Ÿ‘‰ [Complete Documentation](https://foundatio.dev)**

### Core Features

- [Getting Started](https://foundatio.dev/guide/getting-started) - Installation and setup
- [Caching](https://foundatio.dev/guide/caching) - In-memory, Redis, and hybrid caching with invalidation
- [Queues](https://foundatio.dev/guide/queues) - FIFO message delivery with lock renewal and retry policies
- [Locks](https://foundatio.dev/guide/locks) - Distributed locking with null handling patterns
- [Messaging](https://foundatio.dev/guide/messaging) - Pub/sub with size limits and notification patterns
- [File Storage](https://foundatio.dev/guide/storage) - Unified file API across providers
- [Jobs](https://foundatio.dev/guide/jobs) - Background job processing and hosted service integration

### Advanced Topics

- [Resilience](https://foundatio.dev/guide/resilience) - Retry policies, circuit breakers, and timeouts
- [Serialization](https://foundatio.dev/guide/serialization) - Serializer configuration and performance
- [Dependency Injection](https://foundatio.dev/guide/dependency-injection) - DI setup and patterns
- [Configuration](https://foundatio.dev/guide/configuration) - Options and settings

## ๐Ÿ“ฆ CI Packages (Feedz)

Want the latest CI build before it hits NuGet? Add the Feedz source and install the pre-release version:

```bash
dotnet nuget add source https://f.feedz.io/foundatio/foundatio/nuget -n foundatio-feedz
dotnet add package Foundatio --prerelease
```

Or add to your `NuGet.config`:

```xml








```

## ๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request. See our [documentation](https://foundatio.dev) for development guidelines.

**Development Setup:**

1. Clone the repository
2. Open `Foundatio.slnx` in Visual Studio or VS Code
3. Run `dotnet build` to build
4. Run `dotnet test` to run tests

## ๐Ÿ”— Related Projects

- [**Foundatio.Mediator**](https://github.com/FoundatioFx/Foundatio.Mediator) - Blazingly fast, convention-based C# mediator powered by source generators

## ๐Ÿ“„ License

Apache 2.0 License

## Thanks to all the people who have contributed

[![contributors](https://contributors-img.web.app/image?repo=foundatiofx/foundatio)](https://github.com/foundatiofx/foundatio/graphs/contributors)