I am having 2 computer on different network over internet.
Currently I am trying to figure out away to connect between the 2 computer for a PHP script.
Setting:
-------------------- -------------------
|COMP A (201.1.1.4) |COMP B (101.1.1.2)
-------------------- -------------------
|Webserver <-> |Webserver
|PHP |
|Windows Server |Ubuntu
|Store only script |Store files
-------------------- -------------------
*Over Internet , 50mbps link
There are 2 PHP script. One is to put the file in COMP B, and the other one count the number of file in COMP B.
Script 1 current functionality:
-User upload file. Save the orignal. (/zip/)
-Extract, save it in an extracted folder (/extract/)
Script 2 current functionality:
-Read from /resize/
-if not exist, look for the same file name on the extracted folder (/extract/)
-Resize and save it on the /resize/
-Count file from /resize/ and /extract/
Of course doing a sftp
or ftp
request will take lots of time, slowdown the performance, and also everytime user access the script, it create another FTP session which is not good.
As I can see this is quite heavy file reading. I need some way of making permanent links between these servers for these purpose. (at least count the number of file on a folder)
I'm looking in VPN and SSH but wondering if there are any software or methods of doing so. Also if you can suggest a better method, please do so.
The script will have to change to adapt to the best method. ^^
Thank you very much. Hope I get the answer soon.
0 Answers