Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a event-based handling of callbacks #9

Open
utkarsh867 opened this issue Jul 10, 2023 · 1 comment
Open

Using a event-based handling of callbacks #9

utkarsh867 opened this issue Jul 10, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@utkarsh867
Copy link
Member

Here is the details of a major change that I wish to implement in the library.

Currently, meteorite takes in HTTP requests, passes the data into the callback and sends the HTTP response back to the requester. This does not work well with the nature of machine learning applications. Most jobs in ML inference are usually long-running and require more than a few seconds to process. HTTP Req-Res does not work as well as we would like.

As new requests come to the server, the server tries to process all of them at the same time as well, which is a huge problem if meteorite needs to become a inference API endpoint in the first place. Consider a scenario where this is running on a GPU. There is no reasonable way to control resource usage.

Given that we need to take a different approach than HTTP req-res, we will either need to make this a socket connection, or gRPC. I am leaning more towards sockets, but I am not sure if that is the best decision.

This also implies that the library will eventually need a client, at least for python and maybe Go (just for kicks :P). That would become a priority as we make this change because complying with the requirement of the endpoint will become harder. I would like the user-end experience to remain a req-res kind, while the client would handle the connection.

@utkarsh867 utkarsh867 added the help wanted Extra attention is needed label Jul 10, 2023
@utkarsh867
Copy link
Member Author

Recent PR #13 adds webhooks as a method of handling job queues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant