There are a number of application that work well on there own and are great for the purpose they are designed for. However everything links together some how and understanding how applications work on their own is only the start of things.
Whilst I have been learning about a number new applications, I have also been looking at how applications can work with each other to give an end to end feel of how certain Internet businesses or back end technologies really work.
There are hundreds or some times thousands of different way in which applications can link with each other within a business or over the Internet. Whether it be using a different storage database at the back end or it be writing a front end client in a different language, I have been documenting a number of working solutions already in my blog http://vidorsolutions.com
Some of the technologies I have learnt and experimented successfully with are as follows:
1. Grails application deployed into Glassfish application server, using PostgreSQL as a database. Then using tools such as PGAdmin to connect to my databases locally on my machine.
2. Ejabberd Instant Messaging server installed on a server instance in the cloud, configured to use postgreSQL as a data source. Then using PSI Desktop chat client to connect with Ejabberd account. Tools such as PGAdmin can also be used here to view the back end database, tables and structure.
To further extend this learning experience I then created a basic Android XMPP client application that could also connect to the Ejabberd Server instance.
A lot of different technologies going on here and a lot to learn about the applications alone if you've never used any of these. However once you see how all these work together you get a greater appreciation of how the end to end user experience works.
Remember for some instructions on how to use these check out my previous posts
http://vidorsolutions.com
Showing posts with label glassfish. Show all posts
Showing posts with label glassfish. Show all posts
Wednesday, 19 January 2011
Sunday, 2 January 2011
Installing GlassFish application Server cluster on Linux
GlassFish is a Java EE open source application server. The following instructions demonstrate how to install GlassFish 2.1.1 on any Linux platform.
http://glassfish.java.net/javaee5/build/GlassFish_LB_Cluster.html contains full information on downloading and installing glassfish clusters and load balancer plugin.
I am going to explain the steps I took to install glassfish clusters as I didn't require load balance support.
Please note all commands will require elevated privileges.
1. Download binary installer from http://glassfish.java.net/downloads/v2.1.1-final.html
save to /opt directory.
2. Ensure JAVA_HOME variable is set to JDK directory
3. Within the /opt directory run java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-linux.jar
INSTALLATION COMPLETE is displayed
This UN-bundles glassfish and installs under a new directory 'glassfish'
4. Change to glassfish directory cd glassfish/
5. Change permissions on lib/ant/bin sub directory using chmod -R +x lib/ant/bin
6. Run lib/ant/bin/ant -f setup-cluster.xml . If successful you get BUILD SUCCESSFUL displayed
7. From /opt/glassfish/bin run ./asadmin start-domain domain1 to start to default domain.
Domain [domain1] is running is displayed
8. Browse to http://localhost:8080/ to confirm Enterprise server is now running.
9. Browse to http://localhost:4848/ to access admin console. Default user name and password are username: admin, password: adminadmin . You can change this from the Application Server settings on the web admin interface page.
The server is now running and now we are going to look at creating a one machine cluster.
10. Change to directory /opt/glassfish/samples/quickstart/clusterjsp
Run /opt/glassfish/bin/asant setup-one-machine-cluster
This does the following:
Creates a cluster with name cluster1
Creates a node-agent with name cluster1-nodeagent
Starts the above
Creates two instances under the cluster
You can change these default values under /opt/glassfish/samples/quickstart/clusterjsp/cluster.properties before running
BUILD SUCCESSFUL is displayed
12. Start the cluster using glassfish/bin/asant start_cluster
BUILD SUCCESSFUL is displayed again
13. View and confirm node with two instances is setup from http://localhost:4848/ select node agent then cluster1-nodeagent on the left pane
If you need to test the two instances you can simply deploy an application in glassfish and browse to the instance using http:localhost:PORT/appname
If you continue reading the link below you can learn how to use the load balancer plugin and set up Sun Java System Web Server for this.
http://glassfish.java.net/javaee5/build/GlassFish_LB_Cluster.html
http://docs.sun.com/app/docs/doc/821-0186/aboaa?a=view - also a useful link for getting started
http://glassfish.java.net/javaee5/build/GlassFish_LB_Cluster.html contains full information on downloading and installing glassfish clusters and load balancer plugin.
I am going to explain the steps I took to install glassfish clusters as I didn't require load balance support.
Please note all commands will require elevated privileges.
1. Download binary installer from http://glassfish.java.net/downloads/v2.1.1-final.html
save to /opt directory.
2. Ensure JAVA_HOME variable is set to JDK directory
3. Within the /opt directory run java -Xmx256m -jar glassfish-installer-v2.1.1-b31g-linux.jar
INSTALLATION COMPLETE is displayed
This UN-bundles glassfish and installs under a new directory 'glassfish'
4. Change to glassfish directory cd glassfish/
5. Change permissions on lib/ant/bin sub directory using chmod -R +x lib/ant/bin
6. Run lib/ant/bin/ant -f setup-cluster.xml . If successful you get BUILD SUCCESSFUL displayed
7. From /opt/glassfish/bin run ./asadmin start-domain domain1 to start to default domain.
Domain [domain1] is running is displayed
8. Browse to http://localhost:8080/ to confirm Enterprise server is now running.
9. Browse to http://localhost:4848/ to access admin console. Default user name and password are username: admin, password: adminadmin . You can change this from the Application Server settings on the web admin interface page.
The server is now running and now we are going to look at creating a one machine cluster.
10. Change to directory /opt/glassfish/samples/quickstart/clusterjsp
Run /opt/glassfish/bin/asant setup-one-machine-cluster
This does the following:
Creates a cluster with name cluster1
Creates a node-agent with name cluster1-nodeagent
Starts the above
Creates two instances under the cluster
You can change these default values under /opt/glassfish/samples/quickstart/clusterjsp/cluster.properties before running
BUILD SUCCESSFUL is displayed
12. Start the cluster using glassfish/bin/asant start_cluster
BUILD SUCCESSFUL is displayed again
13. View and confirm node with two instances is setup from http://localhost:4848/ select node agent then cluster1-nodeagent on the left pane
If you need to test the two instances you can simply deploy an application in glassfish and browse to the instance using http:localhost:PORT/appname
If you continue reading the link below you can learn how to use the load balancer plugin and set up Sun Java System Web Server for this.
http://glassfish.java.net/javaee5/build/GlassFish_LB_Cluster.html
http://docs.sun.com/app/docs/doc/821-0186/aboaa?a=view - also a useful link for getting started
Labels:
application server,
cluster,
glassfish,
installation,
java,
load balance,
SDK,
server
Subscribe to:
Posts (Atom)