Cloud Zone is brought to you in partnership with:

Marina Sprava, Public Relations manager at Jelastic since October 2011, has technical engineering background in systems of control and automation. Scientific interests: cloud computing, cloud hosting, agile methodologies and medical imaging. Marina is a DZone MVB and is not an employee of DZone and has posted 15 posts at DZone. You can read more from them at their website. View Full User Profile

Java and PHP Data Synchronization in the Cloud

08.06.2013
| 3397 views |
  • submit to reddit

Sometimes your Java or PHP application can’t cope with any additional load, whether it’s from high traffic or performance reducing tasks. As a result it you can lose money, as well cause your business to take a reputation hit. Programmers blame system administrators. System administrators blame managers. Managers blame service providers. And vice versa. In this day and age, you can’t afford down time: it will hurt your bottom line.

So, how do you solve this issue quickly? We’ll show you how to add PHP or Java application servers to your environment and synchronize your application data within seconds.

Follow this short tutorial to achieve data synchronization within your application servers:

1. Log into the Jelastic dashboard and click on the Create environment button.

2. In the Environment topology dialog, select your application server (Tomcat, GlassFish, Jetty, TomEE, Apache or Nginx) and set up the cloudlet limit for it. After this, enter your environment name and click Create.

create environment

3. Upload your application to the Deployment manager.

php app upload

4. Select the uploaded file from the list and click Deploy to drop-down menu. Select the environment where you would like to deploy the application. In the opened window specify the context for your app and click Deploy.

php app deploy

5. Configure your application if it needs some additional settings to be specified.

6. Now you can easily scale your application horizontally by clicking on Change environment topology and adding the required number of servers.

change topology

7. You can make sure that all of your new data instances were synchronized with the first added node. Click on the Config button for your application server.

php server config

8. Select each node and check if the data was synchronized.

php nodes config

Note:

  • You have to use the Jelastic Deployment manager for deploying your application to get the effect of data synchronization.
  • Further data configurations and changes will not be synchronized, just the initial one.
  • Also, you can synchronize your data with a help of the WebDav module. To see the detailed information on activating and using the WebDav module in Jelastic follow this link.
  • If it is needed to synchronize something in an already existing environment, you should scale it back to alone node or use WebDAV or Config manager application for manual data synchronization.

That’s it! We hope this info was useful for you and you found another easy way for data synchronization in the cloud. Enjoy, with Jelastic!

Published at DZone with permission of Marina Sprava, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)