Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/
Set by moderator on 12 March 2018.
02:57 ilbot3 joined
moderator Cro: libraries and tools for building reactive services in Perl 6 | cro.services/ | Logs: irclog.perlgeek.de/cro/
08:35 FROGGS joined 08:42 lizmat joined 09:18 FROGGS joined 16:03 FROGGS joined
FROGGS jnthn: I pondered using JWTs but I think I keep using my sql database for storing sessions... 16:16
I need to be able to see 'who is online', and I want to be able to force a logout of a user 16:17
a user should even be in a position to end a session of another device (s)he owns, but maybe that got lost or stolen
jnthn *nod* 16:21
Yeah, then you'll want an impl of the persistent session role
FROGGS so, to get things straight: Store.create is called, when the client does not have the cookie already, Store.save is then called on every request coming in? 16:24
and Store.clear is when the cookie is past its EOL, I guess?
well, actually Store.load also happens on every request, before .save most likely 16:25
jnthn Store.clear is just called at regular time intervals, so you can do a DELETE or whatever of outdated sessions 16:26
It's not called for a particular session
FROGGS ahh, I see 16:27
jnthn Since no individual server knows the age of a session
Since restarts, distribution, etc. :)
FROGGS aye
jnthn: to .cro.yml support host-env and port-env, right? I'd like it to support host and port too, and somehow provide that to the Cro::HTTP::Server.new() call... 16:52
s/to/the/
then I could add three endpoints for dev, test and prod...
well, actually I need more than that... the middleware services that I built in the past had a (json) config file, where endpoints of other systems were listed as well (for dev, test and prod each) 16:59
maybe I should put that in a database too... hmmm
are there any plans for a manager process that handles the services in production? 17:09
that would need to know stuff about the services as well...
jnthn .cro.yml is indended only for development time 17:17
Though it also encourages you to put all configuration into environment variables, which pretty much anything can provide
FROGGS and a service managing process thingy? are there plans for it, or is there a whiteopaper cro is following? 17:18
jnthn 12factor.net/config is why the env var approach 17:20
As for deployment - the things I've deployed so far written with Cro are all running in containers, which are on a Kubernetes cluster
Which provides restarts, rolling out updates, and so on
And is plenty happy to provide configuration and secrets via the environment 17:21
FROGGS thanks, will dig into this carafully this evening... 17:22
:o)
FROGGS is happy
jnthn The 12 factor thing is also why logging is by default to stdout/stderr, fwiw :) 17:24
FROGGS I know very well that nothing you do is by accident ;o)
20:02 rightfold joined
rightfold Hi, can I do blocking I/O in a Cro HTTP request handler? In particular, a blocking Native call. 20:04
jnthn rightfold: Yes. Of course, it'll block a thread, but request handlers are run on the thread pool, so other requests will just be handled by other threads. 20:20
rightfold jnthn: thanks! 20:23
Geth cro-websocket: titsuki++ created pull request #3:
Add :@headers argument for WebSocket client
20:31
20:39 titsuki joined
Geth cro-core: d3c9a04735 | Altai-man++ | 2 files
Add relative URI
21:24
cro-websocket: titsuki++ created pull request #4:
Create a WebSocket client instance each time before connection
21:32
cro-websocket: titsuki++ created pull request #5:
Create a WebSocket client instance each time before connection
21:36
cro-core: 13c405376f | Altai-man++ | 2 files
Add URI-Template
21:45
cro-websocket: titsuki++ created pull request #6:
Make "Upgrade" matching case-insensitive
22:12