Transfer files by FTP to Java Hosting

Asked

Viewed 802 times

3

If I hire a host to host my Java application I can transfer files by ftp? for this application of mine to read these files?

I have a desktop application that sits on the server that generates a file .xml every 1 hour and I have a web application that reads these files. But as company security standards I can not make direct connection between the web system and the server, I was told that a safer way to perform this process is to pass these files .xml by ftp so that the web system can read them. This is possible?

  • FTP would not be a good choice for security issues, the ideal would be then SFTP or even better if it is SCP. Also not understood the application is Desktop but runs on the server, as it would?

1 answer

3


Yes, it is possible.

You must configure the ftp service on a server.

Next to your Desktop client you should upload the file to the ftp server using one of the many libraries for this (e. g., Ftpclient library Apache Commons Net).

On the server side you can, among other strategies, have batch processes scheduled to read these files. Java EE 7 has a Dedicated API for batch processing, we also have good old Spring Batch.


PS: Company norms are company norms, but remember that using FTP does not make file transfer automatically secure... A well-configured SFTP is an interesting alternative to an https upload service, but one way or another it will be necessary to control aspects such as authentication / authorization / audit, etc. Availability is also a challenge regardless of the protocol chosen (see the 8 miscarriages of distributed computing).

One way or another to transfer files safely, cheaply and reliably is not easy... It’s no wonder that in the 21st century we still have Vans and services of EDI being charged by Kilobyte.

  • Thank you very much, I will study these libraries and with time I will improve this system

Browser other questions tagged

You are not signed in. Login or sign up in order to post.