You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Sven Tietje <ti...@topconcepts.com> on 2008/03/29 12:24:48 UTC

using couchdb as caching system

hi,

do you have experience in using couchdb as caching-system? we are thinking
about storing generated html-documents in couchdb. your experience?

greets
sven



Re: using couchdb as caching system

Posted by Jan Lehnardt <ja...@prima.de>.
Heya Sven,
On Mar 30, 2008, at 15:15, Sven Tietje wrote:
>
>>> do you have experience in using couchdb as caching-system? we are
>>> thinking about storing generated html-documents in couchdb. your
>>> experience?
>>
>> No experience so far, but why not use the filesystem? :-)
>
> hi jan,
>
> it`s a distributed system and only files like images, pdf are handled
> through the filesystem. caching should be done by a single independent
> server. another point is that we cache parts of a html-page -> some  
> parts
> are generated dynamically. doing a request to the file-system for  
> each part
> is not performant :-)
>
> i`d like to get all cached parts with one request. eg: html-page / 
> blub.html
> ist called. now, there can be 2 cases:
>
> 1. total page has been cached
> 2. only parts have been cached
>
> i want to get all information with one request. storing it in  
> couchdb would
> make it possible to store it all in one document - correct?
> {
> 	full_html: null or html,
> 	parts: {
> 			....
> 	}
> }
>
> of course, i can store json in a file in the filesystem, but will i  
> be able
> to scale my caching-system?

Okay, your reasons to use CouchDB seem, erm, reasonable :)
The only problem at the moment is that CouchDB does not
perform any internal caching. So all reads and writes go directly
through disk. While a caching layer is planned and relatively
easy to embed, it has not been done yet. So at the moment you
would not benefit from a lot of actual caching. In the future: Sure.
When: I do not know.

You could put a reverse HTTP proxy in front of CouchDB for the
actual caching in the meantime, though and remove it, when
CouchDB is fast enough for your needs.

Cheers
Jan
--

RE: using couchdb as caching system

Posted by Sven Tietje <ti...@topconcepts.com>.
>> do you have experience in using couchdb as caching-system? we are
>> thinking about storing generated html-documents in couchdb. your
>> experience? 
> 
> No experience so far, but why not use the filesystem? :-)

hi jan,

it`s a distributed system and only files like images, pdf are handled
through the filesystem. caching should be done by a single independent
server. another point is that we cache parts of a html-page -> some parts
are generated dynamically. doing a request to the file-system for each part
is not performant :-)

i`d like to get all cached parts with one request. eg: html-page /blub.html
ist called. now, there can be 2 cases:

1. total page has been cached
2. only parts have been cached

i want to get all information with one request. storing it in couchdb would
make it possible to store it all in one document - correct?
{
	full_html: null or html,
	parts: {
			....
	}
}

of course, i can store json in a file in the filesystem, but will i be able
to scale my caching-system?

greets sven


Re: using couchdb as caching system

Posted by Jan Lehnardt <ja...@apache.org>.
Hi Sven,
On Mar 29, 2008, at 5:24 , Sven Tietje wrote:
> hi,
>
> do you have experience in using couchdb as caching-system? we are  
> thinking
> about storing generated html-documents in couchdb. your experience?

No experience so far, but why not use the filesystem? :-)

Cheers
Jan
--