How the internal application calls the respective interfaces to write

Source: Internet
Author: User
Background description: There are two applications developed by Php+mysql A and application B, and two applications on a single server. Both A and B can be accessed externally. A responsible for user account management, creation, activation, deletion and so on. b Responsible for specific business, orders and so on.
Problem: B application needs to create an account to avoid duplication of functionality, B application wants to directly call a to create the user interface. So how does a application implement this interface, while hiding the interface from being invisible, allowing only internal application calls

Reply content:

Background description: There are two applications developed by Php+mysql A and application B, and two applications on a single server. Both A and B can be accessed externally. A responsible for user account management, creation, activation, deletion and so on. b Responsible for specific business, orders and so on.
Problem: B application needs to create an account to avoid duplication of functionality, B application wants to directly call a to create the user interface. So how does a application implement this interface, while hiding the interface from being invisible, allowing only internal application calls

It can be simply understood that the implementation of program A provides some API interfaces (methods) that can be called by program B.

There is a concept of RPC (remote procedure Call) you should be interested to take a look at this: an analysis of remote procedure call RPC.

Of course, after reading, you think you can, then use the Web Service to achieve your needs well. Just recently summed up a few articles, and today there is just another article about the use of the PHP SOAP extension, which shows how to implement a basic Web Service.

However, now the most popular style of RESTful API, it may be considered.

A add an interface to create an account, a in the only place where this interface with the IP restrictions, B in accordance with the normal method of invoking this excuse

Require header file

That's what WebService did.

Define requests, call requests in other modules

  • Related Article

    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.