From 87dfc844beda7d4ba2705ed87413b886817eacd3 Mon Sep 17 00:00:00 2001 From: Bob Chen Date: Thu, 28 Sep 2023 23:00:42 +0800 Subject: [PATCH] Doc add photon-architecture.md --- doc/docs/introduction/how-to-build.md | 2 +- doc/docs/introduction/how-to-integrate.md | 2 +- doc/docs/introduction/photon-architecture.md | 20 ++++++++++++++++++++ doc/docs/introduction/what-is-photon.md | 13 ++----------- doc/docs/introduction/write-first-example.md | 2 +- 5 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 doc/docs/introduction/photon-architecture.md diff --git a/doc/docs/introduction/how-to-build.md b/doc/docs/introduction/how-to-build.md index 5f4e42ec..2562bf0a 100644 --- a/doc/docs/introduction/how-to-build.md +++ b/doc/docs/introduction/how-to-build.md @@ -1,5 +1,5 @@ --- -sidebar_position: 2 +sidebar_position: 3 toc_max_heading_level: 4 --- diff --git a/doc/docs/introduction/how-to-integrate.md b/doc/docs/introduction/how-to-integrate.md index c91954d6..66d7c780 100644 --- a/doc/docs/introduction/how-to-integrate.md +++ b/doc/docs/introduction/how-to-integrate.md @@ -1,5 +1,5 @@ --- -sidebar_position: 3 +sidebar_position: 4 toc_max_heading_level: 4 --- diff --git a/doc/docs/introduction/photon-architecture.md b/doc/docs/introduction/photon-architecture.md new file mode 100644 index 00000000..04b63daa --- /dev/null +++ b/doc/docs/introduction/photon-architecture.md @@ -0,0 +1,20 @@ +--- +sidebar_position: 2 +toc_max_heading_level: 4 +--- + +# Photon Architecture + +The major goal of Photon is to handle concurrency and I/O (including file I/O and networking I/O). + +![architecture](/img/photon.png) + +Its components are: + +* [Thread](../api/thread.md), [vCPU](../api/vcpu-and-multicore.md), timer, sync primitives, gdb extension, emulation of std::thread, task dispatching ... +* Multiple IO wrappers: psync, posix_aio, libaio, io_uring +* Multiple socket implementations: tcp (level-trigger/edge-trigger), unix-domain, zero-copy, libcurl, TLS support, etc. +* High performance RPC client/server, HTTP client/server. +* A POSIX-like filesystem abstraction and some implementations: local fs, http fs, fuse fs, e2fs, etc. +* Common utilities: io-vector manipulation, resource pool, object cache, mem allocator, callback delegator, + pre-compiled logging, lockless ring buffer, defer, range lock, throttle, etc. \ No newline at end of file diff --git a/doc/docs/introduction/what-is-photon.md b/doc/docs/introduction/what-is-photon.md index 7c13fdad..adf86de6 100644 --- a/doc/docs/introduction/what-is-photon.md +++ b/doc/docs/introduction/what-is-photon.md @@ -9,10 +9,10 @@ toc_max_heading_level: 4 ### Coroutine runtime -Photon's runtime is driven by a coroutine lib. Out tests show that it has the [**best**](../performance/network-performance#2-ping-pong) IO performance in the open source world by the year of 2022, even among different programing languages. +Photon's runtime is driven by a coroutine lib. Out tests show that it has the [**best 🔗**](../performance/network-performance#2-ping-pong) IO performance in the open source world by the year of 2022, even among different programing languages. -### Features +### Core Features * Stackful coroutine. Symmetric scheduler. * Non-blocking IO engine. Async event engine. Support epoll / kqueue / **io_uring**. @@ -20,15 +20,6 @@ Photon's runtime is driven by a coroutine lib. Out tests show that it has the [* * Well-designed assembly code on the critical path, to reduce overhead. * Fully compatible API toward C++ std and POSIX. Easy to migrate to legacy codebases. -### Functionalities - -* Multiple IO wrappers: psync, posix_aio, libaio, io_uring -* Multiple socket implementations: tcp (level-trigger/edge-trigger), unix-domain, zero-copy, libcurl, TLS support, etc. -* High performance RPC client/server, HTTP client/server. -* A POSIX-like filesystem abstraction and some implementations: local fs, http fs, f fs, etc. -* A bunch of useful tools: io-vector manipulation, resource pool, object cache, mem allocator, callback delegator, - pre-compiled logging, lockless ring buffer, etc. - ### Users Some open source projects are using Photon as well, for instance: diff --git a/doc/docs/introduction/write-first-example.md b/doc/docs/introduction/write-first-example.md index 5a77fb40..3e6372f4 100644 --- a/doc/docs/introduction/write-first-example.md +++ b/doc/docs/introduction/write-first-example.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 toc_max_heading_level: 4 ---