Ask a question about communication between webserver and C

Source: Internet
Author: User


C On server a \ B \ c \ DProgramIt cannot be changed. It can only be written in C (for various reasons)

The main problem is that the Web server on Server e needs to communicate with server a to obtain some data. Because there is no database (for various reasons ), otherwise, I will store the total data on server a in the database, and the web server will be able to fetch it.

Therefore, I want to write a Socket Client in Web server to communicate with the C program of server a in singleton mode, but the problem persists. The socket stream is sequential, for example, if 10 customers have opened the webpage and called different functional modules, they will be confused.

Because the C program on server a is a socket server, the system ("command") method cannot be used.

I once thought about running another C program on a and communicating with the socket server process. The shared memory is the fastest, but this is not desirable, because the types of data to be interacted are diverse and constantly changing.

So how can we make the webserver communicate with the C program? Low server load when multiple customers access webpages

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