?
Solved

Client/Server Interaction - Grails (Client) / C++ Server backend

Posted on 2014-02-07
2
Medium Priority
?
565 Views
Last Modified: 2014-02-26
I'm considering use of Grails for a client app.   My server side software is predicated on C++.   There's a C++ library called Portable Components (POCO) that I could use as a frontend to my server code to handle client request/response.  

Let's assume I use an Apache web server.   Need someone to highlight how client written in Grails (Java) will communicate with C++ Server backend via apache web server?   I'm new to all this and it's unclear to me how request/response transactions will get routed through an apache web server while invoking client/server functionality in different languages.


Let's now assume there's no Apache web server.   I suspect I could send HTTP Request/Response using an appropriate Grails/Java library?   No 'need' for an Apache server?
0
Comment
Question by:forums_mp
2 Comments
 
LVL 28

Accepted Solution

by:
dpearson earned 300 total points
ID: 39843726
Let's now assume there's no Apache web server.   I suspect I could send HTTP Request/Response using an appropriate Grails/Java library?   No 'need' for an Apache server?

Yes that's right.  The Java client will be sending HTTP calls to somebody.  It can be your own C++ server app which could open a socket to listen for connections on port 80 (http) and then parse the request and respond correctly to the HTTP protocol.

Or you can use another app to do this HTTP interpretation for you.  Let's call that other app the apache web server (or actually any other web server), since that's what it's job is.  Taking HTTP requests and sending back responses.

Then the question is how does the request that apache is processing get to your C++ code?  There are several different ways.  The old classic is using CGI (http://en.wikipedia.org/wiki/Common_Gateway_Interface) which fires up a process on the web server and can run your code.

Hope that helps,

Doug
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39843948
Let's now assume there's no Apache web server.   I suspect I could send HTTP Request/Response using an appropriate Grails/Java library?   No 'need' for an Apache server?
Is the server speaking HTTP? That's unusual for something that's not a web server...
I would have thought that it would use TCP/IP with some kind of (perhaps custom) protocol
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn different types of Android Layout and some basics of an Android App.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month15 days, 2 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question