A data communication solution between PHP and Java?

Source: Internet
Author: User
Because of the business needs, multiple platforms (Java & PHP) between different servers need data communication, and need to encrypt communication, this aspect of the experience, what can be achieved?
Probably is a station (Java) to increase the deletion of B station (PHP) data, if the B station exposed interface to a station to use, for example, with restful mode, that requires data encryption and decryption, there is no cross-language common encryption and decryption scheme?

Reply content:

Because of the business needs, multiple platforms (Java & PHP) between different servers need data communication, and need to encrypt communication, this aspect of the experience, what can be achieved?
Probably is a station (Java) to increase the deletion of B station (PHP) data, if the B station exposed interface to a station to use, for example, with restful mode, that requires data encryption and decryption, there is no cross-language common encryption and decryption scheme?

Apache Thriftis the Facebook contribution of the cross-language call tool, incremental development will also be convenient.
If it is only used for data communication, it MessagePack is also a good choice.

A simple way to consider https+ parameter digital signatures (e.g. MD5, SHA1)

If you have a fixed IP/domain name, you can verify the IP or domain name of the source.
and head header verification.

RSA: The caller encrypts the public key with a timestamp, the decryption party decrypts with the private key, and verifies whether the timestamp timed out (time-out setting itself)

Refer to the interface design of various tripartite payment

Supplementary note: Listen to the landlord's meaning, a station and B station machine should not be deployed in the same intranet, RPC may not work

You can find an RPC framework that is tried, and now many RPC frameworks support cross-language.

RESTful seever

RPC communication can be used.

such as the Thrift framework, divided into the service side and the client, the server generates the corresponding Java code, the client introduces code, configuration, directly call the corresponding method in the code.

Here's something for you.
No need to see it.
If you like, remember to adopt!!

HTTPS + RSA Asymmetric encryption.

Hession can also

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