ohsu-comp-bio / funnel

Funnel is a toolkit for distributed task execution via a simple, standard API.
https://ohsu-comp-bio.github.io/funnel
MIT License
120 stars 32 forks source link

Allow Funnel to run tasks against custom domain socket #809

Open lbeckman314 opened 7 months ago

lbeckman314 commented 7 months ago

Overview

General Use Case: user launches funnel and then launches another process to issue the jobs, all while using named sockets to handle communication between the funnel server and the job issuer process. This would allow the job issuer process to use existing file permissions as the socket network by inheriting permissions from the containing directory.

Specific Use Case: user launches funnel on an Exacloud head node with jobs scheduled by Slurm.

This feature should be configurable from the funnel command line:

Funnel server:

funnel server run --socket ./my_socket

Job issuer:

funnel task create my_task.json --socket ./my_socket

Testing

Minimal testing environment:

Additional Resources

Python Implementation

# Create the Unix socket server
server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)

# Bind the socket to the path
server.bind(socket_path)

UNIX Domain Sockets Zine by @jvns

https://wizardzines.com/comics/unix-domain-sockets/

lbeckman314 commented 7 months ago

Overview

Diagrams for designing and implementing Funnel on Exacloud Google Docs Link

Here we are documenting the required connections between the three different entities involved with Funnel's task execution:

  1. The Funnel Server
  2. The Job Submitter
  3. The Task Executor

⚠️ Note: these diagrams outline features under active development and may not accurately reflect Funnel's default behavior.

Funnel on Generic Platform

funnel

Google Diagram Link

Funnel Exacloud

funnel-on-exacloud

Google Diagram Link