polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Merlin <p...@nosphere.org>
Subject Re: FileEntityStore directory
Date Tue, 07 Jul 2015 13:39:27 GMT
Niclas Hedhman a écrit :
> There are three ways this can be fixed;
> a. Do character replacements in the identity, per filesystem, to create
> valid files. Downside; One can't move the store to another OS and remain
> compatible.
> b. Do character replacement in the identity, same on all filesystem, to
> create portable filenames. Downside; Existing stores will break.
> c. Introduce a IdentityConstraint in the FileEntityStore, which must be
> applied to all entities in the application if one use this ES. Downside;
> Scheduler (others?) will required to be changed and introduces an
> incompatibility from previous version.
> Not sure which is most reasonable.
a. and c. looks like bad ideas to me.

b., the one that would break existing stores, feels like the good one to
me :/

That's the FileES that is naïve about it's handling of identities.
Encoding theses for filesystems is its responsibility.

Questions are:
1/ what cross-platform filename "encoding" to use?
2/ how to provide a migration path?

1/ hash(identity) ? safe but may be costly
   urlencode(identity) ? pretty ugly but safe
   something_custom(identity) ? I don't like it custom ...

2/ If we use something "standard" for 1/ then we could write a small
migration script




  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message