{"action":"created","issue":{"url":"https://api.github.com/repos/jmvanel/semantic_forms/issues/197","repository_url":"https://api.github.com/repos/jmvanel/semantic_forms","labels_url":"https://api.github.com/repos/jmvanel/semantic_forms/issues/197/labels{/name}","comments_url":"https://api.github.com/repos/jmvanel/semantic_forms/issues/197/comments","events_url":"https://api.github.com/repos/jmvanel/semantic_forms/issues/197/events","html_url":"https://github.com/jmvanel/semantic_forms/issues/197","id":370633800,"node_id":"MDU6SXNzdWUzNzA2MzM4MDA=","number":197,"title":"Please support JWSGI","user":{"login":"jonassmedegaard","id":607476,"node_id":"MDQ6VXNlcjYwNzQ3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/607476?v=4","gravatar_id":"","url":"https://api.github.com/users/jonassmedegaard","html_url":"https://github.com/jonassmedegaard","followers_url":"https://api.github.com/users/jonassmedegaard/followers","following_url":"https://api.github.com/users/jonassmedegaard/following{/other_user}","gists_url":"https://api.github.com/users/jonassmedegaard/gists{/gist_id}","starred_url":"https://api.github.com/users/jonassmedegaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonassmedegaard/subscriptions","organizations_url":"https://api.github.com/users/jonassmedegaard/orgs","repos_url":"https://api.github.com/users/jonassmedegaard/repos","events_url":"https://api.github.com/users/jonassmedegaard/events{/privacy}","received_events_url":"https://api.github.com/users/jonassmedegaard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-16T14:13:33Z","updated_at":"2018-10-17T08:29:41Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nPlease consider provide integration with the pseudo standard JWSGI, as that would help streamlined deployment of your tool: https://uwsgi-docs.readthedocs.io/en/latest/JWSGI.html"},"comment":{"url":"https://api.github.com/repos/jmvanel/semantic_forms/issues/comments/430537962","html_url":"https://github.com/jmvanel/semantic_forms/issues/197#issuecomment-430537962","issue_url":"https://api.github.com/repos/jmvanel/semantic_forms/issues/197","id":430537962,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDUzNzk2Mg==","user":{"login":"jonassmedegaard","id":607476,"node_id":"MDQ6VXNlcjYwNzQ3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/607476?v=4","gravatar_id":"","url":"https://api.github.com/users/jonassmedegaard","html_url":"https://github.com/jonassmedegaard","followers_url":"https://api.github.com/users/jonassmedegaard/followers","following_url":"https://api.github.com/users/jonassmedegaard/following{/other_user}","gists_url":"https://api.github.com/users/jonassmedegaard/gists{/gist_id}","starred_url":"https://api.github.com/users/jonassmedegaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonassmedegaard/subscriptions","organizations_url":"https://api.github.com/users/jonassmedegaard/orgs","repos_url":"https://api.github.com/users/jonassmedegaard/repos","events_url":"https://api.github.com/users/jonassmedegaard/events{/privacy}","received_events_url":"https://api.github.com/users/jonassmedegaard/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T08:29:41Z","updated_at":"2018-10-17T08:29:41Z","author_association":"NONE","body":"I recenly volunteered to help maintain a server which involves a few instanced of semantic forms.\r\nCurrently, those instances are started by running (adaptations of) scala/forms_play/dist/scripts/start.sh manually after each bootup of the system. I would like to streamline to have them started automatically, and restarted automatically if they for stop reason crash or hang or in other ways start behaving unusual regarding the resources of the system, and save logfiles that gets automatically logrotated, and allow me to optionally put the daemons on standby for instances that are only infrequently used.\r\nIn other words, I would like to have those instances supervised, and I would prefer doing so with the lightweight supervising framework uWSGI.\r\n\r\nI believe what should be implemented is documented in at the bottom of the page I pointed to already - i.e. more specifically at https://uwsgi-docs.readthedocs.io/en/latest/JWSGI.html#jwsgi-and-scala\r\n\r\nOne way to test that it works is to load it in uwsgi together with a http server plugin.\r\nWith this code (copied from above example):\r\n```scala\r\nobject HelloWorld {\r\n     def application(env:java.util.HashMap[String, Object]): Array[Object] = {\r\n             val headers = new java.util.HashMap[String, Object]() {\r\n                     put(\"Content-Type\", \"text/html\")\r\n                     put(\"Server\", Array(\"uWSGI\", \"Unbit\"))\r\n             }\r\n             return Array(200:java.lang.Integer, headers , \"Hello World\")\r\n     }\r\n}\r\n```\r\n...compiled and loaded like this:\r\n```bash\r\nsudo apt install wget scala openjdk-11-jdk-headless uwsgi-core uwsgi-plugin-jwsgi-openjdk-11\r\nwget https://raw.githubusercontent.com/unbit/uwsgi/master/plugins/jvm/uwsgi.java\r\njavac uwsgi.java\r\nscalac demo.scala\r\nuwsgi --plugins http,jvm,jwsgi --http :8080 --http-modifier1 8 --http-modifier2 0 --jvm-classpath /usr/share/java/scala-library.jar --jwsgi HelloWorld:application --threads 40\r\n```\r\n\r\n...you can access the Scala code by accessing http://localhost:8080/\r\n\r\nNB! Above uses packages in unstable Debian sid - adapt package names for other releases, e.g. openjdk-8 for the currently stable Debian stretch.\r\n\r\n(need for custom-compiling uwsgi class is [a bug in Debian](https://bugs.debian.org/911217))"}}
{"actor":{"display_login":"jonassmedegaard"}}