faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
_whitelogger has joined #amber
<FromGitter> <andrewc910> Okay, I've been doing some research. Rails offers a websocket event loop that is pretty easy to hook into to do a periodic timer. It doesn't look like amber has such a complex setup. @eliasjpr how would you recommend I go about doing a timer in amber? I have only worked with the JavaScript event loop, never even thought about building one. I have also never worked with fibers, parallelism or concurrency. What do
<FromGitter> ... you recommend I read on to begin thinking about an implementation?
<FromGitter> <andrewc910> I'm going through rails code rn to better understand but it could take a couple weeks as action cable is quite large and complex. I would prefer not having to study action cable to its fullest.
<FromGitter> <andrewc910> So given that crystal can spawn millions of fibers on a 64bit machine. I am thinking that may be best?
<FromGitter> <andrewc910> The user hits a page, that registers a new WS sub. Spawn a fiber that will do some action, then sleep for x, then do it again. When the user leaves the page, kill that fiber? Does anything sound inheritently wrong with that?
alexherbo2 has joined #amber
feepbot has quit [Ping timeout: 258 seconds]
feepbot has joined #amber
feepbot has quit [Ping timeout: 256 seconds]
feepbot has joined #amber
<FromGitter> <eliasjpr> Maybe something like ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5f5016ff89cf2d584b938147]
alexherbo2 has quit [Ping timeout: 256 seconds]