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

Add support for encoded local pids in external terms #1358

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Nov 3, 2024

Fixes #1350

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch 2 times, most recently from 1ab1736 to 52b078b Compare November 3, 2024 23:06
src/libAtomVM/term.h Fixed Show fixed Hide fixed
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch 3 times, most recently from 73518c6 to cf631d6 Compare November 7, 2024 21:49
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from cf631d6 to 2d5b599 Compare November 24, 2024 22:26
@pguyot pguyot marked this pull request as draft November 24, 2024 22:26
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch 2 times, most recently from 2cc981a to 00a48e0 Compare November 24, 2024 23:16
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch 2 times, most recently from 6fbbaf9 to 66affbd Compare December 6, 2024 21:38
@pguyot pguyot changed the base branch from main to feature/distributed-erlang December 6, 2024 21:38
@pguyot pguyot marked this pull request as ready for review December 6, 2024 21:38
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from 66affbd to cf02197 Compare December 7, 2024 07:32
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from cf02197 to 6b5607b Compare December 14, 2024 13:42
src/libAtomVM/ets_hashtable.c Show resolved Hide resolved
tests/erlang_tests/test_node.erl Outdated Show resolved Hide resolved
src/libAtomVM/term.h Outdated Show resolved Hide resolved
src/libAtomVM/externalterm.c Outdated Show resolved Hide resolved
src/libAtomVM/term.h Outdated Show resolved Hide resolved
src/libAtomVM/term.h Outdated Show resolved Hide resolved
src/libAtomVM/externalterm.c Show resolved Hide resolved
src/libAtomVM/term.h Outdated Show resolved Hide resolved
src/libAtomVM/term.h Outdated Show resolved Hide resolved
src/libAtomVM/term.h Outdated Show resolved Hide resolved
@bettio
Copy link
Collaborator

bettio commented Dec 16, 2024

As an additional comment to this PR I was thinking that it might be a good idea to keep part of the distributed erlang code optional, so we can save some flash space on devices that have no network connection or no other companion chips.
Of course we should make sure that de-serializing an external pid on those devices will not crash the VM.

@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from 6b5607b to dc8ec8a Compare December 16, 2024 21:35
src/libAtomVM/term.h Fixed Show fixed Hide fixed
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from dc8ec8a to 98d5eff Compare December 18, 2024 21:12
@pguyot
Copy link
Collaborator Author

pguyot commented Dec 18, 2024

As an additional comment to this PR I was thinking that it might be a good idea to keep part of the distributed erlang code optional, so we can save some flash space on devices that have no network connection or no other companion chips. Of course we should make sure that de-serializing an external pid on those devices will not crash the VM.

Distribution could happen over serial. I suggest we focus on keeping the VM small separately, as there could be more effective ways than adding more ifdefs to the project.

@bettio
Copy link
Collaborator

bettio commented Dec 19, 2024

As an additional comment to this PR I was thinking that it might be a good idea to keep part of the distributed erlang code optional, so we can save some flash space on devices that have no network connection or no other companion chips. Of course we should make sure that de-serializing an external pid on those devices will not crash the VM.

Distribution could happen over serial. I suggest we focus on keeping the VM small separately, as there could be more effective ways than adding more ifdefs to the project.

Seems a good point.

src/libAtomVM/memory.c Outdated Show resolved Hide resolved
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from 98d5eff to 27e5e33 Compare December 21, 2024 21:25
Also add partial support for external pids.

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot force-pushed the w44/encode_and_decode_local_pids branch from 27e5e33 to 941b581 Compare December 21, 2024 21:33
@bettio bettio merged commit fae8f60 into atomvm:feature/distributed-erlang Dec 21, 2024
96 of 100 checks passed
@pguyot pguyot deleted the w44/encode_and_decode_local_pids branch December 21, 2024 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

external format doesn't support pids
2 participants