Internal program call and communication problems

Source: Internet
Author: User
One of our projects is divided into three parts: User front-end, third-party API, and e-wallet. E-wallet will recharge virtual currency at the front-end, and third-party API will perform inbound and outbound operations on virtual currency. The three modules are developed in php and the code is independent of each other. They are deployed on the same server. Data... one of our projects is divided into three parts: User front-end, third-party API, and e-wallet. E-wallet will recharge virtual currency at the front-end, and third-party API will perform inbound and outbound operations on virtual currency. The three modules are developed in php and the code is independent from each other. They are deployed on the same server, and resources such as databases can be shared. However, for e-wallet, considering the security and log problems, you do not want other modules to directly operate on the database to change the balance. Therefore, you want to design an electronic wallet interface that is only called by other programs to operate the currency flow.

The problem arises. Since the communication between internal programs does not need to use the http protocol for interfaces, I only think of the command line. I personally think it is "primitive, is there any other solution that can safely and efficiently perform such internal calls?

Reply content:

One of our projects is divided into three parts: User front-end, third-party API, and e-wallet. E-wallet will recharge virtual currency at the front-end, and third-party API will perform inbound and outbound operations on virtual currency. The three modules are developed in php and the code is independent from each other. They are deployed on the same server, and resources such as databases can be shared. However, for e-wallet, considering the security and log problems, you do not want other modules to directly operate on the database to change the balance. Therefore, you want to design an electronic wallet interface that is only called by other programs to operate the currency flow.

The problem arises. Since the communication between internal programs does not need to use the http protocol for interfaces, I only think of the command line. I personally think it is "primitive, is there any other solution that can safely and efficiently perform such internal calls?

I don't think there is anything bad about http. Do you mean the input/output stream in the command line? The IP address bound to the http protocol does not allow Internet access to ensure security, or the socket protocol can be used for communication.

Restrict Intranet access

Can't I directly import the module ......

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.