Click here to Skip to main content
15,905,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Building a Server-Client application where client gets data from server, that stored on server locally C++.

Server is fetching data from a database and storing it locally, and client is using that data by connecting to it.

Data is about various clients differentiated by various client id's.
There are lakhs of clients.

"Main aim is to search and fetch data very fast on basis of client id."

Need suggestions on which data structure we should use to store data locally, and this should be stored in sorted manner or unsorted and which searching technique we must use.


Many thanks for all your suggestions.

What I have tried:

Thinking to store data in BST for fast retrieval as fast searching and retreaving is main aim.
Posted
Updated 21-Mar-18 21:54pm
v2
Comments
Richard Deeming 21-Mar-18 17:52pm    
Caching: What could go wrong? – Buck Hodges[^]
Some people, when confronted with a performance problem, think "I know, I'll add a cache." Now they have two problems.

As Jochen said, putting a cache in front of a poorly-performing database is rarely the correct solution.

If you have a database you already have a storage that supports various methods like fetching, filtering, and sorting.

So there should be no need to create another storage holding data stored also in the database. It might also lead to unwanted side effects when the storages are out of sync.

For performance optimisation used stored procedures to retrieve data from the database. The performance depends also on your database design. So using a proper design is essential.
 
Share this answer
 
Yes, we have database.
but there are millions of hits on database daily.

So,to make it more fast was thinking to store some data locally.
 
Share this answer
 
deploy a search engine maybe a better way, using information retrieval technology.
data can be compressed and store locally
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900