Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/
Set by moderator on 13 March 2018.
02:13 lizmat joined 02:57 ilbot3 joined
moderator Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/
04:13 lizmat_ joined 08:03 sena_kun joined
Geth cro-http: 70634d26e0 | (Jonathan Worthington)++ | lib/Cro/HTTP/Router.pm6
Expose the HTTP router Handler base role

In order that router plugins will be able to implement alternative handlers.
11:00
cro-http: a2d150f919 | (Jonathan Worthington)++ | lib/Cro/HTTP/Router.pm6
Consistent method names for route set additions

Also this removes a conflict between `after` and `before` being both the accessor and the method for adding one. Very low risk of impact; it's unlikely anyone has until now tried to write router plugins by subclassing `RouteSet`.
12:10 sena_kun joined 12:24 titsuki joined 16:48 FROGGS joined 18:33 sena_kun joined
Geth cro-core: ac54e6a40e | Altai-man++ | 2 files
Adds Cro::Iri

It has basically the same semantics as Cro::Uri and passes its tests, while allowing wider Unicode characters subsets for number of rules.
18:56
cro-websocket: b2bff05b91 | (Itsuki Toyota)++ | lib/Cro/WebSocket/Client.pm6
Make "Upgrade" matching case-insensitive

RFC6455 (c.f., tools.ietf.org/html/rfc6455#section-4.1) says:
  ```
If the response lacks a |Connection| header field or the
  |Connection| header field doesn't contain a token that is an
ASCII case-insensitive match for the value "Upgrade", the client MUST _Fail the WebSocket Connection_.
  ```
19:51
cro-websocket: e6fd5b940b | (Itsuki Toyota)++ | lib/Cro/WebSocket/Client.pm6
Add missing ^ and $
cro-websocket: c101fd2107 | (Jonathan Worthington)++ (committed using GitHub Web editor) | lib/Cro/WebSocket/Client.pm6
Merge pull request #6 from titsuki/make-upgrade-case-insensitive

Make "Upgrade" matching case-insensitive
FROGGS is DBIish (mysql) or NativeCall known to be problematic when used in a cro service? 21:31
jnthn Cro applications automatically run requests across the thread pool 21:37
FROGGS is that a yes? :o) 21:38
jnthn NativeCall is highly unlikely to be a problem; there's a bunch of tests for it running stuff concurrently.
Including coping with native callbacks coming on different threads etc.
I believe DBIish does have some things one must be aware of in a threaded application 21:39
In a $dayjob project we're using DB::Pg instead which seems to do pretty well on the thread stuff (as in, it seems this was thought about)
But that doesn't help you if you're using mysql
FROGGS hmmm :/ 21:40
jnthn I'd check what DBIish docs say on thread safety needs, though (provided they do)
I've not had time to look into it really
But I've heard there's some issues there.
Probably sharing a connection object between threads doesn't go too well 21:41
If all your DB logic is encapsulated in some classes, you might try (though it's a concurrency-limiting workaround) s/class/monitor/ (using OO::Monitors)
FROGGS I see 21:42
jnthn fears this is going to become a frequent problem without some attention to DBIish :S 21:44
FROGGS I commented my DBIish calls, and the problems went away... putting a select in SessionStore.load back in, and the double free came back 21:45
as far as my primitive tests go it seems like it not about connecting to mysql but but about preparing a statement 21:59
timotimo statement preparation is probably also not threadsafe, especially since prepared statements are tied to connections (am i right?) 22:41
(could be wrong)
lizmat perhaps statement preparation uses regular expressions ? 22:56
jnthn But those are threadsafe for too, modulo the handful that hit an EVAL-using path 23:18
s/for// 23:19
jnthn has done an amount of parallel grammar parses and that tends to work out fine
23:39 Geth joined 23:47 Geth joined 23:53 Geth joined 23:55 Geth joined