Hi Alex.

I've just reviewed
http://www.mail-archive.com/[email protected]/msg00097.html again in
order to move a word index to a separate database file that I want to access
through the remote/ext mechanism. I know some of the below has been
discussed on IRC but I've been bad at remembering to save the buffer lately.

#1
I've always had a hard time translating examples using ? into something I
can use, how would I first do in this case:

(solve
      (quote @Str Str
         (select (@Feeds)
            ((title +Feed @Str))
            (part @Str @Feeds title)))
      @Feeds )

If we pretend that the @Feeds were located in a remote DB and the Str comes
from a form field in the local process?

#2
This is how I currently fetch a list of articles containing the word W:

(collect 'word '+WordCount W W 'article)

What would the above have to look like if the +WordCounts are located
remotely?

#3
Article contents are currently stored as plain text in a blob, the contents
are of course used to generate the word index. To build on the word index I
suppose the local process first needs to send the remote db the article and
its contents. It seems to me that in this case the remote logic is not
really applicable, a simple custom handler is better. But how do I build it?
The following is from the article linked to above:

(task (port 4000)  # Set up the object server in the background
         (when (setq Sock (accept @))
            (unless (fork)  # Child process
               (task P)
               (close P)
               (in Sock
                  (while (rd)
                     (out Sock (pr (eval @))) ) )
               (bye) )
            (close Sock) ) )

The data is read with rd and consists of something that can be evaluated
right away in the context of the remote db. I don't know how to approach my
own problem here, my reflex thought would be to somehow send a list over
that is then worked on, could I read the whole thing with rd? The reference
states "Binary read: Reads one item from the current input channel in
encoded binary format." Could a big list be a single item here making the
following possible?:

(task (port 4000)  # Set up the object server in the background
         (when (setq Sock (accept @))
            (unless (fork)  # Child process
               (task P)
               (close P)
               (in Sock
                  (let Data (rd)
                     (setArticleWords (car Data) (cdr Data))))
               (bye) )
            (close Sock) ) )

Where the car in data is the article and the contents the cdr?

#4
On IRC we were discussing remote put> et. al. and you wrote down some
examples, care to do it again?

/Henrik

Reply via email to