简体   繁体   中英

Connect to Secure Socket Server written in C++ with client written in JavaScript

What I want to achieve:

I have a linux server connected to network which runs a database. The database is not reachable from network. There is a software which acts as a middle layer between the server and client(s). The clients would access the database through this layer. This is required because:

  1. There will be multiple users with different permissions.

  2. I want a common API because the client software will be implemented to mobile platform, mostly for Android and as a webpage(this is where I want to use JavaScript) as well.

  3. I don't want to expose the database directly to clients because I would be forced to store the database's login credentials in client's device.

  4. The client software will be used only for data exchange and displaying the result to user. Any processing would be done in server.

The part which is not clear is the webpage. I could use PHP, but I want to make it like the Google Hangouts app in Gmail or the Facebook Messenger. The content which is fetched from database is displayed without reloading the page. Since I have't done anything like this in JavaScript, I don't know where to start, which libraries I should use.

Note that the communication between the client and the server would be done over secure sockets. The middle layer would be implemented in C++ using OpenSSL.

我建议通过system()命令使用C ++连接到服务器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM