开发者

Scalable 'google suggestions'-like system

I have 100,000 queries, and I need to create a google-like 'Suggestions' system. Much like this

Scalable 'google suggestions'-like system

I need it to be pretty quick, and if possible开发者_Go百科 allow for some more in-depth options (like sorting, etc.).

Can anyone recommend a database system I could use for this that could handle searching through 100k+ queries while still keeping speed, or an existing project that you think would work for my needs?

I've been looking into possibly using MongoDB, but I'm not yet sure if that's the best route.

Any help is appreciated!


There are many database solutions that will easily handle this requirement, 100K rows isn't really very many for a database. Based on what you've said in your question there isn't really a 'best' solution.

It just depends on what you have access to, and perhaps how you see the application growing. If it's going to grow into something more complex then you might be better off using a full relational database solution such as MySQL or MSSQL, otherwise MongoDB will be fine.


If they're really just 100K words, I'd be tempted to load the whole thing into memory, as a prefix trie. That will be blazingly fast.

Of course, that makes it slightly harder to update... what's adding to the list of options? Do you need an option added via one machine to be instantly available, or is eventual consistency good enough?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜