Closed obo20 closed 4 years ago
The proposal here is to promote Pin.meta[name]
to Pin.name
AND add name
filter.
While one can use Pin.meta[name]
and query via ?meta={name:foo}
, I see how this could improve devexp and even UX by introducing more strict standard for petnaming pins. I'm mildly in favor of this, but would like to hear opinion from @ipfs/wg-pinning-services and other stakeholders.
Qs:
name
filter work as exact or partial match?Pin.name
string?
meta
fields?Should name filter work as exact or partial match?
Our strategy here is to do a partial match since it simply gives the user more flexibility when querying
This change seems reasonable to me.
What would be the sensible length limit for Pin.name string?
Do we have any prior art for the cap here on the pinning services today? Promoting this makes it reasonable to cap, but we should avoid issues with preexisting names.
Should we apply same limit to keys/values in meta fields?
I think we should avoid this and allow the services to set these. If we prematurely cap these lengths it could create issues if larger max values are later needed.
If it helps, our max length for the name is 255 characters (chosen primarily for performance optimizations)
@obo20 out of interest, is your partial matching case sensitive?
@andrew ours is not
@obo20 @andrew Is this something we should include in the spec, under description of name
filter?
@lidel it's probably best to have an opinion in the spec one way or the other here. Just so behavior is consistent across implementers
Something we realized early on is that many users wanted a custom "name" associated with their CIDs. While we could have accomplished this by reading through the metadata that users passed to us (and this is something we initially did), users were finding themselves confused by how this behavior worked. Once we switched
name
to being its own custom parameter that was separate fromkeyvalues
we started seeing users pass in this attribute with nearly every request.Is there interest in possibly adding a
name
parameter that users can pass in with their CIDs?