Replies: 8 comments 15 replies
-
Just a quick note for those who are starting to pull their hair out: Same with Tauri for the webview |
Beta Was this translation helpful? Give feedback.
-
I wouldn't use HTTP & WS except when working with Graviton Web. IPC is much more optimized and integrated. |
Beta Was this translation helpful? Give feedback.
-
Looks great! I would be happy to help with the graviton core library, especially with the text handling (piece table implementation, file systems, etc.) |
Beta Was this translation helpful? Give feedback.
-
I can help with the Build system / CI, packaging and bundling related-stuff! |
Beta Was this translation helpful? Give feedback.
-
Besides the editor itself, it would be also great to update the dependencies in https://github.com/Graviton-Code-Editor/website, such as updating NextJS v10 to v12. |
Beta Was this translation helpful? Give feedback.
-
Just merged the changes from the rewrite into the main branch. |
Beta Was this translation helpful? Give feedback.
-
I am seriously thinking about making the Core crate, transport-agnostic, meaning that instead of opening up a HTTP JSON RPC and a WebSockets server itself, it will provide an interface in which to implement a transport. In that case, I would provide two optional implementations by default. On a "local" one, meaning that the communication is done through the same Rust process, just like https://docs.rs/jsonrpc-core-client/18.0.0/jsonrpc_core_client/transports/local/index.html . And second, something like what it is right now, an HTTP JSON RPC and WebSockets. And finally, make the desktop app use the "local" transport. This will mean more security and speed, but also not possible to do the idea of reusing the same core for multiple instances. |
Beta Was this translation helpful? Give feedback.
-
Great idea! |
Beta Was this translation helpful? Give feedback.
-
Graviton Rewrite
The main idea behind this possible rewrite is to have different re-usable modules which can be used to build different types of Graviton Instances. I think that it will highly improve the scalability, maintainability and make it easier for people to contribute to. Also, I need to make an effort to make a better documentation.
There will not be any more NodeJS (except for developing purposes such as using NPM) or ElectronJS.
Instead, there will be a backend written in Rust and then frontends that will communicate to the backend. These frontends could be written in any language that supports HTTP requests and WebSockets connections.
The modules would be something like:
Graviton Core
Graviton core will be written in Rust for speed and safety. It will have a JSON RPC HTTP server for normal method calls and a WebSockets server to emit events from the core to the connected frontends.
It will also persist all the frontend states, so they could reconnect and still have the previous session as it was.
Example situation
There could be a Graviton Core service running in a server and multiple frontends that could connect to it as if it was in the same machine. This would be like connecting to an external machine but with zero overhead, because that's how it already works.
Piece table
It would be great to have a
Piece Table
system where changes could be tracked and then when saving a file from a frontend, instead of sending the whole new file to the core, the changes from thepiece table
would be sent. And then, in the Core, properly apply the receivedpiece table
to the original file. This will make it faster when communicating the Core and the frontend with large files.More about
Piece table
:Graviton Web
This will be written in React ;)
Graviton Extensions
All extensions would be installed in the Graviton Core and loaded in the corresponding frontend state in the backend. Extensions would make use of an API that has the ability to create widgets / components that they are then interpreted into the corresponding frontend. So there is no need to every frontend load the extension itself, and therefore, it only needs to support the API.
Feel free to propose new ideas or improve whatever I said !
Beta Was this translation helpful? Give feedback.
All reactions