Damien,

I have a few comments before we get this patch in:

1. addPersonResult.php needs to grab the id from the database transaction. We cannot use the username as a file identifier. We need to insert the user into the database first and use the auto-increment feature to obtain the id. Then we put the files into the store based on that id. This will also, at least partially, solve OLIO-92.

2. LocalFS.php - the logic in create and the additional fields are fine by me. These seem to introduce a bug in the rest of the LocalFS, though. The question is what is the filename or key we need to use in the rest of the operations. So if you use such create semantics, the create will need to return the file key (or name) to be stored in the database. This will then be used by the rest of the operations.

3. Changing the semantics will certainly impact addEventResult.php and may impact all the image consumers. It may also impact the DB loader as we're starting to expose the LocalFS internal details beyond the LocalFS.

The other way to deal with this is to have the FileLoader logic determine the file type and the user id from the file name (which has a well defined pattern) and use that to map to the actual location. Of course, there will be a little parsing happening in the LocalFS but it is just positional parsing. Should not be bad.

Thanks,

-Akara

Damien Cooke wrote:
Shanti/All
I have modified LocalFS.php to use the new file location algorithm. I have had to change the prototype for file creation in FileSystem.php to accommodate 2 new arguments needed to identify the path. AddPerson.php was changed to use the new LocalFS.php defined create. I added a support class to give us easily understood options for the file type portion of the path, as well as a path decoding convenience method.

Comments/corrections welcome.

Regards
Damien




On 30/04/2009, at 4:14 AM, Shanti Subramanyam - PAE wrote:

Can you please zip up the individually generated patch files ? I can't read your patch.
Can you also explain what exactly was done to fix this issue ?

Shanti

On 04/28/09 15:27, Damien Cooke wrote:
Hi All,
Here is my proposed solution for OLIO-40, please review and comment.
Regards
Damien
------------------------------------------------------------------------
<http://www.sun.com/eco>     *Damien Cooke*
Open Scalable Solutions Performance
Performance & Applications Engineering
*Sun Microsystems *
Level 2, East Wing 50 Grenfell Street, Adelaide
SA 5000 Australia
Phone x58315 (x7058315 US callers)
Email [email protected] <mailto:[email protected]>


Damien Cooke
Open Scalable Solutions Performance
Performance & Applications Engineering

Sun Microsystems
Level 2, East Wing 50 Grenfell Street, Adelaide
SA 5000 Australia
Phone x58315 (x7058315 US callers)
Email [email protected]


Reply via email to