funwhilelost has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
losingkeys has joined #sandstorm
Zarutian has quit [Quit: Zarutian]
leeola has quit [Quit: Connection closed for inactivity]
funwhilelost has joined #sandstorm
_whitelogger has joined #sandstorm
jemc has quit [Ping timeout: 240 seconds]
_whitelogger has joined #sandstorm
funwhilelost has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leeola has joined #sandstorm
jemc has joined #sandstorm
ill_logic has joined #sandstorm
<ill_logic>
isd: Interesting, I'll look into it. Really, I would ideally just change the timeout. I don't want the grain running for no reason.
losingkeys has quit [Remote host closed the connection]
_whitelogger has joined #sandstorm
jemc has quit [Ping timeout: 260 seconds]
aeternity has quit [Ping timeout: 268 seconds]
xet7 has quit [Quit: Leaving]
leeola has quit [Quit: Connection closed for inactivity]
tobald has joined #sandstorm
gh0st has joined #sandstorm
gh0st has quit [Client Quit]
yeehi_ has quit [Quit: Konversation terminated!]
aeternity has joined #sandstorm
Telesight has joined #sandstorm
FredFredFred_ has joined #sandstorm
FredFredFred has quit [Ping timeout: 258 seconds]
Telesight has quit [Quit: Leaving.]
Telesight has joined #sandstorm
jemc has joined #sandstorm
FredFredFred has joined #sandstorm
FredFredFred_ has quit [Ping timeout: 252 seconds]
FredFredFred_ has joined #sandstorm
FredFredFred has quit [Ping timeout: 268 seconds]
jemc has quit [Ping timeout: 240 seconds]
FredFredFred has joined #sandstorm
FredFredFred_ has quit [Ping timeout: 268 seconds]
Zarutian has joined #sandstorm
<isd>
ill_logic: you can drop the lock when the download completes. But I agree, it's a hack.
<ill_logic>
The problem is that, if there's a connectivity problem, I might fail to drop it.
<isd>
Don't know what language you're using for this? In go I'd just use a defer statement right after I acquire it, so it drops on return from the request handler. Could use a finally block in many other languages.
<ill_logic>
Oh right, this is server code.
<ill_logic>
I somehow figured it'd be through some javascript API.
<ill_logic>
Well, what if the user closes their browser mid-download? Then the server is left hanging.
<ill_logic>
I'd need a background process always running. I have to figure that out.
<ill_logic>
Right now I have Flask.
<ill_logic>
There's a request handler.
<isd>
ill_logic: The server should at some point get a disconnect. Just put the drop in a finally: and it should do the trick.
<ill_logic>
To clarfiy: This isn't one request. I'm facilitating the upload of tens of gigabytes.
<ill_logic>
This is many requests.
<ill_logic>
Perhaps it would be beneficial to maintain a wakelock for each chunk (10 megs or so)
<ill_logic>
But what if the problem occurs between requests?
<ill_logic>
So that's why I mention request handler vs background process. To have a wakelock for the whole upload, I'd need a background process that starts on the first chunk and ends after the last chunk, or if I don't hear from the browser for a while.
Zarutian has quit [Read error: Connection reset by peer]
Zarutian has joined #sandstorm
Zarutian has quit [Read error: Connection reset by peer]
Zarutian has joined #sandstorm
<isd>
Yeah, you could have a timeout of some variety.
<isd>
Is there a way you could not lose the necessary state when the app gets shut down? future requests should wake it again. What actually needs to be kept?
<isd>
(Just in general we need to make large uploads work better. You are by no means the first person to have struggled with this kind of thing).
thekyriarchy_ has joined #sandstorm
<ill_logic>
Hmm. I wonder if I'm repeating the work of others.
funwhilelost has joined #sandstorm
<ill_logic>
As far as maintaining state, I mean, yeah the file is still there. My approach now is to have it automatically retry.
<isd>
I know there's been discussion on the mailing list in the past; you might dig through the archives to see if there's any insight to be fine.
<ill_logic>
If need be, I guess I can allow manual resumes.
_whitelogger has joined #sandstorm
Zarutian has quit [Quit: Zarutian]
Zarutian has joined #sandstorm
tobald has quit [Quit: Ex-Chat]
Telesight has quit [Quit: Leaving.]
funwhilelost has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]