Can trinidad (running as a daemon) cope with multiple versions of rails (and rack)? - deployment

Forgive me if this is a silly question!
But to run trinidad as a daemon does it need to be in the system gems?
Or can you install just the daemon extension to the system gems?
If the former is true is it still possible to run different versions of rails?
My thinking is that Trinidad requires JRuby-Rack which requires Rack and naturally each version of Rails uses a differen version of Rack!
To put this into context i am considering using bundler's --deployment option to manage different versions of gems for each application.

I ended up emailing David Calavera (the project lead) about this.
TL;DR Yes ya can!
Here's his response:
Yes, you can. Trinidad uses different runtimes for each application, what in other servers is called "workers", and so each application runs in its own isolated jruby runtime.
Check the wiki to know how to load your apps:
https://github.com/trinidad/trinidad/wiki/advanced-configuration

Related

REST Server without GUI

I've started working with delphi quite some while ago but I would say I'm still a newbie in all this.
So basically I tried creating REST Server, which can validate license keys. I got in working with Indy, but one thing bothers me. The GUI. The Server shouldn't have any kind of gui so it can work on any OS (Win, Linux, etc). Is there a way to make a REST Server without any GUI/FMX/VCL?
BTW: Working in Delphi 10.2.3 Professional.
Any advice is appreciated.
EDIT: I forgot to mention one thing: the server is supposed to run on an independent Data Center away from any user.
You can create the WebServer as a Windows Service.
You can use DelphiMVCFramework or any other Framework to create it.
With DMVC you can create console application, Windows Service, Linux daemon, Apache module (Windows and Linux) and IIS ISAPI (Windows).
With Intraweb you can also create Services.
Take a look at our mORMot Open Source REST framework, which works on Delphi but also on FPC/Lazarus.
FPC support ensures that you can target Linux with this free compiler. No need to upgrade to a newer version of Delphi Architect, which supports Linux, and is very pricey - and less stable (to my knowledge) since Linux support is quite new.
As you requested, the mORMot REST server has no UI part. You define your services as interface and class - like you do e.g. with DotNet - and you will have full JSON/REST support generated.
mORMot is used on production since years for very high performance and stability, hosted on both Windows and Linux. A version 2 is on its way, which would be even easier to use for new projects.
And you can create a Windows service or Linux daemon without using any third party framework. Delphi include everything you need. However, it is possible that third party framework will facilitate your programming. Don't forget you'll have to learn those third party framework.
Creating a Linux daemon service in Delphi
Creating a Windows Service in Delphi
In both cases, you can use the sample code you've found that make use of TIdTCPServer.

Installer for Software? Paas?

currently I'm looking for an open source project that gives me the opportunity to install software easily. I prefer direct calls or access with a REST interface.
I thought that CloudFoundry would fits my needs but it is'nt so.
AppFog (https://www.appfog.com/product/) comes much closer to my goal. It allows me to install Drupal, Wordpress, PhpMyAdmin, NodeJS Apps and so on.
The conclusion is that I'm looking for an project that...
is open source.
gives that possibility to install, configure and
uninstall software
is extendable when a specific software not
available
is accessible with an interface like REST.
is "hostable" on my own linux server
I would be happy for all kind of hints and tips :)
Cheers Tobias
Docker is seems to be the next big thing in the PaaS world. There are dozens new projects that build on top of docker or supporting it. For example OpenShift and Apache Stratos support docker. So if you look at solutions based on docker you can find a solution for you needs.
Right now I'm using docker for hosting couple of Drupal websites with simple bash scripts to manage them. Nginx is used for web traffic routing
Docker is open source
Gives you ability to prepare and install apps
You can build what you need on top of it
It has REST interface
It is running on nearly all major Linux distros
Its relatively easy to learn and use
Has great community
Tobias,
Suggest you look at Apache Stratos:
100% open source
Easy to Get Up and Running
Highly extensible, flexible, expandable
Uses REST APIs
Runs on Linux (Ubuntu or SUSE)
Mature (version 4)
See:
Intro article -- "Why Apache Stratos is the Preferred Choice in the PaaS Space"
http://wso2.com/library/articles/2014/05/why-apache-stratos-is-the-preferred-choice-in-the-paas-space/
Apache Stratos Project site -- which notes that "Stratos PaaS is easy to get it up and running in quick time. A developer will be able to run and test PaaS framework on a single machine to try out."
http://stratos.apache.org/
Cheers,
Michael
OpenShift is what you looking for :
it is open source and free for 3 gears for ever.
gives that possibility to install, configure and uninstall software in openshift.redhat.com or in rhc client tools.
it is extendable when a specific software not available is accessible throw DIY(Do it yourself)
with an REST interface
is "hostable" on Fedora or CentOS .
It is really easy to setup throw Eclipse.

Update java with java?

I was looking around and couldn't find this anywhere, but is there any way to update the JRE through a java application and then to restart said application using the new JRE?
Updating the JRE from within a running Java app. is not something that is commonly done.
Instead look to deployJava.js for ensuring a particular major version of Java is installed, and Java Web Start for ensuring a particular micro-version is available.
These technologies are both related to launching rich clients (applets and desktop apps.) so if the app. has a GUI as mentioned here it should be 'all systems go'.

Rails 3.0.0 and FASTCGI Deployment Question

I currently have hostingrails.com. But following their tutorial on deploying rails application with FASTCGI is not quite working... So currently I'm hosting one of my apps with them using Thin.
Currently, my host says FASTCGI and Rails3 is not supported is this true?
Besides running mongrel,thin or passenger. What other options do I have with my host? They are telling me to develop in 2.3.8 if I want to use fastcgi, but I'm trying to move away from 2.3.8 and to rails 3.0.0.
Anyone have a better shared host? Basically what I am looking for is a shared host allowing me to host multiple rails 3.0.0 applications. I'm not expecting alot of usage but I'm looking to build like a portfolio of applications that I've made and would like them hosted on.
And with hosting rails i'm spending $7/month. I'm looking for something in this ball park or maybe a few more dollars. Thanks for your help.
I would recommend dreamhost. it is hands down the best shared host I have tried over the years, and they do support rails.
Not rails 3 though. I got it working using this http://blog.joeygeiger.com/2010/05/17/i-beat-dreamhost-how-to-really-get-rails-3-bundler-and-dreamhost-working/
Finally, there are things that you just can't do on a shared host. Keep in mind you can get a pretty decent vps (like linode 512) for 20$/mo

Best Practice: Erlang Application Deploy on windows

When deploying a ready to use erlang application I don't want the user to
Find the right erl release on the
internet.
Install the erl vm
unzip and decide a location for the beam files (with the application)
read a readme
modify anything that even looks like a config file
I have a couple of ideas of what could be a way but I would like to get some input.
SAE (stand-alone Erlang) used to be a pretty good solution for situations like you describe, but that no longer seems to be maintained.
Although I've never used it myself, CEAN seems like it might come close to what you want: it offers a self-extracting installer (though not for Windows at present) and the option to deliver a customized minimal Erlang framework.
There is also Erlware.
At our core we host public
repositories containing reliable
Erlang OTP-compliant applications. Our
repositories enable developers to use
software written by the Erlang
community and to publish and
distribute their own software.
It's more backend orient though, so not a complete solution.
The reltool application first released with Erlang R13B02 is aimed at solving this issue. Note that it is currently a beta release (version 0.5).