Skip to content

Commit

Permalink
dcap: Port DCAP door to the LineBasedDoor
Browse files Browse the repository at this point in the history
Motivation:

FTP and DCAP are both line oriented protocols. The LineBasedDoor was derived
from the FTP door to factor out the line oriented nature. It offers a number of
features over the existing DCAP door, such as detecting client disconnects even
if the interpreter is blocked; thread pool sharing to avoid having to allocate
a cell message thread for every client connection; and thread pool sharing to
reuse IO threads between connections.

Modification:

Port the DCAP interpreter to the LineBasedDoor interface.
DcapLineBasedInterpreterAdapter adapts the old adapter to the interface of the
LineBasedDoor.

The old DCapDoor class is deleted.

Result:

The DCAP door was refactored. Compared to the earlier version it got:

- about half the number of threads than before.

- reuse of threads to reduce the overhead.

- detects client disconnects even if the door is busy.

- the legacy feature to block a DCAP door by defining the 'dcapLock' entry
  in the domain context has been removed.

Target: trunk
Require-notes: yes
Require-book: yes
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>

Reviewed at https://rb.dcache.org/r/9568/
  • Loading branch information
gbehrmann committed Aug 3, 2016
1 parent d4fb646 commit 1a60fc0
Show file tree
Hide file tree
Showing 9 changed files with 257 additions and 351 deletions.
342 changes: 0 additions & 342 deletions modules/dcache-dcap/src/main/java/diskCacheV111/doors/DCapDoor.java

This file was deleted.

Expand Up @@ -2293,8 +2293,9 @@ public void poolPassiveIoFileMessage( PoolPassiveIoFileMessage<byte[]> reply) {

@Override
public void removeUs() {
if( _moverId != null ) {
PoolMoverKillMessage message = new PoolMoverKillMessage(_pool, _moverId);
Integer moverId = _moverId;
if (moverId != null) {
PoolMoverKillMessage message = new PoolMoverKillMessage(_pool, moverId);
message.setReplyRequired(false);

_cell.sendMessage(new CellMessage(new CellPath(_pool), message));
Expand Down

0 comments on commit 1a60fc0

Please sign in to comment.