Trinidad 0.8, gem extensions and database pooling
Posted in Original Content by David Cavalero - last update: Dec 20, 2023
If you arrive on this page - you were probably following a link. This page was created by David Cavalera, who no longer owns this domain. It is still linked/indexed - so I decided to keep it online
You can find David on Twitter/X or LinkedIn
Original version of this page can still be found on the internet archive.
<Original content below:>
I think, the release of the latest version of JRuby-Rack was the perfect moment to do a new release of Trinidad and some new features. If this is the first time you bump into Trinidad, it’s a Rack compatible server build on top of Apache Tomcat and release as a rubygem.
One of my main concerns about the project was that I wanted to build a lightweight gem and until now you had to download more than 5Mb with each release. The first step to avoid this was to split the gem in two, the main gem, trinidad, is now 12Kb, while the jars gem, trinidad_jars is just 3Mb, thus if I don’t change the jars you’ll just need to download 12Kb with each new release.
The second step is to stop adding features to the main gem. With each new feature that I wanted to implement more jar files were required and added to the package. Now Trinidad includes a little extensions api that allows to release features as little gems out of the core, you can find more details on the api into the wiki. So, from now I’ll try to release new features as extensions and leave the core as tiny as possible.
The first extension that I’ve written adds support for database connection pooling through Tomcat and JNDI. The project is also hosted on github, and the installation and configuration are pretty straightforward.
Finally, an extra point. Of course, the coolest new feature is the Rails 3 support due to JRuby-rack already supports it, and, as you’ll probably know, Rails 3 routes allow to split your application in several ones and route between each other. Just remember that Trinidad also allows you to run all those distributed applications within the same container with just a few configuration lines.
All in all, if you find a bug or you’d like to see other new features, please don’t hesitate filing an issue in the project’s tracker.
<End or original content>
Other articles