0

I want to deploy some data (non static, receives update at times) to disk that can potentially be large (1+ GB) and I want 2+ different application to access it. Is there anyway that we can allow the different application to access the data in an efficient way? What is the best practice around it?

If it matters, language would be Golang.

Yichao Zhao
  • 129
  • 6
  • Are the applications on the same machine as the disk you'd like to access? – kingkupps Apr 02 '20 at 18:51
  • 1
    The best case would be not to. You're opening yourself up to a lot more potential issues by having multiple processes with read/write usage of the same file at the same time. If you must do this, file locking would be the way to proceed. See [this answered question](https://stackoverflow.com/questions/52986413/how-to-get-an-exclusive-lock-on-a-file-in-go). – Adrian Apr 02 '20 at 18:52
  • 1
    This is what a DBMS is for. If multiple programs need to access portions of a large amount of data concurrently, you need a database (or else you're just implementing one yourself) – JimB Apr 02 '20 at 19:00
  • The other comments dismiss this question without asking for clarification if concurrent read/write access is an issue at all. If it is, region locking the file or using a DBMS are useful. But don't close this without even asking about it, golly. – mafu Apr 13 '20 at 15:38

0 Answers0