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

feat(lib): Dispatch methods call, used by FSI #1653

Merged
merged 5 commits into from
Mar 3, 2021
Merged

feat(lib): Dispatch methods call, used by FSI #1653

merged 5 commits into from
Mar 3, 2021

Commits on Mar 2, 2021

  1. feat(lib): Dispatch methods call, used by FSI

    Dispatch is a new mechanism for handling calls invoked on
    the lib.Instance. Calls are sent to dispatch as a method name
    and input parameters. The actual implementation is looked up and
    then invokved using reflection. This allows the http api to
    layer itself directly on top of these same methods, which also
    lets us replace the old rpc style with the http api. It also
    nicely sets us up to introduce multi-tenancy and multi-processing,
    by having a single place that handles incoming requests.
    
    This mechanmism is introduced here, and only used for FSI now.
    Dispatch can be introduced gradually, and does not require
    changing the whole world at once. This PR should serve as a guide
    for how to do the same refactoring for other method groups. Note
    that each FSI method in FSIMethods is now a very thin call to
    Dispatch, and then a type coercion afterwards to get the correct
    return value. Actual implementations live at the bottom of the
    same source file, and each take a Scope, which is a new structure
    to control access to the otherwise global resources in Instance.
    dustmop committed Mar 2, 2021
    Configuration menu
    Copy the full SHA
    afaf06d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f6509b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    95fb6b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8070537 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9b73d4b View commit details
    Browse the repository at this point in the history