mitre / mitre/GraphEx

Replace flask development server backend with production one

Open
#18 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

We should stop using flask server and replace it with a production one. Since we are using SocketIO, one of the highest recommended packages is 'eventlet'.

Add 'eventlet' to 'install_requires' in setup.py as a required dependency.

Then update some of the code for socketio in graphex/server.py:

socketio = SocketIO(
    app,
    async_mode="eventlet",            # make the backend explicit
    path="/api/socket.io",
    cors_allowed_origins="*",
    logger=False,
    engineio_logger=False
)

and

self.socketio.run(
    app=self.app,
    host="0.0.0.0",
    port=port,
    ssl_context=self.ssl_context,
    debug=False
)

Then do some testing to determine nothing is broken with executing existing graphs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with setup.py to inspect install_requires and graphex/server.py to trace the SocketIO setup and server run call. Add the required production dependency and apply the specified SocketIO and run configuration. Exercise existing graph execution to confirm that serving and graph execution still work without breakage.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.