-
Notifications
You must be signed in to change notification settings - Fork 41
IO Design
Ilya Sher edited this page Jan 23, 2022
·
7 revisions
-
echo()
,log()
,warn()
,debug()
, etc functions should continue working as is (without any changes to code)- It is OK to change the implementation and have some underlying complexity to allow the required flexibility
- Support being the backend of Web UI
- Support being the backend (aka kernel) of Jupyter
- Very convenient work with
- stdin/stdout/stderr
- files
- Support blocking IO (at least as interface) because it's very convenient in many cases
- Support messages routing considering the following use case: in console, some messages will go to stdout and some to stderr while when functioning as a Jupyter or Web backend the messages will go through same channel/socket.
- Each message should carry rich metadata which can be lost during serialization, when the destination does not support the provided metadata.
- Modeled after Netty, which uses intercepting filters pattern.
- Types
-
Channel
(and appropriate subtypes) ChannelPipeline
- (TBD)
-
- Types
- Probably: Global
IO
variable, instance of (TBD, probablyChannel
), encapsulating both input and output.
- Have a
Buf
type?
NGS official website is at https://ngs-lang.org/