!EoyccMaVGwdqyfKMAL:matrix.org

Nim Web Development

2363 Members
A channel to talk about web development with Nim.9 Servers

Load older messages


SenderMessageTime
25 Jun 2022
@_discord_986138560291803137:t2bot.iostanley joined the room.16:39:07
@_discord_180601887916163073:t2bot.ioIsofruit#5120 Actually, isn't letting the webserver handle the audio file sort of a waste unless you want to manipulate the audio file?
The more I think about it the more sense it makes to let nginx take care of uploading and storing the file, before passing off a request to the backend which then moves it with a rename somewhere else. The only drawback this has is that unlike a multiform part request I can't transfer all the other data I'd need to generate a db entry with, so I guess that's not quite as nice, but still
16:53:16
@_discord_180601887916163073:t2bot.ioIsofruit#5120 * Actually, isn't letting the application server handle the audio file sort of a waste unless you want to manipulate the audio file?
The more I think about it the more sense it makes to let nginx take care of uploading and storing the file, before passing off a request to the backend which then moves it with a rename somewhere else. The only drawback this has is that unlike a multiform part request I can't transfer all the other data I'd need to generate a db entry with, so I guess that's not quite as nice, but still
16:53:24
@_discord_180601887916163073:t2bot.ioIsofruit#5120 * Actually, isn't letting the application server handle the uploaded large audio file sort of a waste unless you want to manipulate the audio file?
The more I think about it the more sense it makes to let nginx take care of uploading and storing the file, before passing off a request to the backend which then moves it with a rename somewhere else. The only drawback this has is that unlike a multiform part request I can't transfer all the other data I'd need to generate a db entry with, so I guess that's not quite as nice, but still
16:53:34
@_discord_180601887916163073:t2bot.ioIsofruit#5120 * Actually, isn't letting the application server handle the uploaded large audio file sort of a waste unless you want to manipulate the audio file?
The more I think about it the more sense it makes to let nginx take care of uploading and storing the file, before passing off a request to the backend which then moves it with a rename somewhere else where you want to serve it. The only drawback this has is that unlike a multiform part request I can't transfer all the other data I'd need to generate a db entry with, so I guess that's not quite as nice, but still
16:53:57
@_discord_180601887916163073:t2bot.ioIsofruit#5120 Like, you send the data, then nginx has to deal with it and pass it on to the application server, then the application server also has to deal with it and save it into a file.
Isn't having nginx store it into a file and after having done so notifying the backend that there is a new file at filepath X more efficient?
16:58:14
@_discord_180601887916163073:t2bot.ioIsofruit#5120 * Like, you send the data, then nginx has to deal with it and pass it on to the application server, then the application server also has to deal with it and save it into a file.
Isn't having nginx store it into a file and after having done so notifying the backend that there is a new file at filepath X more efficient (so it can then move it to a folder it controls/serves stuff from and rename according to a pattern etc)?
16:58:40
@_discord_180601887916163073:t2bot.ioIsofruit#5120 * Like, you send the data, then nginx has to deal with it and pass it on to the application server, then the application server also has to deal with it and save it into a file.
Isn't having nginx store it into a file and after having done so notifying the backend that there is a new file at filepath X more efficient (so the backend can then move it to a folder it controls/where it knows nginx serves stuff from and rename the file according to a pattern etc)?
16:59:31
@_discord_180601887916163073:t2bot.ioIsofruit#5120 I've been using this approach for only 2 days now and I'm already insanely in love with it, in how close to prod I can test my stuff.
Thanks again for pointing this out to me!
17:05:00
@_discord_314422392912871435:t2bot.iofatty joined the room.19:10:16
@_discord_180601887916163073:t2bot.ioIsofruit#5120 Ah, forgot to reply to this one:
I agree to an extent. They entire class-based view thing adds a fair amount of complexity, but in exchange you spare yourself writing a fair amount of code. Same goes for serializers etc.
I managed to avoid e.g. writing a fair amount of code just by dropping in mixins where needed.
19:31:29
26 Jun 2022
@_discord_214784081752358912:t2bot.iobeans changed their display name from beans to beans#7022.02:51:31
@_discord_214784081752358912:t2bot.iobeans changed their display name from beans#7022 to beans.02:51:39
@_discord_849291981149569055:t2bot.iofitful panda joined the room.03:41:35
@_discord_212293752532893697:t2bot.ioLabdaABeta joined the room.04:07:17
@_discord_875763205534810133:t2bot.iopetrosk joined the room.04:42:23
@_discord_531959880609955841:t2bot.iodizzyliam changed their display name from dizzyliam to karma_corrections#4572.15:43:15
@_discord_531959880609955841:t2bot.iodizzyliam changed their display name from karma_corrections#4572 to dizzyliam.15:43:32
@_discord_768775480168939521:t2bot.iodeadmeme77 changed their display name from deadmeme77 to deadmeme77#5784.16:12:01
@_discord_768775480168939521:t2bot.iodeadmeme77 changed their display name from deadmeme77#5784 to deadmeme77.16:12:09
@_discord_527155716469817364:t2bot.ioܕܵܢ changed their display name from Izazo M. Squoze to ܕܵܢ#8554.17:24:23
@_discord_527155716469817364:t2bot.ioܕܵܢ changed their profile picture.17:24:38
@_discord_527155716469817364:t2bot.ioܕܵܢ changed their display name from ܕܵܢ#8554 to ܕܵܢ.17:24:41
@_discord_155183973448810496:t2bot.ioMoogly#1776 joined the room.20:54:01
@_discord_155183973448810496:t2bot.ioMoogly#1776 apologies if this is not the place to ask but what are the currently actively maintained web frameworks (or libraries / packages) that work across platforms (not just *NIX, but also Windows), apologies if this is the wrong channel 20:54:02
@_discord_180601887916163073:t2bot.ioIsofruit#5120 prologue will work across plattform when you use async http server. That one has the limitation currently of not being able to deal with large file uploads though. Which is not a huuuuge limitation since you can let the upload be taken care of by your reverse proxy like nginx/apache.

Jester is the more used one (?).
Not sure, I'd need to see data on that one, just based on how many folks I read on here I'm the only person I know of writing stuff in prologue and have seen folks talk about jester often enough. Both are pretty minimal though, as in they take care of the routing for you for the most part and leave the entire "how do you interact with databases and send stuff back" to you.
21:25:34
@_discord_180601887916163073:t2bot.ioIsofruit#5120 Which means you'll need to wire up a connection pool, an ORM, a database and any other system you might want (Stuff like signals in Django), authentication etc. by yourself.
Tooling for e.g. database migrations is also left to you.

For connection pooling and ORM there are existing packages that work alright.
21:28:44
@_discord_180601887916163073:t2bot.ioIsofruit#5120 Not sure if Jester works across plattforms, you'd need to ask DOM or research whether it supports asynchttp
Anyway, these 2 so far are the frameworks I can make any sort of statement about at least.
21:31:58
@_discord_155183973448810496:t2bot.ioMoogly#1776 Nice I have some Python experience using Django and CherryPy (minimalist like Flask) 21:47:07
@_discord_155183973448810496:t2bot.ioMoogly#1776 Is asynchttp built in to Nim? 21:47:59

There are no newer messages yet.


Back to Room List