Apache + Tomcat + ColdFusion + Java

Written on 20 March 2015, 09:24am

Tagged with: , , , ,

Below is a simple ColdFusion application architecture using Apache as web server and Tomcat as JEE application server.

1. Request workflow

Apache: In the Apache configuration file we have a virtual host <VirtualHost host1:80> with DocumentRoot /var/www/theColdFusionApp
Apache receives the request – example: http://123.45.67.89:80.
Hosts file: In /etc/hosts the host host1 is associated with the IP: 123.45.67.89 host1
AJP module: If there is a non-CF request, Apache serves the request itself (ex. html, css, js, image). If there is a CFM request, the AJP module forwards it to Tomcat: ProxyPassMatch ^/(.*\.(cf[cm]|cfml))$ ajp://host1:8080/$1 (Apache config file)
Tomcat has an AJP connector on that port: <Connector port="8080" protocol="AJP/1.3"/>
and an engine to process the requests:

<Engine name="Catalina" defaultHost="host1">
 <Host name="host1"  appBase="webapps">
    <Context path="" docBase="/var/www/theColdFusionApp/"/>
 </Host>

Both entries above are in the Tomcat server.xml config file.
Application folders: In /var/www/theColdFusionApp we have both the CF files (WEB-INF and CFIDE folders) and the actual application folders. More details below.

2. Folder structure and configuration files

(more…)

Random things #8

Written on 18 March 2015, 10:28pm

Tagged with: , , , , ,

A/B vs Multivariate Testing

A/B testing: two versions (A and B) are compared, which are identical except for one variation that might affect a user’s behavior. Total number of variations: 2. More
Multivariate testing: multiple variables are modified for testing a hypothesis. The goal of multivariate testing is to determine which combination of variations performs the best out of all of the possible combinations. [Total # of Variations] = [# of Variations on Element A] X [# of Variations on Element B] ... More

Permutations, Arrangements, Combinations

Given a set of n elements (ex – for n=3, the set is A, B, C)
Permutations: each ordered set of n elements P(n) = n!
In our example with n=3, P(3)=3!=6: АВС, АСВ, ВАС, ВСА, САВ, СВА
Arrangements: each ordered set of k elements A(n,k) = n! / (n-k)!
In our example with n=3, ordered pairs of 2, A(3,2)=3!/(3-2)!=6: AB, BA, AC, CA, BC, CB
Combinations: each unordered set of k elements C(n,k) = n! / k! (n-k)!
In our example with n=3, un-ordered pairs of 2, C(3,2)=3!/2!*1!=3: AB, AC, BC
And the relationship between P, A, C: C=A/P
Remember that for the permutations you don’t need a k! More

About learning

Learning isn’t done to you, it’s something you do. You need to take responsibility of your education. There will always be a new technology to learn, but this is not that important. Is the constant learning that counts.
Andy Hunt – Pragmatic Thinking and Learning

We all tend to learn best by doing and teaching. Active learning is a much more effective way to learn than any other way.
It seems a bit strange, but it should really be no surprise that play is a powerful mechanism for learning. […] This simple process that comes natural to us all, but somehow gets “taught” out of us, is the simplest and purest way to learn.
John Sonmez – Soft Skills

Random links:

(more…)