question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multitenant implementation

See original GitHub issue

I’m looking at migrating my event sourced / multitenant application to Eventuous. I’ve read through the docs and just want to check if the following is feasible before I dive in:

Each tenant has their own EventStore and database for projections/query models. There are also a few shared projections which are stored in a shared database - this projection would receive events from all tenants and is used for things like listing the tenants etc

My idea is this:

  1. Resolve the tenant information on each request (connection strings, etc)

  2. Change builder.Services.AddSingleton(streamNameMap); to builder.Services.AddScoped(streamNameMap);. Not sure if the CommandService should be / is already scoped to the request.

In order for projections to work, can the ‘global sequence number’ or event number be globally unique/sequential- like using ticks or some other incrementing mechanism?

Regards

Brett

Issue Analytics

  • State:closed
  • Created 6 months ago
  • Comments:20 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
alexeyzimarevcommented, Aug 22, 2023

Ok, the 0.15.0-beta.4 contains the new API. The old API is usable, but marked obsolete. Let me know if it actually help with multi-tenancy, I expect it does.

0reactions
brettwinterscommented, Aug 22, 2023

Let me take a look. I got sidetracked then bogged down in another issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Approaches to implementing multi-tenancy in SaaS ...
Kubernetes namespaces provide ways to use a single-tenant application in a multi-tenant SaaS deployment. The most common and perhaps most ...
Read more >
Multi-Tenancy Implementation using Spring Boot + Hibernate
Multi-tenancy is an architecture in which a single instance of a software application serves multiple customers. Each customer is called a ...
Read more >
How to Implement Multitenancy in Cloud Computing
Multi-tenancy for the data plane is often implemented as partitions on the data layers - e.g., separate partitions, tables, columns, identifiers ...
Read more >
Multi-Tenant Architecture for Designing a SaaS Application
Discover the benefits of Software as a Service (SaaS) multi-tenant database design and how to build a multi-tenant cloud-based environment.
Read more >
What Is Multi-Tenant Architecture? Ultimate Guide - Datamation
The simplest and most straightforward application of a multi-tenant architecture involves the sharing of multiple schemas for the same database.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found