How do you connect C# back-end with a C++ front-end via HTTP or web-service equivalent?
The C++ accesses the exposed parts of the back-end via HTTP-Requests in which form you choose (webservice and others).
There are three parts here; the server (sounds like C#), the client (sounds like C++) and the transport. Taking them separately, and starting with the most important:
the transport: big decision here is what shape you want the data to be in. You mention protocol buffers, so we're talking binary - but that could be:
- a raw octet-stream (think: downloading an image from a web-server)
- a SOAP web-service returning a stream or byte[]
- the same SOAP web-service returning MTOM
Any should work; which to choose depends on the tools available. The important thing is : get a chunk of binary over the wire.
You also need to think about the data definition at this point; a .proto file can define your schema, and most protocol buffers implementations include a tool to generate matching classes.
- the server: depending on the choice above, this is either going to be a handler (
IHttpHandler
) or a web-service class. Either way, their job is really to run some logic and return a byte stream. How you get your data is up to you, then ultimately the job is to populate the DTO types (generated from .proto in many cases, but not strictly necessary) and run it through the serialization API, writing the result to the stream - the client: same in reverse; generate your DTOs from the .proto, and run it through the deserialization API
The various protobuf implementations (C++, C#, etc) are listed here.