Re: Deploying multiple Clojure apps on one server using Reagent, Nginx, and Supervisor (Solved)
If you're using ring, you can use the lein-ring plugin to build the uberwar: simply `lein ring uberwar`. Check out the README for options if you need to deviate from the defaults: https://github.com/weavejester/lein-ring You'll end up with an uberwar for each application you want to deploy. These have to be deployed to a servlet container; there are several options here, but jetty is a popular choice. This tutorial looks helpful: https://github.com/ddellacosta/Clojure-under-Jetty-and-Apache On 7 January 2017 at 00:01, Seth Archambault wrote: > Thanks! Sounds like multiple war files would be the right way for me. > Unfortunately, I'm falling into the original problem with finding > information on how to do this... > > Got any links to articles on how to do this? > Thanks! > > > On Tuesday, January 3, 2017 at 7:12:54 PM UTC-5, Sean Corfield wrote: >> >> 1GB is certainly pretty small for the JVM world, if you’re thinking of >> running multiple apps / sites as separate JVM processes. >> >> >> >> However, there are several ways around that. >> >> >> >> It’s common in the JVM world to have a single “web server” process load >> and run multiple “web applications”. A servlet container (Tomcat, Jetty, >> JBoss…) runs multiple apps each packaged as a WAR file (a zip file with >> some additional metadata). >> >> >> >> Another option is to package multiple applications into one uberjar and >> start up multiple apps on different ports directly inside your own code, or >> you could use a single app with middleware that selects a different set of >> routes for each different domain / port / however you distinguish between >> your apps externally. >> >> >> >> Bottom line: having each app as a separate uberjar, spinning up in a >> separate JVM isn’t the most scalable way of running multiple apps on a >> single server. >> >> >> >> For comparison, at World Singles, we have about 100 sites running on (a >> cluster of instances of) a single web application under the hood. The >> domain being requested determines how the request is handled – in our case >> the skin and theme of each site, along with a lot of other metadata, is all >> dynamic and based on the domain name. Our sites are similar enough that >> this is possible. That’s for the main customer-facing sites. We also have >> an affiliate web site and an internal admin web site. Those three codebases >> are each, essentially, a WAR-based app and all three can run on a single >> Tomcat instance (on each server in the cluster). We run a single JVM with >> 10GB heap configured for Tomcat on each of a cluster of servers, each with >> 64GB RAM (our database servers are in a separate cluster and have 128GB RAM >> each, I believe). >> >> >> >> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN >> An Architect's View -- http://corfield.org/ >> >> "If you're not annoying somebody, you're not really alive." >> -- Margaret Atwood >> >> >> >> On 1/3/17, 2:16 PM, "Seth Archambault" > behalf of seth...@gmail.com> wrote: >> >> >> >> Haha thanks for pointing that out - I mispoke - 1024 mb of ram - 1 gig of >> ram. Using a $10 a month Vultr account. 1000 gigs would be a tad expensive! >> >> On Monday, January 2, 2017 at 8:27:19 PM UTC-5, William la Forge wrote: >> >> Seth, something seems amiss. 1,000 GB is 1,000,000 MB. At 84 mb per jar, >> you can spin up 11,904 jar files. Which is worse than only being able to >> run only dozens of PHP apps. >> >> >> >> --b >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+u...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> >> -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to
Re: cljc aot compilation fails on Windows
I guess not many people are using Windows then :) I just tried that same project on a Mac VM with case insensitive file system, where it worked flawless. Maybe someone has an idea how to investigate further? Thanks, Torsten. Am Montag, 2. Januar 2017 11:11:42 UTC+1 schrieb Torsten Uhlmann: > > Hi, > > I was trying to build my ClojureScript project on Windows 10 instead of > Linux or Mac, and I run into this problem. > > When running "lein uberjar" with ":aot :all" for every cljc file I have > in my project it reports something like: > > Reloading Clojure file "\robur\middleware.cljc" failed. > java.lang.NoClassDefFoundError: \robur\middleware__init (wrong name: > robur/middleware__init) > > At first I thought that's the known problem with case insensitive file > names, but I don't have functions that only differ in the case, and that > error seems to indicate something's wrong with the "__init" class, which > seems auto generated by Clojure. > > Looking into my "target/classes" directory a file named " > middleware__init.class" does exist, on Windows as well as Unix. Both have > the exact same size. > > I'm using leiningen 2.7.1 and my project uses clojure 1.8.0 > > Did anyone run into similar problems before? > > Thanks, > Torsten. > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: cljc aot compilation fails on Windows
You will eventually have to whittle it down to a minimal, reproducible case and file it in Jira. But if you are inclined first to entertain some wild and irresponsible speculation, then perhaps the problem might be related to the fix for CLJ-703, and it would work better to use the Clojure 1.7 compiler? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: cljc aot compilation fails on Windows
The "Reloading Clojure file" message is not coming from Clojure or ClojureScript - that must be coming from Leiningen or a lein plugin. Is that "wrong name" part in the actual error or is that something you added? Again, that doesn't seem like something from the language but from the tooling. On Monday, January 2, 2017 at 4:11:42 AM UTC-6, Torsten Uhlmann wrote: > > Hi, > > I was trying to build my ClojureScript project on Windows 10 instead of > Linux or Mac, and I run into this problem. > > When running "lein uberjar" with ":aot :all" for every cljc file I have > in my project it reports something like: > > Reloading Clojure file "\robur\middleware.cljc" failed. > java.lang.NoClassDefFoundError: \robur\middleware__init (wrong name: > robur/middleware__init) > > At first I thought that's the known problem with case insensitive file > names, but I don't have functions that only differ in the case, and that > error seems to indicate something's wrong with the "__init" class, which > seems auto generated by Clojure. > > Looking into my "target/classes" directory a file named " > middleware__init.class" does exist, on Windows as well as Unix. Both have > the exact same size. > > I'm using leiningen 2.7.1 and my project uses clojure 1.8.0 > > Did anyone run into similar problems before? > > Thanks, > Torsten. > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: cljc aot compilation fails on Windows
I think it's unlikely that this has to do with CLJ-703. But certainly, if you could find a version that doesn't exhibit the problem that would be interesting. On Saturday, January 7, 2017 at 3:11:37 PM UTC-6, Matching Socks wrote: > > You will eventually have to whittle it down to a minimal, reproducible > case and file it in Jira. But if you are inclined first to entertain some > wild and irresponsible speculation, then perhaps the problem might be > related to the fix for CLJ-703, and it would work better to use the Clojure > 1.7 compiler? > > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ANN] cloure.math.combinatorics 0.1.4 (with clojurescript support)
https://github.com/clojure/math.combinatorics clojure.math.combinatorics is a Clojure contrib library for generating permutations, combinations, subsets, selections, and partitions of collections. The new release uses cljc files to provide cross-platform support for Clojure 1.7 and up, and has been tested with the latest stable release of Clojurescript. If you are still using Clojure 1.2 - 1.6, you'll need to stick with combinatorics version 0.1.3. Thanks to Alex Miller for upgrading the contrib infrastructure to support cljc builds. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: cljc aot compilation fails on Windows
I found it, thanks for re-motivating me! While preparing a minimal example I found that the error does not occur when using cljc and clj files, it only occured when adding cljs and lein-cljsbuild to the mix. The "wong name" was part of the error message @Alex. I was using lein-cljsbuild 1.1.4. After updating it to 1.1.5 the problem was resolved! So, it was an interaction with the cljs builder, using the latest version of the plugin resolved the issue. Thanks, Torsten. Matching Socks schrieb am Sa., 7. Jan. 2017 um 22:11 Uhr: > You will eventually have to whittle it down to a minimal, reproducible > case and file it in Jira. But if you are inclined first to entertain some > wild and irresponsible speculation, then perhaps the problem might be > related to the fix for CLJ-703, and it would work better to use the Clojure > 1.7 compiler? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- AGYNAMIX(R). Passionate Software. Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim Phone: +49 3721 273445 Fax: +49 3721 273446 Mobile:+49 151 12412427 Web: http://www.agynamix.de -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: cljc aot compilation fails on Windows
I found it, thanks for re-motivating me! While preparing a minimal example I found that the error does not occur when using cljc and clj files, it only occured when adding cljs and lein-cljsbuild to the mix. The "wong name" was part of the error message @Alex. I was using lein-cljsbuild 1.1.4. After updating it to 1.1.5 the problem was resolved! So, it was an interaction with the cljs builder, using the latest version of the plugin resolved the issue. Thanks, Torsten. Am Samstag, 7. Januar 2017 23:15:49 UTC+1 schrieb Alex Miller: > > I think it's unlikely that this has to do with CLJ-703. But certainly, if > you could find a version that doesn't exhibit the problem that would be > interesting. > > On Saturday, January 7, 2017 at 3:11:37 PM UTC-6, Matching Socks wrote: >> >> You will eventually have to whittle it down to a minimal, reproducible >> case and file it in Jira. But if you are inclined first to entertain some >> wild and irresponsible speculation, then perhaps the problem might be >> related to the fix for CLJ-703, and it would work better to use the Clojure >> 1.7 compiler? >> >> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
New to Clojure - productivity and debugging with Emacs
Hi everyone I am a rather unexperienced Clojure user, so please bear with me. I am developing a web app using popular libraries such as ring, compojure, liberator and friend to handle routing, content negotiation and authentication. There is quite a lot of map manipulation going on with the request and response maps. To me, as an unexperienced Clojure user, the content of these maps is not very transparent as I code. What I am trying to say is that I find it difficult to know exactly what to expect from these libraries and many other, unless, of course, I read and understand their source. That is a challenge in its own right for a less advanced programmer such as myself. I am using various Emacs packages for productivity (see below), and while they are very helpful, the code is still not as transparent to me as a strongly typed language, where the IDE shows you exactly what type of data a function returns. Part of the problem is probably that I am only using a fraction of the functionality that these plugins provide or don't use the functionality properly: - clojure-mode - cider - paredit - rainbow-delimiters - rainbow-mode - eldoc - web-mode - clj-refactor Questions: Based on the above, could you perhaps suggest any functionality in these or other packages, which could make the interaction (in lack of a better word) with other libraries more transparent to me? Also, can you tell me if it is possible to debug a running Clojure web app with Ciders debugging feature, or something similar (with break points etc.)? So far I have only been able to use Ciders debugging feature on code running in my local REPL. Therefore, since I am developing a web app, I need to call my functions with mock requests. Best regards ahawk -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.