This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-14
Channels
- # beginners (19)
- # boot (11)
- # cider (59)
- # cljs-dev (292)
- # cljsrn (2)
- # clojure (121)
- # clojure-brasil (19)
- # clojure-canada (2)
- # clojure-france (2)
- # clojure-italy (57)
- # clojure-spec (54)
- # clojure-uk (20)
- # clojurescript (83)
- # core-async (20)
- # cursive (5)
- # datascript (2)
- # datomic (10)
- # duct (25)
- # editors (4)
- # emacs (2)
- # fulcro (5)
- # funcool (1)
- # graphql (2)
- # immutant (8)
- # java (1)
- # jobs (4)
- # jvm (1)
- # keechma (5)
- # luminus (10)
- # off-topic (113)
- # om (36)
- # onyx (11)
- # parinfer (55)
- # pedestal (7)
- # protorepl (28)
- # re-frame (25)
- # reagent (6)
- # ring-swagger (1)
- # shadow-cljs (113)
- # spacemacs (1)
- # specter (23)
- # unrepl (8)
- # yada (8)
So, I’m reworking a bit of the networking internals on client. I’ve got it mostly coded and am in testing now. The new client-side networking brings a feature I’ve been needing to add for a long time: network request cancelling. In the process, since I was already in there, I wanted to add a few other things that are nice to have: - A generalized progress update mechanism for mutations. This allows a mutation that does a heavy send (like a file upload) to request progress updates at the mutation layer instead of having to write custom networking code. - Aborts on load and mutations - Request/response middleware, like Ring, but for the client networking. This allows you to plug in things like REST conversion middleware, again without having to write a network implementation. There are a few missing pieces to make it all work perfectly, but a lot of it is already working and up as 2.3.0-SNAPSHOT, with developer guide updates (partial) on the feature/load-cancel branch.
@levitanong ah okay. What options are needed? I'm pretty new to java/clojure. I upgraded to java 9 and can't run demo any more
You can also install a dedicated, 'independent' Java (8) installation and select it via environment variable JAVA_HOME, plus extend PATH with JAVA_HOME/bin. Then everything works.
~(concat
;; Normal JVM opts to pass in
["-XX:-OmitStackTraceInFastThrow"
"-client"
"-XX:+TieredCompilation"
"-XX:TieredStopAtLevel=1"
"-Xmx1g"
"-XX:+CMSClassUnloadingEnabled"
"-Xverify:none"]
;; Java 9+ recognition, adding --add-modules. Java versions before 9
;; had a different version syntax where they contained '.' delimiters,
;; from Java 9 onwards it has a simple versioning scheme based on one
;; number.
(let [version (System/getProperty "java.version")
[major _ _] (clojure.string/split version #"\.")]
(if (>= (Integer. major) 9)
["--add-modules" "java.xml.bind"]
;; The below is usually present, but is deprecated in java 9
["-XX:+UseConcMarkSweepGC"])))