immutant

http://immutant.org Note: dev discussion happens in #immutant on FreeNode IRC.
2018-01-21T15:00:34.000130Z

@laujensen the links in the guides aren't consistent when read as source/from github, they are designed to be read from http://immutant.org/documentation/2.1.9/apidoc/guide-migration.html

2018-01-21T15:00:52.000088Z

are you migrating from 1.x?

2018-01-21T15:01:29.000001Z

Alright. Yeah Im trying to pull SabreCMS up from 1.1.4 to 2.19, just as a test. As Im reading the docs, the core functionality is easily moved by installing Wildfly, changing start to run, and compiling to a war right?

2018-01-21T15:04:46.000056Z

for web, yes, though depending on what options you are using, you may run in to issues. And you'll need to use lein-immutant to create that war: http://immutant.org/documentation/2.1.9/apidoc/guide-wildfly.html

2018-01-21T15:05:11.000002Z

Yeah I just updated the plugin in and was surprised to see all my deploy, run, server, etc options were gone 🙂

2018-01-21T15:06:21.000076Z

yep, with 2.0 we decided to back away from managing the container for you, since you have to have knowledge about how to configure/manage WildFly anyway to use it properly in production

2018-01-21T15:06:45.000109Z

But @tcrawley, since you're here. The reason I started reviewing our architecture, is because we have a handler that responds in 3msecs, but when I query the page it emits, there's a wait between connection handshake and transmission of 100msecs. Do you know if thats from nginx, jboss/immutant or ring?

2018-01-21T15:08:58.000096Z

Hmm, I don't know where that could be. Can you hit jboss/immutant directly to eliminate nginx as a cause?

2018-01-21T15:09:16.000098Z

Maybe, but I hit nginx directly and there's no wait

2018-01-21T15:09:36.000060Z

Ist borderline nitpicking, I think Sabre is now the fastest CMS in the world, but I'd still like it to be faster

2018-01-21T15:10:00.000080Z

is it just one handler that is slow?

2018-01-21T15:11:09.000110Z

No its everything. I just highlight that because its consitently 3msecs, so I know it cant be it

2018-01-21T15:14:10.000081Z

I know there's some overhead of servlet handing in jboss, but it shouldn't be that high I don't think. I do know that wildfly + immutant 2 would be faster, and immutant 2 standalone (w/o wildfly) is even faster, if using that is an option for you

2018-01-21T15:14:44.000095Z

I wasnt aware of a version2 without wildfly, have a link? I'll test it out

2018-01-21T15:16:28.000116Z

running Immutant w/o the container is now the default (and most commonly used) way to do it. See http://immutant.org/documentation/2.1.9/apidoc/guide-installation.html for a walkthrough, and I'm happy to answer any other questions

2018-01-21T15:17:06.000052Z

Thanks! So ideally, thats my setup for dev, and on the servers I'll set up Wildfly containers for easier management right?

2018-01-21T15:18:04.000127Z

it depends - do you deploy multiple instances in the same wildfly? If not, you may not need WildFly in there at all, just an uberjar

2018-01-21T15:18:22.000128Z

are you using more services than web?

2018-01-21T15:18:38.000027Z

but yes, you should be able to dev locally w/o WF

2018-01-21T15:18:41.000040Z

Ok - Ive never used wildfly before. We're looking to move to AWS where multiple, but separate, shards of the app will be started. I dont think we need any added management for that

2018-01-21T15:18:44.000117Z

even if you deploy to it

2018-01-21T15:18:53.000003Z

Currently just web. Have been looking at messaging

2018-01-21T15:19:12.000099Z

Did you link the right page? Its mostly about Wildfly

2018-01-21T15:19:28.000088Z

WildFly is just JBoss AS renamed, so should be familiar

2018-01-21T15:19:35.000020Z

ah

2018-01-21T15:20:50.000058Z

http://immutant.org/documentation/2.1.9/apidoc/guide-installation.html? It mentions WildFly briefly, but the important section there is the one talking about running from a :main

2018-01-21T15:22:03.000069Z

basically, you just create a -main function that calls immutant.web/run, set that as your :main in project.clj, then call lein run. No WildFly required

2018-01-21T15:22:09.000024Z

or call that main from the repl

2018-01-21T16:10:49.000046Z

Ok thanks @tcrawley - Thats every similar to how 1.1.4 is structured

2018-01-21T16:27:39.000059Z

@tcrawley So I wrapped my call to web/run in a (defn -main [] (web/run routes)) and added that + deps to project.clj. Everything seems to boot, even from the main namespace (ie Im seeing services start), but then the log just says Cannot find anything to run for :main

2018-01-21T16:27:43.000083Z

Does that make sense to you?

2018-01-21T16:31:15.000088Z

That doesn't ring a bell. how are you starting it? and what does the :main entry in project.clj look like?

2018-01-21T16:31:36.000156Z

:main immutant.init/main

2018-01-21T16:31:50.000092Z

(ns immutant.init
  (:use tigerbyte.core)
  (:require
   [immutant.web :as web])
  (:gen-class))

(defn -main
  []
  (web/run "/" routes))

2018-01-21T16:33:20.000114Z

you're seeing services start - does that mean that undertow is starting on 8080 even with that message?

2018-01-21T16:33:31.000093Z

and is that message part of an exception that causes the app to exit?

2018-01-21T16:33:39.000049Z

I'll have a log. I see also logging has been set to DEBUG so Datomic is cluttering the logs

2018-01-21T16:34:27.000075Z

All handlers are timing out, but server is still running

2018-01-21T16:36:12.000008Z

ah, logging. that's always fun. You may have to adjust the configuration to hide those DEBUG messages. See http://immutant.org/documentation/2.1.9/apidoc/guide-logging.html#h3339

2018-01-21T16:36:46.000042Z

can you share the full log output? you can send that to me privately if need be

2018-01-21T16:39:28.000087Z

Yes, one quick before: Is the util namespace in its own dependency ?

2018-01-21T16:41:09.000089Z

immutant.util is in org.immutant/core, which should be brought in transitively by org.immutant/web