Practices for ensuring user access speed in Web data mining (SQLite + quartz)

Source: Internet
Author: User

I have been entangled in this problem for a long time. I have thought a lot of ideas before:

1) record in webdb;

2) Adopt asynchronous thread record;

3) Use JS like cnzz or Google;

4) That's all you remember.

However, all of them were killed in my mind. The first method was that webdb was already overloaded, and every request was recorded too impractical, and the collected data structure would change from time to time, it is usually determined based on the current research direction. The second method is better, but how to keep the thread alive in the current environment is also a problem. The third method is that many JS Ajax files cannot be recorded.

At this time, SQLite is a good choice. Running on the web side will not put pressure on the database server, and in the Server Load balancer, I only need one to enable collection.

It is also convenient to change the data structure. After the change, you can take the original data and back up the data. The benefits of file-based processing are obvious.

In terms of efficiency, writing with high loads is still very difficult, but quartz solves this problem. With the help of quartz, I don't need to worry about when it will be executed, just like asynchronous, this does not affect the current request. You can also manage write tasks and add listeners.

At present, it is still very good, and the effect remains to be observed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.