Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Storing files in a central place (other than the database)

 
Alok Pota
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to be able to create a file from user entered input through a web-app and store it in a central file system. Storing it in the database as a CLOB/BLOB/VARBINARY is not an option. The web-app could possibly farm out the request to any one of the cluster JVMs, and I need to able to store the created file in this central system from any JVM.
All the JVMS are in a UNIX enviroment. How can I store files in
a central place from different JVMS?
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite see what the problem is. Surely it's a simple matter to hard-code the full path to the shared place in each application:
File f = new File("/usr/me/someplace");
Then they can all just write files in that directory.
I guess you have dismissed this approach, so what am I missing?
 
Alok Pota
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is the approach I would like to use. Isn't the path /usr/bin... local to the machine where it is called? How do I fully qualify the path name possibly with a machine name so
that /usr/bin/whatever maps to that shared directory? I guess this is more of a UNIX question.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are not on a network where you can directly path to the directory, then you will need to ftp the file.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most Unix systems allow you to mount directories from other machines using nfs or various other protocols. I'd recommend that you do this if you can, as it will also allow you to make sure you deploy the same version of software to each of your clustered VMs.
As a small side note, your initial message didn't mention that these multiple VMs were to be on separate machines. A lot of people like to cluster several VMs even on a single machine, so that of anything causes a VM to crash or lock up, then the app can still carry on.
 
Alok Pota
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Was wondering if LDAP would help here?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic