- Notifications
You must be signed in to change notification settings - Fork20
-
Hellojezzsantos, I’m exploring the SaaStack template on GitHub, and its subdomain-based architecture for a SaaS model caught my attention. I’m starting with an application that will initially be OnPremise, but I’m considering an architecture that allows me to unify the codebase for both OnPremise and Cloud versions. In our case, we will work with a desktop application that will consume services locally through an IIS server. We understand that opting for an OnPremise approach might result in losing many features typically available in a cloud environment, but our primary focus is on managing repositories, pointing to an MSSQL Server instance. Is it possible to adapt an architecture like SaaStack’s to support both modes? What recommendations do you have for designing a solution that facilitates this unification without compromising security, scalability, and efficient data management in either environment? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 6 comments 7 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi@HERCH Thanks for getting in touch. Yes, yes, yes! Good news. You said,
I'm guessing you might mean that in Desktop<->OnPrem systems you don't have the common cloud services, we might be used to seeing, especially the messaging components? In terms of adapting to different environments, that is trivial really, You simply swap out and plugin the technology adapters that you have in your environment - no other code changes. Essentially the architecture as it is, depends on the following list of infrastructure services to operate correctly as designed, albeit, they are all completely technology agnostic:
If memory serves me well, I think everything else that is built in can either be stubbed out, or you can redirect to external 3rd party services, like for Email, Metrics, etc. |
BetaWas this translation helpful?Give feedback.
All reactions
🎉 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hi@jezzsantos, I have been exploring the architecture and following the steps for implementation. I cloned the repository and started running the application to evaluate its functionality. Currently, I am registering a user using the PasswordCredentialsApi -> /passwords/register endpoint (success) and confirming the account with the generated token (success). However, when I try to authenticate this new user, the request fails. After investigating, I noticed that the UserProfile is not being registered. Could you guide me on the correct approach to resolve this, or is there something I might be missing? Additionally, I tried generating an ApiKey using the RegisterMachineCredential endpoint, but I am unable to access the corresponding APIs. Could you provide some guidance on this matter? Since I am interested in an On-Premises version, I have added a new OnPremises project to the repository. I implemented this version using RabbitMQ, following the same pattern you previously mentioned. You can find my implementation in my repository:https://github.com/HERCH/saastack/tree/feature/on-premises-migration. If you find it relevant, I can submit a PR for integration. Looking forward to your feedback. |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Hey@HERCH Take a look at the HttpClient scripts in You will notice that with a user registration (using credentials) that its a multi step process. Whereas registration with SSO is slightly different. Also, if you running locally (on your local machine) we DO NOT have the AzureServiceBus (or equivalent) running, so there is not guaranteed delivery of the events from topics to subscribers. We actually do have a background service that is running in the To your second point. To your third topic. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hello again@jezzsantos, I am back with some updates. I have now migrated the Azure infrastructure, specifically regarding ServiceBusStore, QueueStore, and BlobStore. I have practically adapted the IDataStore and IEventStore implementations without changes for our on-premises version. Additionally, I have completed the implementation of RabbitMQ and created the integration tests, adding a new emulator for RabbitMQ and replicating the Azure tests. So far, everything is working fine. However, I encountered a small issue, which I describe below: When practically cloning the file and renaming it (from AzureSqlServerStore.IEventStore.cs to SqlServerStore.IEventStore.cs), in lines 54-55:
I am unable to access the resource Common.Resources.EventStore_ConcurrencyVerificationFailed_StreamAlreadyUpdated, as Resources is not accessible. Could you please guide me regarding this point? Thank you in advance. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hey@HERCH We very recently updated the concurrency handling for the store, and moved this particular resource in that commit:36b7b77. I am not sure if you are on a fork, or on a clone, the process to update will be different. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hi@jezzsantos, I’ve created two Pull Requests (PRs) for the integration of the On-Premises version: 1️⃣ First PR: Includes the RabbitMQ emulator setup, persistence implementation, and Service Bus & Queue management. 🔍 Request for Guidance 📌 Main Question: My test worker is currently using localhost:5656, but in my case, I have only implemented the worker with the consumer. I’ll share my progress on the workers so we can stay aligned and discuss the best approach. 📌 Current Code - EmailMessageHandler Thanks in advance for your support! Looking forward to your insights. Best regards, |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hi@HERCH Looking at this now, but give me a little time. |
BetaWas this translation helpful?Give feedback.
All reactions
🚀 1
-
Okay, I have various comments in the PRs related to the PRs tthemselves. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Okay, onto the tother questions:
You would build in the We have all this detailed out in the Regardless of what runtime you have, you need 3 hosts running to make it all work. In a cloud deployment Azure or AWS or GC, you need these equivalent processes running:
The If you are creating a OnPremise service to effectively replace what the AzureFunctions do ( which I assume is what you are showing me in the code example), then that is definitely the way to go. We don't really have a prototype you can follow to achieve all that, but we do have implementations you can reuse for pulling messages off queues and topics, and calling the respective APIs. We have nothing yet to replace the triggers. A good idea is to imagine how to trigger these things (with RabbitMq) and then use the same kind of code that you see being used in the But yeah, once you have that figured but an OnPremise version of |
BetaWas this translation helpful?Give feedback.
All reactions
🎉 1
-
Since I am contributing to the OnPremise version, I am providing what I believe is necessary for the migration. I have already created a new project called "OnPremiseWorkerService", which is responsible for message consumption and retransmission, based on the "AzureFunctions.Api.WorkerHost" project. I hope I am on the right path. I consider myself very curious about this architecture. However, I am still learning a lot, and while my contribution may have a somewhat weak integration at this stage, I believe it is a good starting point. If I could get some guidance, that would be great, as I am using this process as a learning opportunity. |
BetaWas this translation helpful?Give feedback.
All reactions
-
The integration for consuming Queues and Topics is already working correctly. However, the issue I am facing is that certain parameters are not being properly provided during the retransmission of notifications. |
BetaWas this translation helpful?Give feedback.
All reactions
-
In the first PR, you mentioned that the implementation of the new assembly didn’t make sense. However, after reviewing the second PR, you reconsidered and stated that the creation of an additional platform called HOSTEDONPREMISES now made sense. What I did was clone the pre-existing Azure project and adjust the AzureServiceBusStore and AzureStorageAccountQueueStore files for implementation using RabbitMQ. Additionally, I modified AzureStorageAccountBlobStore so that storage is handled within a database (DB). After deleting the two previous PRs, new doubts arose due to a comment where you suggested creating a dedicated adapter for RabbitMQ (which I have already implemented). Now, the question is how to handle SQL Server: Should I reuse the Azure implementation (which I don't think is ideal)? |
BetaWas this translation helpful?Give feedback.
All reactions
-
We have been working using the Rider Development ID, so we should have already improved many of the points that were mentioned in previous PR reviews. I want to share that the implementation of the RabbitMQ adapter for OnPremise has been completed. The data is now correctly stored locally (OnPremise). I will be pushing the changes to the same PR that was recently submitted so that it can be reviewed within that context. I would really appreciate your support in reviewing the integration and, most importantly, providing feedback and any necessary corrections to improve this implementation. Looking forward to your comments and suggestions. Thank you for your time and support! |
BetaWas this translation helpful?Give feedback.





