Open davisein opened 11 years ago
For the first question, I think I just created the table using typical Elixir usage. If wanted, it could be changed to use Linux id without ant problems.
For the second question, my idea for the files-and-users daemon was the following:
The essential problem for going from 2 to 3 is that WSGI runs with Apache user permissions and this may make impossible some of the library calls to be implemented directly. However, my initial audit was that the bulk of filewatcher and browser calls we do are just checking whether a user can read a file or not.
Going further with this users problem, right now we are not saving any information about users in Music or Photos app, so every time we get a set of files we have to check if the user can access or not. That makes it difficult to implement queries efficiently. Do you have any ideas on how to manage it better?
2013/3/4 David Navarro Estruch notifications@github.com
Currently in nublic the daemon files-and-users stores all information about a user. For some reason it uses a autogenerated id instead of the uid generated by Linux.
Is there a reason for that?
This way we can reduce the amount of calls to files-and-users which slow some functions a lot and it reduces reliability of applications (the daemon becomes a single point of failure).
It will fasten operation in file-watcher for processing files.
— Reply to this email directly or view it on GitHubhttps://github.com/nublic/Nublic/issues/66 .
Good plan. I will work in the third step now ;)
If we implement uid as user id we should be able to check in the client library if a certain user id has access. It is true that is impossible for some functions to be implemented. Specially the ones that upload a file and set the user. But they are not used that often.
For the music application if I recall we set that private files (that are not implemented in the user interface right now) would NOT appear in the music application. So we can take that out of the queries and we should be able to speed the music application a lot.
Also for some reason we are storing in the music database the owner of a song as the name. I will cache that call and use the uid for id. This should make possible to add music without rpc calls (speeding things up a lot on files with metadata).
Currently in nublic the daemon files-and-users stores all information about a user. For some reason it uses a autogenerated id instead of the uid generated by Linux.
Is there a reason for that?
This way we can reduce the amount of calls to files-and-users which slow some functions a lot and it reduces reliability of applications (the daemon becomes a single point of failure).
It will fasten operation in file-watcher for processing files.