Skip to main content.
home | support | download

Back to List Archive

Re: Re: Swish-E New Feature?

From: Yann Stettler <stettler(at)not-real.cohprog.com>
Date: Sat Jan 23 1999 - 09:33:40 GMT
Scott Schultz wrote:

> Caching is an option, as long as the storage options
> are faster than a plain search. Let's say you store the
> results in a text file.

The goal is to make it fast... So the cache is part in memory
and part on disk but only if needed. You set in advance how
much resources you want to allocate for that.

> How do you track it in the
> next "hit"? Cookies, maybe? URL-Encoding? When do you

If you know the answer, why do you ask ?

> When do you clean it up? 

When the allocated resources are all used and need to make space
for new data.

> HTTP is stateless, you know. Assuming you

No ? Realy ? Are you sure ?

> solve these problems, how "immediate" is it to
> "set your cursor"? The swish-e results are not

As immediate as changing a pointer address. So probably
the fastest instruction...

> standard in length. That means that you can't just
> seek to byte position X to get to the listing Y.

If that's your only problem, you can easly make them
standard in length. That's usualy called direct access
database...
But if I had to do it, I would keep an array of pointers
in memory each pointing to the address (whatever in memory
or on disk : if you "mmap" the stuff it doesn't even make
any differance) of a result.... You can't get anything
faster...

> You have to read each line into your script, literally
> throwing away the junk until you get to the meat.

Why ? I wouldn't do it that way myself...
If you realy can't do anything better, what make you think
that you will have more success inside Swish ?

> all doing this at the same time? What if the client's
> cookies are disabled and you don't want to have someone
> altering parameters in URL's? Caching in a

Silly : then how do you do the paging in the html page ?
How does your CGI know that it had to ask Swish for 10
result, starting from the 90 ? You will have to pass
some info in the URL anyway !

> You don't have to believe me. I've tried it

Thanks ! I feel much better now !

Cheers,
Yann Stettler

-- 
-------------------------------------------------------------------
TheNet - Internet Services AG              CohProg SaRL
stettler@thenet.ch                         stettler@cohprog.com
http://www.thenet.ch/                      http://www.cohprog.com/
                              ---**---
Anime and Manga Services                   http://www.animanga.com/
Received on Sat Jan 23 01:24:19 1999