77 Replies
10 months ago
basically there's dotnet the web framework, people usually likes to use it's default version (which follows the MVC model, Model View Controller)
10 months ago
and then there's the dotnet minimal APIs (same framework, different strategy), which are very easy to understand and build something quick
10 months ago
you can follow this tutorial from Microsoft:
https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-web-api?view=aspnetcore-9.0&tabs=visual-studio
so by the end i should have a github repo with the API launched from github on railway like a python api?
also is there example finished code of this minimal api?
10 months ago
hopefully it'll be Railway ready but if something happens when deploying it just send a message on this help thread.
10 months ago
there may be some examples on Github but not specially made for Railway
(mainly because i dont know what the github file structure is meant to look like)
10 months ago
I can try but I would recommend following a tutorial, on Railway we can't teach an entire language just by help threads.
true. however this is all i have right now, and i dont think its going to deploy with just this XD

do i need like a requirements.txt type of thing?
just because railway acts different to the C# i know
10 months ago
I may be able to get a simple template for you, give me a minute
im used to flask, this is new lol, however i know C# is lightweight, especially for a server
10 months ago
I would recommend to stick to the language you know, C# can get pretty big and if you're looking for lightweight solutions, Go is the option
its good to learn something new + i really need C# for what im creating
10 months ago
great, that's a valid point
I'm going to head off, if you can get the template i would be blown away XD
10 months ago
can I ask on why you need C#?
I dont mind paying for the costs, I want to have control over it all
10 months ago
but that can be done in any language
10 months ago
that still can be done in any language, including Python
10 months ago
how many players are you expecting?
10 months ago
Python can be pretty capable of running a beef game
10 months ago
pretty sure it can handle + you know Python so I would do it in Python
I got told C# was lightweight and speedy XD
If python works, it works
10 months ago
depends on what you're doing
10 months ago
I would create a POC and see how it goes
10 months ago
Proof of Concept
i wouldnt mind doing c#, i know a bit because of unity
and software developement
We could always just do this?
again if you think python might work, i can use it
10 months ago
I highly recommend doing a POC in the language you know and see how it goes
10 months ago
but I've seen some real-time games made in Python
do you mind providing a template as well? so i can rollback if it doesnt work?
10 months ago
np
alright, going to bed, cant wait for this template in the morning! Thanks a lot
Okayie Tried python and its response times, they are fine, however the CPU usage is not, what is a lightweight language I can use on railway to minimise CPU usage?
10 months ago
Go is the way
10 months ago
pog
10 months ago
just watch out, Gin can use a lot of memory and in some benchmarks Gin lose to ElysiaJS (yes a js framework)
10 months ago
but for your use case it should be fine
Uh ohs, as long as I dont eat up my money with the cpu, (thats why i switched from python to go)
10 months ago
The only way to find out is by testing but Go is pretty lightweight overall
Alright, as i said I did a stress test, and it came out at $10 for 50 clients on python xD (10 mins usage)
10 months ago
if you're looking for something focused on being lightweight, there's Go-Chi
https://go-chi.io/#/
10 months ago
but try Gin first, it's easier to understand
10 months ago
time for a load test, that's all i can say
10 months ago
i forgot to mention but I did a C# template 😅
10 months ago
