Re: Fcp sizes and time

Matthew Toseland <toad-EI5O+8PHWbJeeLb3ft/[email protected]>
Newsgroups gmane.network.freenet.technical
Message-ID <[email protected]>
On Wednesday 13 February 2008 21:44, Jerome Flesch wrote:
> I commited a patch into the node to make it possible to ask for expected 
data 
> types with FCP.
> See http://wiki.freenetproject.org/FCP2p0GetConfig , 
> http://wiki.freenetproject.org/FCP2p0ConfigData .
> 
> I hope it will help you (anyway it will help me :)
> 
> For periods, I can't make the data type more specific than "string" at the 
> moment, sorrry.
> 
> Currently, I'm wondering if it would also be a good idea to convert all the 
> values into basic units (-> in bytes) and let the client apps displays it in 
> a more user-friendly way ? (I'm not really sure how the client would handle 
> values like '1025' ...)

Exactly, there's a reason why we keep the original string. If the user wants 
12 GiB then we should remember that it's 12GiB and not 12884901888 bytes.
> 
> 
> > Jerome Flesch schrieb:
> > >> Hi,
> > >>
> > >> I have a question regarding byte sizes in Fcp. Along with some requests
> > >> sizes are passed as 1G or 1000K.
> > >
> > > I would be interrested to know where you saw that. From what I know, FCP
> > > always provide/need sizes/times in bytes/seconds (except for things
> > > related to the node config, see below).
> >
> > ConfigData
> >     current.node.outputBandwidthLimit=12K
> >     current.node.storeSize=1G
> >     (...)
> > EndMessage
> >
> > >> Quite obvious what it's about but
> > >> nevertheless it is not documented.
> > >>
> > >> Can I assume Fcp always uses kibs and values are always passed 
following
> > >> this patttern?
> > >>
> > >> -1 (not set)
> > >> n
> > >> n*1000 or (n)K
> > >> n*1.000.000 or (n)M
> > >> (...)
> > >>
> > >> The only time value (except from secs since epoch) I faced so far is 
one
> > >> I got in
> > >> response to GetConfig. It read '1HOUR'. Is there a similar pattern for
> > >> time values to rely on?
> > >
> > > This value comes directly from the node configuration, and node
> > > configuration is made to be human readable. Imo, that's the only reason
> > > why this time is not given in seconds.
> >
> > ConfigData
> >     default.logger.interval=1HOUR
> > EndMessage
> >
> >
> > To make these values adjustable by users I have to parse them.
> > So there should be a spec somewhere. It would be enough to give
> > me a pointer where to find it in freenets sources (still a bit lost
> > in there) and I'd happily add a page regarding Fcp types to the wiki.
> >
> >
> > Juergen
> >
> >
> >
> >
> >
> > _______________________________________________
> > Tech mailing list
> > [email protected]
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
> 
> 
> 
> -- 
> Jerome Flesch
>

_______________________________________________
Tech mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBHs3HGA9rUluQ9pFARAjVKAJ0WijpPZYSw5okEhslJBMpDWgVTFwCcCoX+
EXPGhLkQXL9V1tSIpMeK0cQ=
=9305
-----END PGP SIGNATURE-----
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.