This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-18
Channels
- # aws (3)
- # beginners (18)
- # boot (3)
- # cider (47)
- # clara (54)
- # cljs-dev (62)
- # clojure (104)
- # clojure-berlin (1)
- # clojure-denver (1)
- # clojure-italy (1)
- # clojure-nl (22)
- # clojure-russia (30)
- # clojure-spec (28)
- # clojure-uk (95)
- # clojurescript (31)
- # cloverage (1)
- # cursive (1)
- # datomic (17)
- # duct (4)
- # emacs (27)
- # fulcro (36)
- # graphql (1)
- # hoplon (1)
- # jobs-discuss (1)
- # lein-figwheel (1)
- # lumo (2)
- # off-topic (44)
- # om-next (5)
- # onyx (29)
- # precept (1)
- # re-frame (8)
- # reagent (7)
- # ring (1)
- # ring-swagger (2)
- # schema (4)
- # shadow-cljs (185)
- # spacemacs (21)
- # specter (59)
- # tools-deps (7)
- # vim (15)
- # yada (1)
So i'm not that familiar with socket programming, but i've gotten as far as an telnet echo server. However, i'm running into an issue with the first few socket inputs being clobbered with additional characters.
I always assumed that it was just a barebones socket reader, and wrote text to the output with a CRCF
https://stackoverflow.com/questions/3208993/odd-behavior-when-connecting-to-my-program
so telnet must be including some extra control characters in there that i'm not aware of
I got a socket repl working for my fif stack-based language https://i.imgur.com/Rwdh9eD.png
I basically stole the clojure.server implementation introduced recently and wrote something similar for fif
What i'm curious about is whether or not I could Create a native-image in graalvm which includes a fif socket repl as a means of controlling the software other than a clojure socket repl, which doesn't work due to invokeDynamic
from what I can tell, I don't think my scripting language makes use of anything dynamic
@benzap use netcat instead of telnet if youβre testing a plaintext socket implementation
I need to "update global players ranking" every 30 minutes. But I'm thinking in a auto-scale application, so quartz may be complex. If every 30 minutes "someone else" send a external HTTP request asking to update, will be way easier
I use SetCronJob for that
@souenzzo what do you mean?
(doto
(Thread.
(fn []
(while true
(update-ranking!)
(Thread/sleep (* 30 1000)))) ;; TODO: Check dominic's math
(.start))
@souenzzo would this work ^^ πQuartz is one option. The other is to spin this up as something that sits in a box that never "scales".
The benefit of having it on a box that doesn't scale is that it keeps the performance cost off your main handling machines. If it takes longer to generate the index for some reason, it shouldn't slow down the main service.
The load balancing algorithms aren't always aware of the CPU utilization of a node, I think round-robin is more common.
https://www.easycron.com/ <-- I think it was this one, or something very similar, that we used in the past.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html also CloudWatch can do a lot if you're using AWS already.
May I need to (re) configure this times at runtime. Maybe some "single call at this day" too