Efficiency of webservice Problems

Source: Internet
Author: User
Many interfaces in the project need to be maintained, while the business side needs to judge the cache when calling the interface. If not, the business side is directly retrieving data from the database, which brings a lot of problems, the business side needs to pay attention to the cache and DB at the same time. Now there is a solution that uses the service-oriented architecture to put all interfaces... many interfaces in the project need to be maintained, while the business side needs to judge the cache when calling the interface. If not, the business side is directly retrieving data from the database, which brings a lot of problems, the business side needs to pay attention to the cache and DB at the same time. Now there is a solution that uses a service-oriented architecture to package all interfaces in the service, so the business side only needs to call interfaces, I don't need to worry about anything else, so my problem is: I used to retrieve data directly through the cache or DB, and now I want to go through the server (such as webservice) through HTTP, isn't it slower? Thank you for solving the problem.

Reply content:

Many interfaces in the project need to be maintained, while the business side needs to judge the cache when calling the interface. If not, the business side is directly retrieving data from the database, which brings a lot of problems, the business side needs to pay attention to the cache and DB at the same time. Now there is a solution that uses a service-oriented architecture to package all interfaces in the service, so the business side only needs to call interfaces, I don't need to worry about anything else, so my problem is: I used to retrieve data directly through the cache or DB, and now I want to go through the server (such as webservice) through HTTP, isn't it slower? Thank you for solving the problem.

It will be slow, but the entire project structure will be clear, and the development speed and division of labor will be easier in the future, which is the cause of the sacrifice speed. Projects always increase gradually. As the project grows, we need to gradually consider splitting it. I don't want to say much about the purpose of splitting, most of the splitting methods are service-oriented for each sub-block and only a few necessary interfaces are exposed.

As for the slowdown mentioned just now, there are still many ways to optimize it to make up for this slowdown, such as using a faster network channel.

By layering services, projects can be more organized and clearer, and the development process can be more modular, helping agile development. The code reuse rate will be improved.
When cross-language or cross-server communication is required, you can use RPC frameworks such as thrift for transmission. when third-party content in other languages is required, the advantages of this architecture come up.

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.