Skip to content

[FEATURE]: Support running Mostly without FastAPI/Gunicorn in local mode #527

@spreeni

Description

@spreeni

Feature Summary

Mostly currently starts a FastAPI server that the client communicates with, even in local mode. It would be useful to bypass this server when running locally to avoid the overhead and simplify integration.

Problem and Solution

I noticed that mostly seems to run a fastapi server with which the client then communicates in local mode. I assume this is to be consistent with the cloud offering, which I understand. But it would be nice to have the option to directly run functions without the overhead of needing fastapi+gunicorn dependencies and running a server locally.

As I want to utilise mostly in a webservice of my own, this complicates that and leads to errors around nested event loops.

It's also a bit unintuitive that the Mostly client starts a webserver in the background - if that's correct - as it seems to prevent splitting the FastAPI service and client across separate Docker containers.

What’s the current recommended approach for using Mostly in a Dockerized web service? And could local-only usage work without the FastAPI intermediary?

Potential Alternatives

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions