Skip to content

Commit

Permalink
Replace Distributed with Malt
Browse files Browse the repository at this point in the history
- Remove `workspace_use_distributed` flag. Pluto will now always use
  separate processes.
- Replace calls to `remotecall_eval` with the appropiate Malt calls.
- Replace Distributed with Malt in tests to remove it from dependencies.
  - Add `unmake_workspace` calls in `MacroAnalysis` to prevent creating
    too many processes at the same time.
- Replace Distributed exceptions with Malt exceptions.
- Replace `pid::Integer` with `worker::Worker` in WorkspaceManager.
- Rename `workspaces` to `active_workspaces`.
- Rename `distributed_exception_result` to `workspace_exception_result`.
- Rename `make_distributed_serializable` to `make_serializable`.
  • Loading branch information
savq committed Oct 15, 2022
1 parent 906838c commit b1463dd
Show file tree
Hide file tree
Showing 23 changed files with 208 additions and 271 deletions.
3 changes: 3 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ HypertextLiteral = "ac1192a8-f4b3-4bfe-ba22-af5b92cd3ab2"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MIMEs = "6c6e2e6c-3030-632d-7369-2d6c69616d65"
Malt = "36869731-bdee-424d-aa32-cab38c994e3b"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
MsgPack = "99f44e22-a591-53d1-9472-aa23ef4bd671"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PrecompileSignatures = "91cefc8d-f054-46dc-8f8c-26e11d7c5411"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
RegistryInstances = "2792f1a3-b283-48e8-9a74-f99dce5104f3"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Sockets = "6462fe0b-24de-5631-8697-dd941f90decc"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
Expand All @@ -35,6 +37,7 @@ FuzzyCompletions = "0.3, 0.4, 0.5"
HTTP = "^1.0.2"
HypertextLiteral = "0.7, 0.8, 0.9"
MIMEs = "0.1"
Malt = "^0.7.0"
MsgPack = "1.1"
PrecompileSignatures = "3"
RegistryInstances = "0.1"
Expand Down
5 changes: 0 additions & 5 deletions src/Configuration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ Note that Pluto is quickly evolving software, maintained by designers, educators
end

const RUN_NOTEBOOK_ON_LOAD_DEFAULT = true
const WORKSPACE_USE_DISTRIBUTED_DEFAULT = true
const LAZY_WORKSPACE_CREATION_DEFAULT = false
const CAPTURE_STDOUT_DEFAULT = true
const WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT = nothing
Expand All @@ -140,14 +139,12 @@ Options to change Pluto's evaluation behaviour during internal testing and by do
These options are not intended to be changed during normal use.
- `run_notebook_on_load::Bool = $RUN_NOTEBOOK_ON_LOAD_DEFAULT` Whether to evaluate a notebook on load.
- `workspace_use_distributed::Bool = $WORKSPACE_USE_DISTRIBUTED_DEFAULT` Whether to start notebooks in a separate process.
- `lazy_workspace_creation::Bool = $LAZY_WORKSPACE_CREATION_DEFAULT`
- `capture_stdout::Bool = $CAPTURE_STDOUT_DEFAULT`
- `workspace_custom_startup_expr::Union{Nothing,Expr} = $WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT` An expression to be evaluated in the workspace process before running notebook code.
"""
@option mutable struct EvaluationOptions
run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT
workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT
lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT
capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT
workspace_custom_startup_expr::Union{Nothing,Expr} = WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT
Expand Down Expand Up @@ -254,7 +251,6 @@ function from_flat_kwargs(;
require_secret_for_open_links::Bool = REQUIRE_SECRET_FOR_OPEN_LINKS_DEFAULT,
require_secret_for_access::Bool = REQUIRE_SECRET_FOR_ACCESS_DEFAULT,
run_notebook_on_load::Bool = RUN_NOTEBOOK_ON_LOAD_DEFAULT,
workspace_use_distributed::Bool = WORKSPACE_USE_DISTRIBUTED_DEFAULT,
lazy_workspace_creation::Bool = LAZY_WORKSPACE_CREATION_DEFAULT,
capture_stdout::Bool = CAPTURE_STDOUT_DEFAULT,
workspace_custom_startup_expr::Union{Nothing,Expr} = WORKSPACE_CUSTOM_STARTUP_EXPR_DEFAULT,
Expand Down Expand Up @@ -294,7 +290,6 @@ function from_flat_kwargs(;
)
evaluation = EvaluationOptions(;
run_notebook_on_load,
workspace_use_distributed,
lazy_workspace_creation,
capture_stdout,
workspace_custom_startup_expr,
Expand Down
Loading

0 comments on commit b1463dd

Please sign in to comment.