Skip to content

SessMan: dedicated gRPC message types#58

Merged
PawelPlesniak merged 6 commits intodevelopfrom
jamesturner246/simpler_grpc
Jul 23, 2025
Merged

SessMan: dedicated gRPC message types#58
PawelPlesniak merged 6 commits intodevelopfrom
jamesturner246/simpler_grpc

Conversation

@jamesturner246
Copy link
Contributor

@jamesturner246 jamesturner246 commented Jul 18, 2025

This is the first in a series of changes which will replace the existing generic gRPC messages (arbitrary data packed to any) to a simpler and more reliable system of purpose-built gRPC messages.

This first PR starts with the Session Manager. Next will come Process Manager and then Controller. There is a sister PR in the drunc repository required to run this (DUNE-DAQ/drunc#485).

One can test by running describe, list_all_sessions and list_all_configs on a connected Session Manager driver.

Benefits:

  1. type safety is better. We know what a message's type is for free
  2. No more Any-type packing and unpacking. This is inefficient and hard to follow.
  3. We will be able to make better use of in-built gRPC features, such as authentication.

@wanyunSu
Copy link
Contributor

Is there a documentation on how to start a Session Manager service and connect to it?

@jamesturner246 jamesturner246 self-assigned this Jul 22, 2025
@jamesturner246
Copy link
Contributor Author

jamesturner246 commented Jul 22, 2025

At the moment, in our frontend testing we are just /usr/sbin/sshd && drunc-session-manager, and connecting to it via something like:

from drunc.session_manager.session_manager_driver import SessionManagerDriver
from drunc.utils.shell_utils import create_dummy_token_from_uname

def get_session_manager_driver() -> SessionManagerDriver:
    """Get a ProcessManagerDriver instance."""
    token = create_dummy_token_from_uname()
    return SessionManagerDriver(
        SESSION_MANAGER_URL, token=token, aio_channel=False
    )

Ed: No documentation now though. Do you want a note added somewhere?

@wanyunSu
Copy link
Contributor

It would be good to start adding a Session Manager session in drunc wiki, similar to the PM: https://github.com/DUNE-DAQ/drunc/wiki/Process-manager

@jamesturner246
Copy link
Contributor Author

Agreed. I will make a separate issue to tackle later though, so I can get these changes done quickly (I am mindful that work on the process manager will be starting soon, so I would prefer to finish before this time):

DUNE-DAQ/drunc#497

Copy link
Contributor

@PawelPlesniak PawelPlesniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested manually
Also passed MSQT, although is independent of tests ran there
LGTM

@PawelPlesniak PawelPlesniak merged commit c8317b9 into develop Jul 23, 2025
1 check passed
@PawelPlesniak PawelPlesniak deleted the jamesturner246/simpler_grpc branch July 23, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants