SCEA之路--11. Protocols

Scenarios.
HTTP/HTTPS – internet sites
RMI-IIOP – intranet environment; interoperability requirements (EJB-EJB, EJB-CORBA, etc.)
RMI-JRMP – intranet with an all Java environment

Firewalls provide protection by:
• packet filtering
    IP blocking – source or destination IP
    Port blocking – e.g. only allow well-known ports such as 80, 443, 25, etc.
• protocol filtering – e.g. no FTP

HTTP (HyperText Transfer Protocol).
Stateless, connection-less request/response mechanism, default port is 80.
Pros
• simple request/response mechanism
• allowed through firewalls (most of the time)
• widely supported / deployed
• extensible - supports tunnelling of arbitrary data; custom request types/response content
Cons
• stateless - hence non-transactional
• insecure - hence HTTPS
• inefficient - e.g. MIME encoding can make files bigger
• doesn’t support “push” model

HTTPS.
SSL (Secure Socket Layer) is an application level protocol layered over TCP. HTTP layered over SSL is HTTPS, default port is 443.
Regarded as connection-based / stateful as an SSL session is maintained over multiple requests/responses.
Each session may include multiple secure connections. In addition, each party (client/server) may hold multiple SSL sessions.
Pros
• secure – only “in-the-clear” at client / server
• allowed through firewalls (most of the time)
• widely supported / deployed
Cons
• computationally expensive – excluding dedicated hardware, HTTPS can only process 10% of the
traffic HTTP can
• admin overhead – renewing certs, etc.

IIOP (Internet Inter-ORB Protocol).
The GIOP (General Inter-ORB Protocol) specifies a set of message formats and common data representations for communication and is intended for use on any suitable connection-based transport
protocol.
IIOP is GIOP layered over TCP, no default port – the GIOP/IIOP implementation will dynamically assign ports when an object server instance binds to a name.
Pros
• Interoperability – Java clients can call C++ servers; Cobol client can call Java server, etc.
• Legacy integration
• Designed for generic remote object invocation - type safe, extensible
• Inbuilt support for security and transactions
Cons
• Firewalls – servers bound to arbitrary ports so firewall can’t be configured with an IIOP port;
can be supported with an IIOP proxy but “push” model is still problematic
• Performance – all method invocations are remote (possibly over the internet)
• Pass-by-reference – only supports remote references, can’t use pass-by-value (until CORBA 2.3)

JRMP (Java Remote Method Protocol).
JRMP is the default protocol for RMI – stateful / connection-based.
To enable interoperability, RMI has been extended to support RMI over IIOP (with some restrictions).
As of EJB1.1, all application servers must support RMI-IIOP.
The default port for the RMI registry / JNDI name server is 1099, object servers will be dynamically
assigned ports by the RMI runtime.
Pros
• Richer feature set than IIOP – pass by reference or by value; distributed GC; stub download
• Single multiplexed connection
Cons
• Interoperability - only works in a Java environment
• Lacks IIOP’s support for transaction/security context propagation
• Firewalls – servers bound to arbitrary ports; HTTP tunnelling limited
• Performance – all method invocations are remote (possibly over the internet)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值