Image download which protocol to be considered HTTp vs FTp [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have a question regarding the Http and FTP. I have already wrote the utility to download the image file from the Server(images are stored on these servers) using FTP protocol. The utility class is getting invoked from the Spring mvc controller. The utility is working fine but is usage of FTP protocol correct in the case or should I rewrite the utility and use the HTTP protocol image downloading? Which protocol will be faster in this case?

There is not particular difference in terms of extra informations passed using HTTP or FTP protocol.
So the choice between the two protocols is not depending on performances.
If you are writing a client you can't decide. You need to use the same protocol of your server (that can be an HTTP server like Apache or an FTP server).
If you are writing a server ask yourself if the clients will be more confortable with HTTP or FTP protocol. If you are developing a web application probably the best will be the HTTP protocol.

Related

In building chat application, is Web Service better to use than JMS, RMI, or Socket programming? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
In building java chat application, is Web Service better to use than JMS, RMI, or Socket programming?
My VPS has the ff: 512MB Memory, 1 Core Processor, 20GB SSD Disk and 1TB Transfer.
My target number of users in the same time is, 5-30.
I think the way to handle the changes in chatbox is using Polling.
Is my VPS can handle that load if I am using web service?
If I am going to use other technologies like RMI or JMS?
Is my VPS can handle it?
If you have a web frontend for your chat, using websockets (if you want to use java on the backend, it's supported by jetty but also by other http servers) instead of polling is a more common approach.
Definitely no JMS,RMI or sockets, if the client is a browser, if it's a desktop client using something based on sockets and a custom protocol could be the easiest way to go.
The number of connections your VPS will handle is dependant on many factors, included how performant your application will be.
You should give node.js a try. Search for "node.js chat apps".
Node.js chat server app is going to have very little memory footprint giving you more memory for the server at runtime.

Server to Server communication using servlet? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
In my case there is a cloud server and personal application server.
I have to make a communication between both servers for accessing the data periodically.
How to create api for communication using servlet.
Is possible to use timer in servlet?
Any other suggestions?
Thanks in advance.
Yes, you can user a timer within a servlet, but as Stanley suggested, web services is a layer on top of http that you can use and it may be easier.
If you just need some quick and dirty way, you can write a servlet to receive the http request in one end and some http client to do the request.
If you go Java EE, it's even easier because you can generate web services using annotations and there's already a TimerService so you won't have to reinvent the wheel.

How to consume web service using WSDL file in java using IBM RAD 8.5 [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to Webservices. We got WSDL files and we need to call its web service using IBM port lets. Someone plz help me on this.
First you need to know to basic idea behind Web Services and how it works:
A short introduction to Web Services
Then, you need to generate Java classes from the given WSDL file:
Creating Java Classes from WSDL file using Apache Axis 2
Generating Java code from a WSDL document
Note: The reference given using Apache Axis 2. There are others ways to do the same task this one of them.
Also, you need to deal with Certificates issue. I can not tell much about it. Since, it depends on your case.
Now you can work with your Java application, where you need to establish SSL connection, send requests and receive response from the Server you are requesting services form it.

construction of a java server that can store details of the clients after authenticating them [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am new to java programming and i want to develop a server that can store the details of the clients to know which client has already made connection to it.
Please give me some good links and examples where i can learn how to design a server.
start with ServerSocket, Socket, and InetAddress. Those should let you get started and figure out all clients connected to your server, then compare the IP addresses to see if there's a duplicate. You should probably get started, then post some questions on that.
While MartyE's answer about server sockets is entirely viable in the right context, a much more common model in this day and age is to develop servers with web technologies. I'd recommend starting by looking at Java Servlets, and then perhaps frameworks like Restlet/Jersey if you don't need a web interface.
These would let you develop an HTTP + XML or HTTP + JSON server relatively painlessly.
Developing a server directly with sockets would give you more control and if you do a very good job of it, it would probably be more performant than a web-based solution, but it's more work and there are more ways you can trip yourself up on concurrent programming issues and socket handling. It's not what I'd recommend if you're new to programming.

proxy server configuration [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am assigned to implement (or better configure) a kind of http proxy server. The server should support processes like described below:
-A user opens an URL in his browser which has the following structure: http://:/resource_name
-Proxy server validates the resource name in the URL of the incoming http-request and determines the URL of a web-resource it should forward the original request from the client to
-Proxy server forwards the original request, waits until it gets an answer from the external web-server, and posts it back to the user
I'm working within java, but I wouldn't like to implement a proxy server by myself playing with sockets. Instead I'd like to use an apache http server. Does anybody know if its possible to accomplish such a task on the configuration level using apache http server? If so, how?
Thank you in advance for your answers!
You can do this in Apache using the modules mod_proxy (to proxy your requests forward) and mod_rewrite (to map your external URL to the URL on your application server)
http://httpd.apache.org/docs/2.0/mod/mod_proxy.html
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
Apache is not written in java. Your chances are good with Tomcat or Jetty.
You will need to implement a webapp with a Servlet intercepting all requests and then handle all your custom logic in the Servlet.

Categories

Resources