Fork me on GitHub
#fulcro
<
2018-02-14
>
tony.kay06:02:43

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.

okeydoke07:02:38

@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

maridonkers07:02:46

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.

levitanong08:02:28

~(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"])))

okeydoke01:02:50

Okay I'll give that a try tonight. Thanks guys