zopsicle / crai

Cryogenic Raku Archive Index
https://crai.foldr.nl
1 stars 1 forks source link

META data in JSON format #16

Open hythm7 opened 4 years ago

hythm7 commented 4 years ago

EDIT: typo

Is it planned to have the meta data available in json format, for example requests like:

crai.raku.org/meta/MyModule 
# returns array of META6.json contents of all modules matching MyModule 

crai.raku.org/meta/MyModule/0.0.1+
# returns array of META6.json contents of all modules matching MyModule:ver<0.0.1+>

crai.raku.org/meta/MyModule/0.0.1/jdoe/0
# returns META6.json contents of  MyModule:ver<0.0.1>:auth<jdoe>:api<0>

This feature would be very helpful for Raku package managers.

zopsicle commented 4 years ago

Would solving https://github.com/chloekek/crai/issues/11 be sufficient? All data from the database could be exposed as a json file. (Not yet implemented.)

hythm7 commented 4 years ago

It would be sufficient for the time being.

when the ecosystem grows I think one big file with all contents will be slow to parse for package managers. for example I'm working on Pakku package manger ( collected all META6 contents from cpan and p6c and dumped to one file ), for Pakku to search for a package it downloads the file and parse it, when the ecosystem grows and the file becomes bigger it would affect performance badly.

EDIT: typo But I think implementing this feature is not trivial and it's a lot of work.