I’ve a light weight snippets service that wrote. I use it almost daily, so it’s a live tool, but I also use it as a test bed, when applicable, for applying tech I’m trying to pick up. Currently I’ve been using JBoss EAP professionally and so I was curious about Wildfly, which is JBoss’ project for rightsizing your web container. To give Wildfly a go I decided to get my snippets service up in it. Currently the service is very low impact, based on Jetty and Spark, with a disk footprint of about 14M. I was eager to see what Firefly would make of it.
Making The Switch
Right off I was pushed towards taking a step back – Maven. Gradle is my build tool of choice, but Wildfly was pretty biased towards Maven. All the examples, and the supported plugin were for Maven. No doubt I could have worked out the Gradle path, but this was just a proof of concept and I didn’t want to commit too much effort to it.
Next set of issues were around getting Spark running in Wildfly. I’m a fan of Spark and love it for creating small RESTful services. Spark offered documents for running in “Other web server[s]”. But the notes were terse and very generic. JBoss, and so Wildfly do things a tad differently than the norm in terms of configuration. With the application of some duct tape and bailing wire I got those issues worked out.
And then…. flatline. Spark’s mechanism for serving static content didn’t work with content in Wildfly’s fat jar. Okay worked that out with a bit of tweaking and global replace. That got it working. The last hurdle would be to rethink how I configured the service which would need to change a fair bit for Wildfly. But before I did that I decided to take a look at how big the “rightsized” jar was. So the Wildfly swarm jar was 105M …. fail.
I decided to stop there.
Wildfly is okay. The tools work and it’s not too hard to get things going. It’s simpler than trying to right size JBoss on your own certainly. That said, if you want a light weight service, and you’re not dependant on JBoss specifically, I wouldn’t advocate Wildfly.