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