On 12 July 2016 at 10:15, Markus Peröbner <[email protected]> wrote:
> Am Montag, 11. Juli 2016 23:02:01 UTC+2 schrieb mpl:
>>
>> On 10 July 2016 at 16:15, Markus Peröbner <[email protected]> wrote:
>> > This is not very handy for my use case because first with every edit the
>> > URL
>> > changes and second I have to reference resources like JavaScript files
>> > via
>> > sha-1 hash. Now it would be very handy if I could access the most recent
>> > version of my files from the search roots via a URL... for example
>> > http://localhost:3179/searchRoots/myFolder/demo.html
>>
>> What is/are the search roots?
>
> The UI has a menu option called "search roots" which shows all objects with
> the camliRoot attribute. Now I think I missunderstand the name of the UI
> menu entry :)

yeah it's "search roots" as in "to search for the (camli)Roots".

>> > Are there already URLs for accessing the most recent contents of my
>> > search
>> > root files?
>>
>> It sounds to me like you might just want to use a permanode for each
>> of your files. After all, representing the most recent version of some
>> data/a file is the canonical use for a permanode.
>> Is that not something that would work for you?
>
> I have permanodes for my HTML and JS files. I just don't know via which URL
> (which contains the permanode and NOT the content blob ref) I can access the
> content of my HTML or JS files.
>
> I'll make an example what I need:
>
> We have two files in camlistore. On HTML file with the permanode
> sha1-permahtml and one JS file with the permanode sha1-permajs. Both
> permanodes have the file content (the actual HTML or javascript source code)
> in blobs with the blob refs sha1-blobhtml sha1-blobjs. I want to include the
> most recent version of my JavaScript via a <script> tag in my HTML So the
> URL which references the JavaScript in the HTML should just contain the
> permanode and not the blob ref. Right now it is for example possible to
> access the JS file content via
> http://localhost:3179/ui/download/sha1-blobjs/myJavaScript.js. But the ref
> in the URL is not the permanode so I will only get one specific version of
> my JavaScript file.
>
> What I need is to reference the the JavaScript content via a permanode and I
> think this is right now not possible right now via a URL.

Ok, I understand what you mean/want now.
I think you're right that the web UI can't get you that kind of URL.
Maybe it could.

On the other hand, the web UI is an interface for humans. it's not
supposed to be the API that your app is going to hit to get its
HTML/js/whatever resources. Your app should hit things like the search
handler (like the UI does) and the blobserver itself. Basically you
send a search query asking to describe the permanode you're interested
in, and you can find out in the JSON response if it has some
camliContent or whatever else. You can probably even send a search
query that directly gives you the camliContent of a permanode if it
has one. And then, you just ask the blobserver for the file under that
camliContent (this is what camget -contents does for example).
See pkg/search and its clients - the web UI, the publisher app, the
camtool command - to learn more about the search queries.

Let me know if you need any more help.

>> > If no such URLs exist yet... anybody got some hints where to start
>> > implementing them in the camlistore source?
>
> I'm trying to implement a new handler right now which allows me to access
> content via HTTP in a way cammount's root directory does it for the file
> system.
>
> I'm not very far right now but I'm going to commit my progress here:
> https://github.com/marook/camlistore/tree/searchRootsHandler
>
>
> Thank you very much,
> Markus
>
> --
> You received this message because you are subscribed to the Google Groups
> "Camlistore" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Camlistore" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to