Skip to content

Commit 93f768b

Browse files
authored
Merge pull request #10 from nteract/some-roadmapping
2 parents b8ab601 + b04083c commit 93f768b

File tree

3 files changed

+119
-0
lines changed

3 files changed

+119
-0
lines changed

MESSAGING.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
The following is a rough outline how messaging could work between the Tauri Rust backend, the frontend webview, and the kernel runtime.
2+
3+
## Execution messaging
4+
5+
Within this example we're going to assume the kernel is already alive and nothing else is queued or busy.
6+
7+
![Messaging](https://private-user-images.githubusercontent.com/836375/292332142-d5470afc-0962-4a19-94e5-06967cc5c982.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDMyMDAwNjcsIm5iZiI6MTcwMzE5OTc2NywicGF0aCI6Ii84MzYzNzUvMjkyMzMyMTQyLWQ1NDcwYWZjLTA5NjItNGExOS05NGU1LTA2OTY3Y2M1Yzk4Mi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBSVdOSllBWDRDU1ZFSDUzQSUyRjIwMjMxMjIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDIzMTIyMVQyMzAyNDdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04MjdiOWE4NDhmZWZkZTNhZWE2YzdlZjY1ZDlkZTM1YzlkNjEyZmE3ZWI5NjYwZTQwZjUwY2M4ZmEwYzU0YzE0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.9t2XuuaMrUagjRTMQ4RlkdKccMt03wf9DxKCckIf1B8)
8+
9+
10+
1. The Notebook Frontend `invoke`s `execute_cell` by ID.
11+
2. The Tauri Core Backend receives this message, uniquely determines which notebook to work with, and dispatches to the notebook service.
12+
3. The Notebook service creates an `execute_request` which starts running the cell. The , indicated by "Cell running," and sends a confirmation response back to the Tauri Core Backend.
13+
4. The Tauri Core Backend sends a Tauri IPC Response back to the Notebook Frontend as a confirmation.
14+
5. As the cell executes and produces output, the Notebook Backend sends events about the state of the notebook application include cell state (queued, busy, etc.) as well as output back to the Tauri Core Backend.
15+
6. The Tauri Core Backend forwards these events to the Notebook Frontend.
16+
7. Once the cell execution is finished, the Notebook Backend sends a "Cell finished" event to the Tauri Core Backend, which then sends an event to the Notebook Frontend to update the cell state.

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@ nteract next is a desktop application for notebooks built on:
1010
* Tauri
1111
* Tokio
1212

13+
14+
```
15+
+-------------------+ +-------------------+
16+
| Tauri Main Process| | Kernel Sidecar |
17+
+-------------------+ +-------------------+
18+
| ^
19+
| IPC and Events |
20+
v v
21+
+-------------------+ +-------------------+
22+
| State Update | | Jupyter Message |
23+
| Handler | | Handlers |
24+
+-------------------+ +-------------------+
25+
| ^
26+
| Events |
27+
v v
28+
+-------------------+ +-------------------+
29+
| Event Bus |<--->| Notebook Document |
30+
+-------------------+ | Service |
31+
| |
32+
| Events |
33+
v v
34+
+-------------------+ +-------------------+
35+
| Web View of | | In-Memory State |
36+
| Document | | of Document |
37+
+-------------------+ +-------------------+
38+
```
39+
1340
## Development
1441

1542
Clone the repo, cd into `nteract-next`

ROADMAP.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
Project Overview
2+
----------------
3+
4+
**Objective**: Develop nteract v2 as a performant and stable desktop notebook application, focusing on fluid user experience and rapid prototyping.
5+
6+
### Key Features
7+
8+
* **Fluid User Experience**: Emphasis on speed and responsiveness, particularly in creating and manipulating notebook cells.
9+
* **Backend-Managed State**: State management primarily handled by the Rust backend.
10+
* **Performance Focus**: Leverage Tauri's performance benefits to enhance application efficiency.
11+
12+
Lessons from nteract v1
13+
-----------------------
14+
15+
* Transition away from nteract web, content refs, myths, and bundled components.
16+
* Adopt a one notebook per window approach.
17+
18+
Strategy for nteract v2
19+
-----------------------
20+
21+
* Build an integrated application, not a modular toolkit.
22+
* Offload outputs to a content store for standardization and performance.
23+
* Emphasize a design that facilitates fluid interactions and rapid prototyping.
24+
* Switch to Tailwind CSS and/or shadcn/ui for UI development.
25+
26+
Technical Decision: Tauri vs. Electron
27+
--------------------------------------
28+
29+
* Preference for Tauri due to its performance benefits and alignment with the project's renewed focus, despite Electron's familiarity and more complete API set.
30+
31+
Phases of Development
32+
---------------------
33+
34+
### Initial Phase: Planning and Research
35+
36+
👇🏻 You are here 👇🏾
37+
38+
* Define the project scope and technical requirements.
39+
* Research Tauri's capabilities
40+
* Investigate integration with Jupyter kernels.
41+
* Draft a detailed design document outlining the desired user experience.
42+
43+
#### Integration and Testing
44+
45+
* Continuous integration of separate backend and frontend components
46+
* Develop end-to-end tests using a real kernel
47+
48+
#### Deployment and Documentation
49+
50+
* Ongoing preparation for frequent releases with a focus on CI/CD efficiency
51+
* Continuous development of documentation and user guides
52+
* Foster community involvement and establish contribution guidelines
53+
54+
### Phase I: Prototype
55+
56+
#### Backend Development (Rust)
57+
58+
* Implement functions for notebook manipulation and interaction with Jupyter kernels.
59+
* Establish communication protocols with the frontend.
60+
* Create a notebook backend to keep track of the ongoing document, a running kernel, and establish handlers for document changes
61+
62+
#### Frontend Development
63+
64+
* Design and implement the notebook viewing and editing interface using Tailwind CSS.
65+
* Focus on creating a immersively iterable notebook for prototyping
66+
* Rely on the backend to have the source of truth for the notebook state as well as kernel state, only looking to the frontend as the view layer
67+
68+
### Phase II: CRDT
69+
70+
* Integrate CRDT logic for real-time editing and synchronization with the backend.
71+
72+
Risk Management
73+
---------------
74+
75+
* Address challenges in adopting new technology (Tauri) and integrating it with existing systems.
76+
* Ensure a balance between performance focus and maintaining an intuitive and engaging user interface.

0 commit comments

Comments
 (0)