Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java socket programming through TCP/IP

 
James Potter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have created a java application using TCP/IP socket connection. The program will write, upload, download, delete, read, and modify to the file server. The program is ready and good to go. My question here is, do we need to deploy anything to the server? The server is just a empty storage location and we are moving files to it? Deploying any war file or installing java environment will be a long option for us at this time. Is it possible ways to write to the server by just using the ip and port number? After the connection is established, we can perform all the file operations. Some suggestions on doing this will be a great help.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible ways to write to the server by just using the ip and port number?


No, there must be a cooperating process waiting for a connection on that port. Think what a security hazard it would be otherwise.

Bill
 
James Potter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Bill. I was thinking of the same thing. What do you prefer as a solution, FTP, SFTP, or TCP/IP. I found TCP/IP more secure. But the only thing is that the file server is an empty box where we have to install everything. I have applications for each of them but want to use one that is appropriate.
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Potter wrote:What do you prefer as a solution, FTP, SFTP, or TCP/IP. I found TCP/IP more secure.


But that doesn't quite make sense. Both FTP and SFTP use TCP/IP as their transmission protocols. (Which kind of makes saying TCP/IP is more secure a bit meaningless.)

You could certainly use FTP as your file transfer protocol if you wanted to transfer files to and from a server, and it sounds like it does just about everything your application does. However that would make your application unnecessary -- you'd just have to install an FTP server on your central machine, or perhaps just configure the one which is already there if that's the case. Then you could just install FTP clients (like FileZilla for example) on your client machines and you wouldn't need your application instead.

However perhaps your application does something that an FTP client doesn't do for you, such as automating a regular file transfer or searching a folder for files and transferring them. I've written such applications in the past. Then your application could certainly be modified to use the FTP protocol (as my applications did, since our customers asked us to put data on their FTP sites).
 
James Potter
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You for your reply. So We have to depoly something to the server if we are using TCP/IP. We have to write, copy, delete, upload, and downloads apart from just transferring the files. For TCP/IP do you think there is any other solution?
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't mess around with the files on a different computer unless that computer has a server installed which allows you to connect to it and do that messing around. That's just a basic security principle.

By the way FTP can do everything in your list of requirements there.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used the open source FileZilla server in the past - works just fine and it looks like the project keeps updating.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!