WasmEdge / docs

https://wasmedge.org/docs/
Apache License 2.0
17 stars 57 forks source link

Networking related docs update #150

Closed juntao closed 1 year ago

juntao commented 1 year ago

Explanation

Improve the organization and instructions how to best use networking libraries in Rust and JS. Specifically will address HTTPS and TLS use cases.

alabulei1 commented 1 year ago

Hello, I am a code review bot on flows.network. Here are my reviews of code commits in this PR.


Overall summary:

The majority of the patches in this pull request focus on improving the clarity, organization, and correctness of the networking-related documentation. There are several potential issues and errors identified, including missing anchor texts for links, duplicated information, incomplete descriptions of changes, lack of context or reasoning for certain modifications, and potential compatibility or functionality differences with command replacements.

The most important findings are related to the changes in list style, the clarification of asynchronous and non-blocking behavior, and the modification of code snippets for proper command usage.

To improve the pull request, it is recommended to provide more specific details about the changes made within each section, address the potential problems and errors mentioned, and ensure that the modifications align with the project's requirements and provide sufficient context and explanation for users. Additionally, validating the changes through tests or verification processes is suggested to ensure accuracy and completeness.

Details

Commit 174c685ded26ce0db06b7bc1aad3f9b0a9119951

Key changes in this patch include:

  1. Improved wording and links in the document.
  2. Update of the section titles to make them clearer.
  3. Removal of unnecessary information.
  4. Reorganization of the content.

Potential problems:

  1. Some links to external resources are missing proper anchor texts, which can make it harder for users to understand the purpose of the links.
  2. The note about installing the WasmEdge TLS plug-in seems to be duplicated for the http_req and reqwest sections. It should be clarified whether it applies to both sections or only to a specific one.

Commit 2a29cc91586022d658231e281d99da91a94fc426

Key changes:

Potential problems:

Commit b5ca41a8fa2a199aa9e92154bed1b68f889743d1

Key changes:

Potential problems:

Commit 76ffb61442248cf0454bbbeca84082992a3dd41b

Key changes:

Potential problems:

Commit 7ddfb144738d9c107137384257f5c324cccc2f2c

Key changes in the patch:

The most important finding is the change in list style, from an unordered list (*) to an ordered list (-), for the sections on the warp API and the hyper API.

Potential problems:

Commit a3806ec99f4a36eb4f8458a916cc18518f7c4290

Key changes in this patch:

  1. The title of the section has been changed from "Client" to "Socket client".
  2. The introductory paragraph has been updated to mention that WasmEdge applications can open TCP/IP or UDP network sockets in the host system.
  3. The link to the wasmedge_wasi_socket crate has been moved to be mentioned after the description of non-blocking sockets.
  4. The chapter now focuses on building HTTP clients on TCP sockets, and recommends checking out the "HTTP client" chapter for production HTTP clients.

Potential problems:

  1. The patch does not mention any updates to the content of the section, only the reorganization and introduction changes are mentioned. It is unclear from the patch what specific changes were made within each of the sub-sections ("A simple HTTP client based on TCP sockets" and "A non-blocking HTTP client based on TCP sockets").
  2. The link to the "HTTP client" chapter is mentioned, but it is not clear if the content of that chapter has been updated or if it is still relevant to this section.

Overall, it seems that the patch focuses on reorganizing and clarifying the introduction of the section, but more information is needed to understand the complete set of changes made.

Commit ed67c42a63283bd2b805413b77390603ab5602a3

Key changes in the patch:

  1. The title of the chapter has been updated from "Server" to "Socket server".
  2. The introductory paragraph has been modified to clarify that the WasmEdge socket API allows Rust developers to work directly on the TCP and UDP socket level.
  3. A link to the "HTTP server" chapter has been added for users seeking a production-ready HTTP server implementation.
  4. The code snippets have been updated to use the "wasmedge compile" command instead of "wasmedgec".

Potential problems:

  1. None of the changes seem problematic. They appear to be updates and improvements to the documentation. However, without the full context of the project and its requirements, it is difficult to assess if the changes fully meet the project's needs.

Commit a6deedf726e132730c1d3afadf6913da2abb0e90

Key changes:

Potential problems:

Commit 63618c27341b62f543693440842628907481ad8b

Key changes in the patch:

Potential problems:

Commit c35026d7dd0a48b606f6da02b47cba52e8ea4535

Key changes:

Potential problems:

Overall, this patch updates the compile command for better performance in the documentation related to the Rust HTTP server examples.

Commit a6fb662cb89859e4f7edaae5cbc369e12d25508f

Key changes:

Potential problems:

Commit 10598aa6c901d459fecfd1d178a18c4761d8c328

Key changes:

Potential problems:

Suggestions:

Commit f073b126eb4921dae31fb1dd4fb210b3c9746732

Key Changes:

Potential Problems:

Overall, the changes in the patch seem to be focused on improving the clarity and accuracy of the installation instructions. However, further review and validation may be necessary to ensure the changes are correct and comprehensive.

Commit 3bd0c51f0d061be5905db9a3bf7764d9fc698ae9

Key changes:

Potential problems:

Commit f1876dd3b646c98e0125d2be5a162ce6490bd718

Key changes:

  1. The download link for the WasmEdge TLS plugin has been updated to version 0.2.0.
  2. The command to unzip the downloaded file has been changed to use the unzip command instead of tar.
  3. The path to the compiled plugin library has been updated to target/release/libwasmedge_rustls.so.

Potential problems:

  1. The download link and file names may need to be verified to ensure they are accurate and up-to-date.
  2. The plugin installation instructions assume the user has already installed WasmEdge. It may be helpful to include instructions on how to install WasmEdge if it hasn't been installed yet.
  3. The commands to copy the plugin library to the appropriate directory assume a specific file structure and may not be applicable to all users. Additional instructions or checks may be necessary to handle different installation scenarios.
  4. The link at the end of the document references a chapter titled "HTTPS request in Rust", but it is unclear if this is the correct reference. It may need to be checked and updated if necessary.

Commit 12b57baf30021b7693bd22fab610756330f48577

Key changes in this patch:

  1. Improved HTTPS instructions in the docs/develop/rust/http_service/client.md file.
  2. Added a new code example for an HTTPS GET request in the docs/develop/rust/http_service/client.md file.
  3. Added a new code example for an HTTPS POST request in the docs/develop/rust/http_service/client.md file.
  4. Improved the instructions for the http_req_wasi crate in the docs/develop/rust/http_service/client.md file.
  5. Added a new code example for an HTTPS GET request using the http_req_wasi crate.
  6. Added a new code example for an HTTPS POST request using the http_req_wasi crate.

Potential problems:

  1. The patch does not mention why the HTTPS instructions were improved or if there were any issues with the previous instructions.
  2. The patch does not provide detailed explanations for the code examples or any relevant context.
  3. The patch assumes that readers are already familiar with certain concepts and technologies (e.g., WasmEdge, Rust, hyper crate, http_req_wasi crate).
  4. The patch does not address potential security concerns or best practices when dealing with HTTPS requests.
  5. The patch does not mention if any tests were added or updated alongside the code changes.

Overall, the patch mainly focuses on improving the instructions and adding new code examples for HTTPS requests. However, it lacks some important information and details that would enhance the clarity, context, and security of the documentation.