4 ms·
The goal would be 4 CentOS servers (probably VMs in AWS/Azure) Server 1 - Nginx load balancer Server 2,3 - ServiceStack (default setup; minimal plugins) with C#
by aascher 9y ago
The goal would be 4 CentOS servers (probably VMs in AWS/Azure)
Server 1 - Nginx load balancer
Server 2,3 - ServiceStack (default setup; minimal plugins) with C# on .Net Core
Server 4 - centralized file/data storage. Postgres for SQL, Redis for Cache (possible Message Queue as well)
but would start with 2 servers (one for .Net Core/Service Stack and one for Postgres)
This setup keeps the OSes standard across layers with the possibility to move pieces to Saas (eg. Redis -> Azure Cache/RedisLabs, ServiceStack -> anything supporting .Net Web Apps) if there is a cost/support benefit. IMO these tools have simple installs with common/sane defaults but are well documented for when business features become more complicated.
ServiceStack is mostly C# code with minimal coupling to the framework. It also offers many Plugins/Features for common web scenarios (auth, validation, etc). Basically ServiceStack is great at handling 'Http Request In' and 'Http Response Out'. Everything in-between should be straight C#/.Net.
Redis makes a great cache but can do messaging and pub/sub. ServiceStack offers libraries for Redis but others are available. It doesn't try to do too much so if a more feature rich Cache or Queue is required it will likely support the Redis use cases (and more).
Postgres is a great db engine but can also be a great document store. ServiceStack offers Ormlite support for db, there is raw SQL support via Npgsql or Marten for the full 'kitchen sink' use of Postgres...and I guess even Entity Framework.
I would start with HTML (ServiceStack/C# DTO -> Razor Format Plugin -> HTML) with Bootstrap and jQuery and add in API Support (ie. JSON) with Vuejs frontend if
single page application interactivity made more sense.
When starting an assumed 'vital long-term' project I want my tools to have simple/clear boundaries so I can add/remove when necessary (well, more likely forced to) without losing my investment or doing any heavy 'dependency lifting'.