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

Implement a Stacked Scratch Area #152

Closed
wants to merge 2 commits into from

Conversation

jtenner
Copy link
Contributor

@jtenner jtenner commented Nov 10, 2022

This allows for messages to be stacked. Calling create_message() adds a message onto the stack, and any message modificatiosn modify the message on the top of the stack.

This is an experiment per a discussion I had with @bkolobara .

@tqwewe
Copy link
Member

tqwewe commented Nov 15, 2022

This is interesting, whats the main benefit of this, is it to be able to store multiple thingsi n the scratch area?

@withtypes
Copy link
Contributor

I also played with similar ideas:

  • you create a new message and receive a handle that you can use (write into it, drop it, send it once or multiple times)
  • you receive a message and receive a handle and you can decide to read only a few bytes, to forward it, or drop it when you don't want to keep it in lunatic memory anymore

@bkolobara
Copy link
Contributor

There could also be an opportunity for a bigger abstraction here. Instead of message handles, we could be creating general buffers in the vm. They could be sent as part of messages, but also be used for other stuff, like "read a tcp stream into a buffer, one process checks just a few bytes (path) and dispatches it to a handler".

@jtenner
Copy link
Contributor Author

jtenner commented Nov 16, 2022

I don't know what the right decision is, but I want to revisit this further. It would involve refactoring the entire message api altogether.

@jtenner jtenner closed this Dec 8, 2022
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.

None yet

4 participants