Re: Fcp woes II

juergen urner <[email protected]>
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
Matthew Toseland schrieb:
> On Monday 10 March 2008 23:48, juergen urner wrote:
>   
>> Matthew Toseland schrieb:
>>     
>> Yes, I noticed that. And I noticed that 'Filename' is not present in 
>> PeristentPutDir
>> when I pass ClientPutComplexDir. just a bit of ugly parsing to find out 
>> 'Filename'
>> I'd like to avoid. So, at least passing 'Filename' as indicator would be 
>> helpful.
>>     
>
> It's present for each file, but there is no overall Filename because a 
> ClientPutComplexDir can put files from anywhere.
>   

ClientPutDiskDir can not. Thinking it over it is impossible
to tell if a PeristentPutDir results from a complex or a diskdir.

I have to tell my user, sorry, I don't know what your initial 
request was. I throw the put directory mask at you, right? 

Yes | No | Cancel


>> Put* is somewhat overcomplicated. I am already scared of future 
>> extensions to it.
>>     
>
> The example given on the wiki has only the minimum info needed for each file:
> -----
> ClientPutComplexDir
> Identifier=My Identifier
> Verbosity=1023
> MaxRetries=999
> PriorityClass=2
> URI=SSK@Fk6sQ6...../myinsert-4/
> GetCHKOnly=false
> DontCompress=true
> ClientToken=My Client Token
> Persistence=reboot
> Global=true
> DefaultName=hello.txt
> Files.0.Name=hello.txt
> Files.0.UploadFrom=direct
> Files.0.Metadata.ContentType=text/plain
> Files.0.DataLength=59
> Files.1.Name=something.pdf
> Files.1.UploadFrom=disk
> Files.1.Filename=something.pdf
> Files.2.Name=gpl.txt
> Files.2.UploadFrom=redirect
> Files.2.TargetURI=KSK-fXTkeU/[email protected]
> EndMessage
> hello, this is the contents
> of the file called "hello.txt"
> -----
>   
> AFAICS the only difficult thing about the above is that you have to prefix 
> each file with <Files.n.>, rather than sending them as separate messages... 
> what's the big deal?
>   

1. what is nice and clean about it?
2. parsing - instead of running a loop for items in container one has to 
gather
    items by hand. if ..else ..elif, checkIndexIntergrity()
3. there may be many* items. In future extensions it may be possible to pass
    items one by one and query them on demand.
4. readable docs?


Put:
------------------
Requests the node to upload one or more items

Put
    params here
Plum

Items have to follow the Put message emidiately.
Items can be one or more of the following:

DataItem
---------------------
Uploads raw data

DataItem
    params here
Plum

Attatched data has to follow emidiately the newline after the item 
terminator

(...)

>> Btw, I ran a test throwing 'Plum' as message terminator at the node.
>>
>>  >>> If '=' not in chunk:
>>  >>>    endOfMessageEncountered()
>>
>> Fcp doesn' t care at all?
>>     
>
> Indeed.
>   

What thought am I missing? :-)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.