How can i call my resteasy service remotely? - javascript

I have implemented a resteasy service runs on Wildfly server, which communicates with a mysql database. The frontend runs on an apache server and sends xhr requests to the rest service via javascript. Through port mapping I was able to call the javascript frontend in remote, but not to call the backend. Any solution?

Related

Is it possible to make angular server to server requests?

I have an angular application deployed, but when it creates requests it makes all petitions from client to server api's, that is not desirable because it forces me to publish to internet the api server ports
Is it possible to make all petitions internal ?

Server - Client comunication

considering websoket connections ex. (javascript client -> php / asp server) or asynchronous ajax requests, I was looking for reverse communication: server-> client, to get a certain response from the server without making the request. Assuming a batch process that runs on server, which communicates the presence of a data ready to the client when the desired data has been processed. Does such architecture exist?

Node.js REST API deploy to cloud server

I have developed a Node.js REST API. When I upload it to cloud server then the API is accessible by HTTP but not by HTTPS. When sending requests to my website the API shows an error called (failed). I use Apache on my server. So now what can I do now for making live this API?

Is it possible to have my Angular frontend subscribed to my Redis Server in Django backend?

Right now I have to repeatedly call the API to check for Updates.
Is it possible to have a Subscriber kind of method to invoke the API call if changes are made?
Angular.js frontend and django backend server.

Maintain a backend connection on NodeJS across page requests?

I'm making connections via thrift (node-thrift) to a backend server to make api calls, but the communication is bidirectional (push/pull) to NodeJS.
While a user is browsing around different URLs, and Node is churning out jade templates and javascript files via Connect/Express routes, how do I maintain the connection to the backend server, and output (as an example) the connection status as part of the rendered jade output?
I have the connection object, but what do I do with it?
Sockets and port communication is generally a new area for me, so any help would be appreciated.
Keep in mind that backend server is not communicating to the web browser as the client, but rather the NodeJS server as the client.
(updated after discussion in comments)
So it looks like thrift is TCP-based which means the node client is going to keep the connection to your thrift API server open. This is entirely independent of what your node/express app server is doing with the browser clients. So if you keep a reference to your thrift client available to all requests, by attaching it to the app object for example, you should be able to determine it's current status and include that information in HTTP responses to the browser. There's not going to be any automatic coordination or association of any kind between your express app server handling browser HTTP requests and your thrift client making RPC calls to the API server. If you want coordination, you need to code that explicitly, but sending an HTTP response to a browser isn't going to automatically close your thrift TCP connection to the thrift RPC server (and same story vice versa).

Categories