Solved

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

Posted on 2014-02-07
2
507 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 26

Accepted Solution

by:
dpearson earned 100 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array6 challenfge 6 62
Safari, Firefox, IE, Java, Plugin, Java Security error 13 39
topping1 challenge 7 50
groovy example issue 10 65
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now