I would like to know how nutch server works actually in a distributed environment? Whether it use a listener for incoming crawl requests or it is a continuously running server?
Nutch REST API is built using Apache CXF framework and JAX-RS. The Nutch Server uses an embedded Jetty Server to service the http requests.
You can find out more about CXF and Jetty here (http://cxf.apache.org/docs/overview.html)
Related
I have developed an application using Angular, Node/Express and MySQL. I have deployed my Angular application on the tomcat server, which is connected to some 10 PCs. However, I want to deploy my backend i.e, Node.js/Express.js on the same server as well since my app is totally dependent on the backend. How can I do that? I read online that one cannot deploy node.js on tomcat as both are separate servers. Do I have to install Node.js/MySQL separately on the same server? Isn't there any security threat linked to hosting the front-end and the back-end on the same server machine?
I would really appreciate if someone could clear my mind regarding this.
It's true that Tomcat and nodejs are separate web server programs, and you cannot run one within the other. You can run them both on the same machine, but they must use different ports.
You can use a reverse proxy server (nginx) to project the illusion to your end users that your Tomcat and nodejs apps run on the same server and port. Explaining how to do that is far beyond the scope of a SO answer.
You can share a database server (MySql) between the Java applications running on Tomcat and the Javascript.
There is no inherent security risk in hosting your front-end and back-end code on the same origin server. In fact, there are security advantages, because you can set up restrictive CORS rules.
Is it possible to run a Spring Boot REST API service on top of Node.js instead of Tomcat,
or if not Node.js which are the other possible servers on which we can run our Spring Boot REST Application.
Please help me figure it out.
NodeJs is a server to run Javascript code. It can not run a Java web application, which needs a JVM (Java Virtual Machine) to be run into a JVM. Before you ask, no, NodeJS can not run a JVM. Is is just not made for that. To understand what I mean, it's like wanting a car to run with a outboard engine... Definitly not possible.
So NO, you can't run your Spring Boot REST Application on the top of NodeJs server.
If you don't want to use a Tomcat, then there is other options for you:
https://blog.idrsolutions.com/2015/04/top-10-open-source-java-and-javaee-application-servers/
I am going to write a J2EE application and application will be deployed in Tomcat.
The requirement is that the server and the application must send snmp trap to external NMS.
The details of my application is
J2EE application
Deployed in Tomcat v7
The Server is Redhat Linux 6.2
We need to send trap for all the above 3 (For the application, Tomcat and the linux server).
Can we write our own agent using snmp4j for the above requirement and how will snmp agent know when to send trap to NMS?
Thanks in advance for support.
Yes you can for that you need to extend the logger framework. For Instance you can use logback framework. where you can extend the logging with CustomAppender where you can write snmp-agent code and forward the log as an trap. Moreoever logback has nice and easy way to format, deny log if not necessary other other feature. And you can change the tomcat logging to logback is simple steps. However I'm not sure if you can really send a trap for any issues on linux server. I believe it would be a tedious task. You might look for some syslog server monitoring feature.
I have some sort of noob question regarding to node.js and socket.io. These two guys are usually needed to use websockets for server to browser communication. Once that my project gets done, do I have to upload my php files to my apache server. Now my question is do I have also to upload my node_modules directory to my apache server? along with socket.io directory?
In order to run your node.js process you need to have ability to execute own applications on server. Classic virtual server does not allow of such functionality. There is virtual server hosting for node.js specifically, check out nodejitsu, heroku or any other.
You can run node.js as web platform by it self, without of use of any apache, that will make your life much easier. But if you still need apache and PHP, then you need to consider proxying from apache to your node.js process. This still can be tricky as proxying WebSockets is not straight forward.
If you have access to Apache settings, then you can enable proxying for HTTP/HTTPS, read this: http://ronenagranat.blogspot.co.uk/2011/02/apache2-reverse-proxy-for-nodejs.html
For WebSockets, there is not much data available but here is possible solution: http://blog.cafarelli.fr/post/2013/04/26/Backporting-Apache-support-for-websockets-reverse-proxy-(aka-getting-GateOne-to-work-behind-Apache)
Although if you have own server and have ability to choose between web platform, I would recommend to look into nginx, as it has support for WebSockets proxying (might require module and nginx recompiling).
I have a working application in codeigniter phil sturgeon REST API with backbone.js, underscore.js and require.js
Ineed to use mongodb and node.js in the backend. I have build a working REST API for the same. Now i am clueless as to how to migrate my whole project to work with this API. I use XAMPP on windows to serve apache. So since now i don't need to use xamp, how do i determine the structure of file system?
what files will go there? how do i bootstrap my application?
Node.js comes with an application server.
You need to run your application server at a certain port (e.g. localhost:3000).
There are multiple ways to deal this:
Application Server is also the Web server.
That means your application server at port 80. That's not really an optimal solution as application servers are not ideal for static assets. I think there are some security issues too but need to read on that.
Setup a web server and forward requests to application server
Here you will setup a web server. apache is a web server but for nginx is optimal for node.js applications. So you run your web server on port 80 and forward all requests to your application server port (e.g. 3000) . You setup nginx in a way so that for static assets (images, javascripts, css etc.) it doesn't bother application server but just serve the files directly from the file system.
Setup a proxy server in node.js
Take a look at Bounce Not sure how it performs in a production setup but the reviews are good. But it suffers from slowness in serving static asset.