jina-ai / jina

☁️ Build multimodal AI applications with cloud-native stack
https://docs.jina.ai
Apache License 2.0
20.98k stars 2.22k forks source link

add cache for speeding up querying #356

Closed nan-wang closed 4 years ago

nan-wang commented 4 years ago

Describe the feature add cache for speeding up querying

Your proposal cache for pods, peas, and, shades


Environment

Screenshots

hanxiao commented 4 years ago

caching in this architecture is non-trivial, and if badly designed bring more chaos than benefits.

Until we have clear pattern observed in real-world scenario which can be cached and which not, I suggest we do not move on this issue.

zjbit commented 4 years ago

i found the example of jina save the index file on local disk, if i wang to speed up the query, for example, storing the index in memory cache with facebook faiss, can this be work with jina?

hanxiao commented 4 years ago

i found the example of jina save the index file on local disk, if i wang to speed up the query, for example, storing the index in memory cache with facebook faiss, can this be work with jina?

You have a misunderstanding about in-memory index, and is not relevant to this cache issue. We are not doing on-disk search.

A typical search system we have two modes: index and search, now think about this:

I'm pretty sure later if you look at Jina code, you will understand why do we implement it like this.

jina-bot commented 4 years ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 4 days