Pergunta

I have an architecture question - related to my ravendb based setup.

I have the following:

ravendb -> wcf service -> (web/iphone/android)

the web/iphone/android level actually has (at the moment - this is growing) connections to 7 wcf services

at the moment the 7 services talk to the same ravendb - this is likely to be segmented in a future refactoring blitz as they don't need to be on the same instance - there is minimal - if none at all - crossover of the model.

My question is this:

I am looking at using memcached - at which points (i have little experience setting this up) can i / should i use memcached?

between ravendb and wcf? between wcf and (web/iphone/android)?

between all?

am i likely to run into stale data issues? is this taken care of or am i over simplifying things?

Foi útil?

Solução

As many people will tell you: Premature optimization is the root of all evil (and they are all quoting Donald Knuth I think). So wait when you have performance issues before doing anything (You don't need to wait for the system to crush. Wait till you see 90% utilization of your resources)

That being said, You should use memcached (or any kind of caching for that matter) when you expect to use the cached data before it is being invalidated (The improvement factor will change upon many other factors like: the operation cost and the frequency in which the data accessed)

To answer your "where" questions that really depends where you will be saving most on resources and it is really application specific and can not be answered here.

Outras dicas

As an additional pointer, RavenDB REST interface uses ETags to support HTTP-based cahing capabilities. If your HTTP client plays well with those mechanisms, you'll have some nice caching out of the box.

I am not sure how this plays with the WCF stack, though

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top