Skip to content

Add Glacier2Connection for interop with Glacier2 #3608

Description

@bernardnormier

Currently, an IceRPC client cannot talk to a server behind Glacier2. I propose to remove this limitation by implementing a new terminal invoker, Glacier2Connection.

Glacier2Connection is similar to a ClientConnection: it maintains a connection to a Glacier2 router. Unlike ClientConnection, Glacier2Connection also associates and maintains a Glacier2 session with its active protocol connection.

The Glacier2ConnectionOptions would be similar to ClientConnectionOptions, with a few additional properties such as:

public bool AuthenticateWithSsl { get; set; }
public string UserName { get; set; } = "";
public string Password { get; set; } = "";
public ServerAddress? ServerAddress { get; set; } // the server address for the Glacier2 router

We also need to figure out a way to return the session proxies to the application, especially upon reconnection. We could provide an action:

public Action<Glacier2.SessionProxy?>? OnNewSession { get; set; }

But that's not great if we want to allow the application to perform async calls on this session before the connection is fully connected and the first "InvokeAsync" goes through. So maybe instead:

public Func<Glacier2.SessionProxy?, Task>? OnNewSession { get; set; }

We could also provide a hook for the protocol connection shutdown. E.g.

// second task = ShutdownRequestedTask
public Func<Glacier2.SessionProxy?, Task, Task>? OnNewSession { get; set; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalProposal for a new feature or significant update
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions