Ticket #15 (closed enhancement: fixed)

Opened 12 years ago

Last modified 10 years ago

Reuse existing SFTP sessions

Reported by: alamaison Owned by: alamaison
Priority: critical (affects core workflow) Milestone: 0.2.1.4 Real data provider
Component: frontend Version: 0.2.1.4
Keywords: pool connection session Cc:

Description

At the moment Swish creates a new SFTP session (i.e. you have to re-enter your password) every time you perform any task. This include navigating to a subfolder or even refreshing the current view.

Swish should store the open connections (sessions) in a pool an reuse them whenever possible. This not only prevents continual password prompts but reduces the considerable time taken to negotiate a connection with the remote server.

Change History

comment:1 Changed 12 years ago by alamaison

  • Status changed from new to accepted

It seems that the best way is to create the pool in the top HostFolder? or RemoteFolder? that is instantiated and then pass a pointer to the pool to all further folders in BindToObject?.

comment:2 Changed 12 years ago by alamaison

This is proving trickier than I'd hoped. It seems that subfolders are created by an entirely new chain of IShellFolder instances starting with a new instance of our CHostFolder. This means that they won't be able to receive a pointer to the existing connection pool as this new instance of CHostFolder will initialise a new one.

comment:3 Changed 12 years ago by alamaison

  • Status changed from accepted to closed
  • Type changed from defect to enhancement
  • Resolution set to fixed

Done now ([log:@104:112 log]).

Developed in [source:/branches/feature_connection_pool feature_connection_pool] branch, r104:109 and integrated into the trunk in r110:112.

The connection objects (sessions) are being stored in the Running Object Table (ROT) by item monikers of the form !username@host:port. This is all working a little bit *too* well which worries me. Whenever the root Swish window is closed the stored connections dissapear too. This is exactly the behaviour I wanted but I'm not sure how it's happening. I'm not Release()ing their pointers nor Revoke()ing their ROT tokens as far as I can tell.

Magic, I tell you!

Note: See TracTickets for help on using tickets.