The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-02-20

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 Ryoga joined #mojo
00:03 Ryoga joined #mojo
00:05 Ryoga joined #mojo
00:21 veryrusty joined #mojo
00:23 sugar joined #mojo
00:36 sugar joined #mojo
00:45 aborazmeh joined #mojo
02:01 virgilgrimes joined #mojo
03:30 noganex joined #mojo
03:52 virgilgrimes joined #mojo
03:56 stryx` joined #mojo
04:40 inokenty-w joined #mojo
05:04 dboehmer joined #mojo
05:13 marty joined #mojo
06:59 Vandal joined #mojo
07:38 ccakes joined #mojo
08:09 foursixnine joined #mojo
08:15 foursixnine joined #mojo
08:16 dantti_laptop joined #mojo
08:26 AndrewIsh joined #mojo
08:26 andrew_ joined #mojo
08:27 trone joined #mojo
08:50 rshadow joined #mojo
08:59 AndrewIsh joined #mojo
09:00 sugar joined #mojo
09:12 veryrusty joined #mojo
09:24 sugar joined #mojo
10:19 irqq joined #mojo
10:21 hoschi joined #mojo
10:23 rshadow joined #mojo
10:30 sugar joined #mojo
10:45 CHYC joined #mojo
10:59 tchaves joined #mojo
11:17 salva joined #mojo
11:17 sugar joined #mojo
11:39 tchaves joined #mojo
11:43 itaipu joined #mojo
11:52 tchaves1 joined #mojo
11:57 sugar joined #mojo
12:13 stryx` joined #mojo
13:05 blonewolfs joined #mojo
13:06 sugar joined #mojo
13:23 rshadow joined #mojo
13:51 sugar joined #mojo
13:53 gizmomathboy joined #mojo
14:11 rshadow joined #mojo
14:12 sri btw. tomorrow starts hackweek, so if anyone has any last minute ideas for what i could be working on, now's your chance ;)
14:13 sri thought maybe one day i'll just finish https://github.com/kraih/mojo/pull/1053 but salva is dragging it out...
14:15 marcus Would be really nice to see that one finished.
14:16 Pyritic joined #mojo
14:16 sri yea, really sad how the bad explanations of the feature migth end up killing the whole thing
14:17 sri this is one of the reasons i favor rejecting pull requests without docs quickly
14:17 sri you can't really discuss them
14:18 sri and they end up killing themselves, even if the idea was good
14:18 sri much better chance with a second cleaned up pull request
14:18 gryphon joined #mojo
14:25 sri looks like nobody cares about this https://github.com/kraih/mojo/issues/1059
14:32 jabberwok joined #mojo
14:33 itaipu joined #mojo
14:57 salva joined #mojo
14:57 sugar joined #mojo
15:07 tchaves joined #mojo
15:08 itaipu joined #mojo
15:18 jabberwok is there a best-practice for how to manage files that users upload via Mojo? presumably somehow need to keep sync between database and filesystem, and track thumbnails versus original images, that sort of thing.
15:27 litwol jabberwok: What resources/documentation have you consulted so far? have you seen this? http://stackoverflow.com/questions/10152973/how-upload-file-using-mojolicious
15:35 jabberwok litwol: i have file uploads working, being stored to disk, and i am saving the path in a database.  I'm using File::Temp with a template to create a unique filename on the server, cross-referenced to what the user uploaded (if you upload X.gif twice, you get say AV4123.gif and QZ3421.gif)
15:36 jabberwok and actually this is for a multi-tenant system, so user uploads are stored in appp's /public/images/$tenant_id/$user_id/$random_template.$file_extension
15:37 jabberwok and then a thumbnail would be /public/images/$tenant_id/$user_id/$random_template.thumb.$file_extension
15:37 jabberwok but then that needs to be handed to client as http:// path relative to client's domain
15:38 jabberwok it all gets rather messy and i am unsure what to optomize and what to just brute-force.
15:39 rshadow joined #mojo
15:42 itaipu jabberwok: I would put content of an image in a well designed database schema for images only. something along these lines: Image(type, owner, media, upload_time) Content(data, encode), etc...
15:43 itaipu jabberwok: of course this a design decision of your own. And what is or isn't suitable for the hole application
15:44 jabberwok Store the actual image file data in the database?
15:45 sugar joined #mojo
15:45 itaipu jabberwok: I prefer this way, since is easier to migrate
15:47 jabberwok Each tenant could have hundreds of megabytes of image files; doesn't serving all that through a database connection create a huge bottleneck?
15:48 litwol ^ i'd like to learn more about this.
15:48 litwol it is not first time i hear about files being served from "formal" database.
15:48 litwol although previous context which i heard about spoke about strictly using db for /canonical/ storage and using FUSE wrapper to mount folder with local caching.
15:50 jabberwok it would be most interesting if you could mount a database query as a filesystem
15:51 litwol you can
15:51 litwol if you wan to go out of context of your original question feel free to google fuse api and examples for writing your own wrapper :)
15:52 pink_mist iirc there's even perl bindings for fuse, so you can actually write it in perl
15:52 pink_mist which is insane imo, but fun :P
15:54 jabberwok http://blogs.perl.org/users/fuzzix/2012/08/fun-with-fuse.html   that is rather amazing
15:54 jabberwok i do wonder about the performance of serving thousands of files via Postgres versus static directories, though
15:55 jabberwok presumably Linux's filesystem caching handles this?  hmm
15:56 pink_mist I expect performance will be crap
15:56 litwol Does this abstract concurrencies ?
15:57 litwol itaipu: Could you describe setup a bit more?
16:36 sh14 joined #mojo
16:44 bit_shifter joined #mojo
16:46 marty_ joined #mojo
17:01 bit_shifter I'm dealing with a noisy (and NSFW) websocket server in a loop.  About 1 in 10 times, I get this error thrown from within UserAgent.pm: http://sprunge.us/AeVf.  Here's my script and the output: http://sprunge.us/ihNO?pl.  Any thoughts?
17:04 bit_shifter There's nothing NSFW in those sprunge links, btw, but the domain I'm dealing with is adult-oriented.
17:04 PryMar56 joined #mojo
17:09 stryx` joined #mojo
17:09 vicash jabberwok: serving static files via postgres is a bad idea especially if it is in 1000s. that's what a file system is good at. you can use postgres to store the path of the file.
17:13 litwol ^ that approach i'm familiar with and saw it work reliably.
17:13 litwol just create a model around your files that handles managing filesystem & db via simplified api call (and if possible with transaction support).
17:16 jberger bit_shifter: why are you putting it in a loop like that?
17:16 jberger oh well
17:16 bit_shifter joined #mojo
17:16 jberger bit_shifter: why are you putting it in a loop like that?
17:19 bit_shifter In my actual program, it has to be called every time I need updated data.  It's more like every 10 seconds in my actual use case.
17:21 irqq joined #mojo
17:22 bit_shifter Maybe I could experiment with leaving that websocket open... is that what you're thinking?
17:28 jberger websockets are usually used in a long-term manner, not just for request/response
17:29 jberger the error you see is strange, I don't know what could cause it
17:29 jberger but I'm not going to connect to that host to try
17:29 jberger so ...
17:29 bit_shifter Yeah, that makes sense.  It seems like it SHOULD work as is.
17:29 bit_shifter Lol, I don't blame you.
17:29 Lee joined #mojo
17:30 jberger I mean, that program looks like it might strain some concepts there
17:31 Zx3 joined #mojo
17:31 jberger it would be better if you kept the loop active rather than letting it stop for lack of work and then sleep immediately
17:31 jberger its a strange usage
17:31 jberger should probably work, yes, but its mixing paradigms
17:32 bit_shifter That's fair.  I'll play around with leaving it open and sending/receiving when I need it instead.
17:38 irqq_ joined #mojo
17:42 irqq_ joined #mojo
17:43 itaipu joined #mojo
17:49 rshadow joined #mojo
18:06 itaipu joined #mojo
18:10 tchaves joined #mojo
18:21 sugar joined #mojo
18:26 disputin joined #mojo
18:29 rshadow joined #mojo
18:43 Pyritic joined #mojo
18:49 spicyjack q
19:14 tyldis zach: We always do it like that. Create an API first and then you can layer ther frontend you want eith it, either web or mobile app. Mostly because we suck at frontends and they are easy to outsource ;)
19:14 tyldis Let the users and designers battle it out without me having to be a part of it ;)
19:17 zach :)
19:28 irqq joined #mojo
19:48 cfedde joined #mojo
20:39 batman joined #mojo
21:12 dikim joined #mojo
21:34 itaipu joined #mojo
21:35 batman joined #mojo
21:54 cpan_mojo joined #mojo
21:55 cpan_mojo joined #mojo
21:55 marcus joined #mojo
22:04 veryrusty joined #mojo
22:13 stryx` joined #mojo
22:15 marcus joined #mojo
22:24 rshadow joined #mojo
22:30 stryx` joined #mojo
22:32 batman joined #mojo
22:37 jberger joined #mojo
22:37 jberger joined #mojo
22:52 disputin joined #mojo
23:21 * sri closes https://github.com/kraih/mojo/pull/1053#issuecomment-281204458
23:22 sri experiment failed, i'll close fast again

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary