Couchbase as Client-Side-Cache for Rich-Client Application
Hi everyone,
I'm considering different architectures for a Rich-Client Application that needs to handle large amounts of data in the client process. Think in dimensions of 200000 items with 15 attributes. Server-side up to 10 million of those items, but the data can be split into 'working sets' for each user. So each user normally doesn't need to work (query) with all the data on the server.
The data is loaded into treeviews on the client and a superfast search within these views is needed. Now I have different scenarios in my mind:
1) No Client-Side-Caching. The client process loads all necessary data eagerly from the server. I'd build an inverted index within my client process to enable fast searching.
2) Couchbase as 'data-incomplete' Client-Cache. Once data has been loaded from the server, it's also stored in a local Couchbase instance. When requesting data, the client process first tries to load the data from the local Couchbase instance. If not found, then loads it from the server.
3) Couchbase as 'data-complete' Client-Cache. The Client-Cache is synchronized with the server on startup. However, not all data should be synchronised, but only a subset defined by a view. That subset would be all the current user needs to see and know. Then, I could use the local Couchbase not only as repository, but also for searching. I wouldn't need to build my own search index in the client process (with all the headaches when data changes). Newly created items could be synced back to the Couchbase server.
What do you think? Are there known issues in the scenarios using Couchbase on the client? Is an easy sync with a subset of the data possible?
Cheers,
Jan
Hello,
Couchbase Server has been build for scalability and performance on the server side. So it could work in your case but it is not really made for this. We do not have an embeddable version of Couchbase with sync to a server.
What you are describing is more or less the approach we are using for our mobile strategy but this is focusing on mobile.
Does your application really have to store all the 200000 doc locally? can you use a standard approach and the values as you need from the server?
Regards
Tug
@tgrall