Dynamic Webpages how many TCP connections for each include/GET request - sockets

I have a semantic web/RDF application which runs on Tomcat and is backended with MySQL. Apache HTTPD is in front as a reverse proxy and the OS is Red Hat Linux 6. I am seeing a lot of Connections to port 80 per IP. What I want to know is what determines whether the include for a css or .js file is served over the existing TCP socket, or a new one is created for each GET that occurs while the web page is "built". Is that exclusively the application itself, or is it the Apache web server, or the Linux kernel as well?

Related

Web sockets and Rest API in same Tomcat based application

I have read up on web sockets providing full duplex connections over TCP which can be used in scenarios where long polling was used to get live updates to client from server. Now I have a Tomcat based application which serves multiple REST based web service response, and I want couple of API's to be implemented using web sockets say to render dashboard with latest data where multiple users are working on them concurrently, is that possible ? My concern here was even if the connection was upgraded to TCP from HTTP wouldn't web socket require a separate port to run than the default Tomcat port 8080. In that case should I house the Web Socket based endpoints separate to the Tomcat based application already running. Please do correct me if any of the above is wrong.
A couple of month ago, I wrote a small Spring Boot webapp with embedded Tomcat that provides both, REST endpoints and websocket support, and both via the same port. So, yes that works... if you wanna sneak a peek: https://github.com/tommybrettschneider/pinterest-boot
Besides that, this post should also clarify things:
Shall I use WebSocket on ports other than 80?

GWT Request builder, send data from one port to another port

I hava a GWT project running on port 3000, and i have a Java project running on port8080. Now i just want to send a string from port 3000 to 8080. Would it be possible by using GWT request builder? or how to make this process happen by using other technology?
I also need data to be sent from port 8080 to port 3000....
Yes it is possible.
I'm assuming your java project should be a service/webapp, since you have mentioned the port in which your java project is running is 8080(default tomcat port).
Your access from GWT project running on port 3000 to java project running on port 8080 is a Cross Site Request.
References on Cross site request:
http://www.gwtproject.org/doc/latest/tutorial/Xsite.html
(Please read section : Access Restrictions: Same Origin Policy)
GWT RequestBuilder - Cross Site Requests

not able to ping filenet content engine ever after successful deployment of ear

I have added CE application to WAS server but not able to ping it.
WAS server containing Filenet Application is at port number 9063 and i am pinging content engine url at default 9080 port. Is this a problem?. How can I find out on which port content engine is running.
What are you mean - ping application?
Are you sure that you Content Engine application is started? You should start it after deploy.
User health-url to check avalibility of CE.
Look chapter "Verifying the Content Platform Engine server status" from documentation

Application Server and Web Server on Two Different Machines

Today I'm hosting a Laravel v4 web application on a MacMini. Why a Mac? Because I created the application logic in Objective-C (leveraging my experience with iOS dev). Whether or not this was the right choice isn't the point of the question.
What I'm interested in knowing is how can I separate my web and application server. For instance, if I put my web server on Linode (or whatever) how do I go about communicating back and forth between the web server and the application server? Is there some sort of resource I can look to to understand how to do this?
Assumptions
Here's some assumptions I'm making:
I'm guessing Laravel and the Objetive-C Application are part of the same "system" and so I'm just gonna treat this as if you need a web server to send requests to a PHP application.
The Linode server will be a web server which sends request to the PHP application (Laravel)
Hosting PHP Applications
There are three moving parts:
The web server (Apache, Nginx)
The application gateway (PHP-FPM)
The application
The gateway and the code must live on the same computer/server. The web server can live on a separate computer/server.
This means you'll need your Macintosh to run PHP-FPM, which can then listen for remote connects and send them to the PHP application.
Macintosh
Install php-fpm on your mac. Make sure it can listen for remote network connections. This is usually done in the www.conf file in the listen directory, you can listen for connections on the remote network interface (whatever IP address the computer is assigned).
Linode
Install Nginx or Apache and have it proxy FastCGI requests off to your macintosh server at the macintosh's IP address (the one you set up to listen to addresses in the step above).
Firewalls
You may need to ensure the firewalls at both ends allow incoming/outgoing connects on the networks being used to communicate to eachother.

Eclipse TCP/IP Monitor has two ports

I was trying to monitor request using TCP/IP Monitor.
But, I see there are two ports which are in use. One is the application port[8080] and other monitoring port[9833].
Can anybody tell , why there are two different ports?
When I launch the application it launches at 9833 instead of 8080. Why this change?
Eclipse monitoring is done by capturing all the requests sent to an application (a host and a port), dumping it on the Monitor console for you, then forwarding the original request to the application.
The monitored application itself will return its responses to eclipse (where it is the client from its prospective) where eclipse dumps it on the monitoring console too.
Now, how does eclipse captures the requests sent to the monitored application at the first place? it simply runs a service that accepts these requests (on behalf of the application) and forward it, this service also returns the application responses to the original requester.
Based on the above, in eclipse TCP/IP Monitor screen, the Local monitoring port is the port of the eclipse service (which you can use any available port number for), and the other Port is the monitored application port number.
So, in your case, the application you are monitoring is running on port 8080 and eclipse service is using the port 9833 (which is just a random port that you can change).
Your application port have not been changed, it still runs on 8080 and you can try that, but no data will be captured by eclipse TCP/IP monitor unless you use the port 9833.