rmi vs servlets vs sockets

后端 未结 3 1994
忘了有多久
忘了有多久 2020-12-28 18:05

what is the difference between socket programming, rmi and Servlets. When to use what?

3条回答
  •  臣服心动
    2020-12-28 18:39

    1. Sockets -- Few simple calls which directly interface with TCP/IP. Very simple but you to implment your own buffer handling and deal with incomplete responses and timeouts in yourself. No authentication or security provided.

    2. rmi -- handles all of the above, its one of the worse APIs to have contaminated the java standards , fairly simple to program, handles basic network errors, authentication and security issues. Difficult to configure and deploy.

    3. Servlets -- lovely simple API, all network issues handled for you, security and authentication via plugins. No deployment issues, simple configuration.

提交回复
热议问题