Data Service Architecture Issues

Source: Internet
Author: User

Currently relative to the project cache optimization, and then online to find information, there are a few questions to ask,
In general, our caches are handled on the business logic, such as:

The cache schema above has one drawback: business parties need to focus on both cache and DB,
Then we further optimize and join a service layer:

This scenario should be a mainstream solution, which provides a handsome data access interface upstream, shielding the underlying data storage details upstream, so that the line of business does not need to focus on whether the data comes from the cache or DB.
So the question: how is this service supposed to be implemented? Or what is the best solution?

Reply content:

Currently relative to the project cache optimization, and then online to find information, there are a few questions to ask,
In general, our caches are handled on the business logic, such as:

The cache schema above has one drawback: business parties need to focus on both cache and DB,
Then we further optimize and join a service layer:

This scenario should be a mainstream solution, which provides a handsome data access interface upstream, shielding the underlying data storage details upstream, so that the line of business does not need to focus on whether the data comes from the cache or DB.
So the question: how is this service supposed to be implemented? Or what is the best solution?

RPC, serialization of data and deserialization.

Large systems typically mix multiple programming languages, such as PHP for the front end, and Java for complex back-end computing and business logic, and some special services may use Erlang or C + +.
Then RPC uses the cross-platform language, Apache Thrift, or Zeroc ice is more convenient.

Service is written in robust languages that are easy to survive for long-term processes. Java is more appropriate. Application can be easily invoked, whether it be PHP or any other language.

Of course, you can also use contract data structures such as JSON to "serialize" and "deserialize" at each end.
Consider the high availability of the service layer, back-end calls to the problem, with a registration/discovery, heartbeat Health Check and other security can be. Self-development or use of zookeeper and the like are OK.

It is quite vague, because it is not specifically the specific question of the main problem is what.

  • 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.