3

Hi I have a document managment program that works with pdf files and these files (nearly 150000 files) are stored on ftp server(solaris 10). the program works on local network.
I need an alternative to ftp that is faster and more secure.
My program is written in delphi 2010

elxan
  • 75
  • 8

3 Answers3

8

FTP is about as fast as you can get.

Security and encryption always make your speed less than it is now.

Alternatives highly depend on what you want, so you might want to consider between these:

  • For download: HTTP/HTTPS is easy to secure, fast, easy to route/proxy
  • For upload: WebDAV is based on HTTP/HTTPS
  • For general encryption: SSH based communication (any protocol can be routed over it) incurs overhead
  • For syncing: rsync which highly optimizes transfers (it strips things already synced)

Depending on your needs there can even be more options to choose from. Make your question more specific, and we can zoom in on the options.

In my experience, for gaining speed, the network protocol is not the only factor.

I have speed up things orders of magnitude by:

  • using switches instead of hubs (especially on 100mbit!)
  • using a gigabit instead of 100mbit network
  • using disk arrays (multiple spindles) instead of single disks
  • using SSD instead of HDD

--jeroen

Jeroen Wiert Pluimers
  • 23,965
  • 9
  • 74
  • 154
  • +1 for the list of things you use to speed things up. I can vouch for those too, especially the RAID arrays. A single server serving files from disk can't saturate a Gigabit network, the limiting factor is HDD speed. With normal HDD's you can't even saturate the 100mbit network, but bundle a few up in a RAID 10 configuration and you'll see why the gigabit upgrade is good! – Cosmin Prund Feb 21 '11 at 08:05
  • FastEthernet *hubs* are such rarity, does not even worth mention – Free Consulting Feb 21 '11 at 08:30
  • @Worm: I know. But in 100mbit land, the price difference between a switch and a hub is low, however the speed makes an order of magnitude difference. And loads of people don't even know there *is* a difference in the first place. Not all of the people around us are tech savvy, especially at the CxO level ;-) – Jeroen Wiert Pluimers Feb 21 '11 at 09:10
  • @Jeron, as of today the price difference is the other way around: An HUB is an antique peace of equipment of value only to networking technicians who might want to spy on network traffic without using an smart switch. I'd like to buy a HUB but I can't find one! – Cosmin Prund Feb 21 '11 at 09:27
  • @Jeroen, sorry for misspelling your name. I'm too late to edit. – Cosmin Prund Feb 21 '11 at 09:33
  • @Cosmin: don't worry, I mispel things a lot myself . Last week I was at Staples Office Centre, and they had a whole bunch of network hubs; they went fast, as they were a lot cheaper than the switches next to it. – Jeroen Wiert Pluimers Feb 21 '11 at 13:00
  • @Cosmin Prund, ...and for the collectors of pedigree networking equipment :-) But take a look at nearby auction – Free Consulting Feb 21 '11 at 22:51
2

You can get more secure then FTP, but on a local network it might not be worth the trouble. FTP's weakness is it's clear text password exchange and unencrypted file transfer. If you're only using it on the local network, it's only vulnerable to people eavesdropping on the local network ! Replace your HUB's with SWITCH'es and you're safe (yes, I know you no longer have HUB's).

Finding a solution that's faster that FTP is also going to be a challenge. FTP has practically no per-file overhead for sending the file over the wire, and it's computationally trivial (because it's a plain transfer, what you have on disk is sent over the wire unchanged). If you need a faster solution you might need to give more details about the particularities of your problem. The faster solution is not going to be a general purpose solution (like FTP, HTTP, SCP are).

In my opinion, if you have a working solution with FTP, and it's only used on the local network, keep it; Why change something that ain't broken? There's a place for even the simpler TFTP (Trivial FTP) protocol on the local network, for example I'm using TFTP to boot up and configure VoIP phones.

Cosmin Prund
  • 25,498
  • 2
  • 60
  • 104
1

Secure copying of files... scp comes to mind.

Feel free to man scp or read it's man page here http://linux.die.net/man/1/scp

Another alternative would be, depending on the size of the files, to store them as blobs or clobs in a database.

corsiKa
  • 81,495
  • 25
  • 153
  • 204
  • i will analyse scp if i can use it with delphi. about database no one recommended me that max filesize is 5 gb now and all files are 100 gb and in my opinion my database will not fuction well with that data size (it is oracle 10g) – elxan Feb 21 '11 at 07:08
  • When [scp](http://blogs.sun.com/janp/entry/how_the_scp_protocol_works) works, it is very convenient, but [sftp](http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol) is much more robust to changes in e.g. `~/.profile` or other shell startup files. The underlying `rcp` protocol wasn't designed to handle maliciously-named files, either, and the `scp` protocol cannot do anything about that without breaking compatibility with millions of deployed ssh systems. `scp` is fine to use yourself, but please use `sftp` when automating file transfers in programs. – sarnold Feb 21 '11 at 07:22
  • @exlan, I'm running a 13Gb Firebird database right now, and it keeps growing (I'm also storing lots of PDF's in there). Firebird is good, but it's no Oracle and I still don't think I've got a big DB on my hands :) Size will probably not be a problem if you do switch to a database, but make sure you use a database that does Incremental Backups properly. – Cosmin Prund Feb 21 '11 at 07:27
  • @elxan It's my understanding that Oracle's `LOB` datatype is 4gb for a max size. You could fairly easily split that into two files for the ones that exceed that and store them, or compress them and store them. The more I look at it, the better that idea sounds! – corsiKa Feb 21 '11 at 15:09