Matthew Toseland schrieb:
> [SimpleFiledSet and Fcp]
>> This is a nasty one: dotted names.  It may be easy or not for some 
>> languages to deal with
>> this data type. Actually it is easy in python, but doing additional 
>> processing based on
>> message signature (like type conversions) is pretty painful and costy. 
>> Flat messages
>> shopuld be way easier to handle. Already made a suggestion regarding this...
>>     
>
> I really don't understand what the difference is. We provide a Count. If you 
> are parsing into a tree structure, it's trivial. Even if you're not, you've 
> got the Count, so you can allocate the array before you parse the sub-items. 
> Given a multiplexable protocol, using separate messages would mean having an 
> identifier in each one which would be just as messy. The only reason to do it 
> the way you propose would be to avoid very large messages.
>   

 From the top of my head, happily breaking everything in the current 
protocol

Request
    ID=any
    Key=any
    NItems=N
    ReturnCode=N
    UserData=any
    (...)
End

Item
    ID=any
    (...)
    DataLength=N
    ReturnCode=N
    UserData=any
End


request = Request(ID='MyRequest')
item = Item(ID='MyRequest/Item1')

---------------------------------------------------------------------------
send request followed by N items, the node will send back request and 
item with an error code set

[ID]
hirarchical name used to identify requests and sub-requests. Should 
start at connection name
so it is guaranteed each request can be identified uniquely. If apps 
feel the need to share
requests, they simply have to share their connection name (though not 
recommended, collisions
can not can not be excluded here). Global queue would then be: enumerate 
all known
connections / requests with FlagPrivate not set.

[UserData]
(ClientToken as I understood it). Gives clients a uniform way to 
associate any data desired to a request.

Pros:
x. no identifier collisions
x. 'flat' mesages (easy to handle)
x. nestable / multiplexable if desired
x. easy to extend 
...GetRequestStatus('ConnectionName/MyRequest/MyRequestItem')
x. save for clients. GetRequest('ConnectionName/Request'). Ups ...1M 
items, we don't do that.


Cons:
x. still no guarantee that ConnectionName may not collide with another
    apps ConnectionName. This will be a risk as long as the node administers
    client data.
x. ???


J

Reply via email to