Solved

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

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle 11g 23 80
jsp login check 12 31
How to convert from xls to xlsx using java 7 38
Facing this issue for maven proxy setting 2 10
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.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

776 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