From 58ebd1ec301efb509c90717611fdca12dab804e9 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Fri, 7 Jan 2022 08:34:24 +0200 Subject: [PATCH 1/4] Updated architecture --- README.md | 10 +++++++ docs/specs/overview.drawio.svg | 53 ++++++++++++++++++++-------------- 2 files changed, 42 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index df3cd5f28..e7931f999 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ Table of Contents: - [Client](#client) - [Server](#server) - [Community](#community) +- [Architecture](#architecture) - [Contributing](#contributing) - [Security](#security) - [Follow Us](#follow-us) @@ -143,6 +144,15 @@ Below is a list of currently supported platforms and languages. If you wish to h Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)! + +## Architecture + +![Appwrite Architecture](docs/specs/overview.drawio.svg) + +Appwrite uses a microservices architecture that was designed for easy scaling and delegation of responsibilities. In addition, Appwrite supports multiple APIs (REST, WebSocket, and GraphQL-soon) to allow you to interact with your resources leveraging your existing knowledge and protocols of choice. + +The Appwrite API layer was designed to be extremely fast by leveraging in-memory caching and delegating any heavy-lifting tasks to the Appwrite background workers. The background workers also allow you to precisely control your compute capacity and costs using a message queue to handle the load. You can learn more about our architecture in the [contribution guide](CONTRIBUTING.md#architecture-1). + ## Contributing All code contributions - including those of people having commit access - must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code. diff --git a/docs/specs/overview.drawio.svg b/docs/specs/overview.drawio.svg index f86059e2a..e79d96c82 100644 --- a/docs/specs/overview.drawio.svg +++ b/docs/specs/overview.drawio.svg @@ -1,4 +1,4 @@ - + @@ -201,13 +201,13 @@
- Pub/Sub (Redis) + Queue (Redis)
- Pub/Sub (Redis) + Queue (Redis) @@ -239,13 +239,13 @@
- Database (MariaDB) + Database
- Database (MariaDB) + Database @@ -404,22 +404,20 @@ - - - +
- Deletes + Maintenance
- Deletes + Maintenance
@@ -450,9 +448,7 @@ - - - + @@ -530,8 +526,6 @@ - - @@ -541,13 +535,13 @@
- Tasks + Database
- Tasks + Database @@ -678,13 +672,13 @@
- Scheduler + Deletes
- Scheduler + Deletes @@ -714,13 +708,13 @@
- Antivirus (ClamAV) + AntiVirus (ClamAV)
- Antivirus (ClamAV) + AntiVirus (ClamAV) @@ -743,6 +737,23 @@ + + + + +
+
+
+ Scheduler +
+
+
+
+ + Scheduler + +
+
From 41138b130f7d2f167f63e4ea5d849f1fd8044f84 Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Fri, 7 Jan 2022 09:33:41 +0100 Subject: [PATCH 2/4] Fixed boolean request filters on listDocuments --- src/Appwrite/Utopia/Request/Filters/V12.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V12.php b/src/Appwrite/Utopia/Request/Filters/V12.php index b06a56159..1bb3e59b9 100644 --- a/src/Appwrite/Utopia/Request/Filters/V12.php +++ b/src/Appwrite/Utopia/Request/Filters/V12.php @@ -141,7 +141,13 @@ class V12 extends Filter if(isset($usedOperator)) { [ $attributeKey, $filterValue ] = \explode($usedOperator, $filter); - $filterValue = \is_numeric($filterValue) ? $filterValue : '"' . $filterValue . '"'; + if($filterValue === 'true' || $filterValue === 'false') { + // Let's keep it at true and false string, but without "" around + // No action needed + } else { + $filterValue =\is_numeric($filterValue) ? $filterValue : '"' . $filterValue . '"'; + } + $query = $attributeKey . '.' . $operators[$usedOperator] . '(' . $filterValue . ')'; \array_push($queries, $query); } @@ -152,7 +158,6 @@ class V12 extends Filter unset($content['search']); unset($content['filters']); - unset($content['search']); $content['queries'] = $queries; return $content; From ff09547ed747e006363a00b573ad6093dc39b28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Fri, 7 Jan 2022 09:46:28 +0100 Subject: [PATCH 3/4] Update src/Appwrite/Utopia/Request/Filters/V12.php --- src/Appwrite/Utopia/Request/Filters/V12.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Request/Filters/V12.php b/src/Appwrite/Utopia/Request/Filters/V12.php index 1bb3e59b9..6c2fe0b9b 100644 --- a/src/Appwrite/Utopia/Request/Filters/V12.php +++ b/src/Appwrite/Utopia/Request/Filters/V12.php @@ -145,7 +145,7 @@ class V12 extends Filter // Let's keep it at true and false string, but without "" around // No action needed } else { - $filterValue =\is_numeric($filterValue) ? $filterValue : '"' . $filterValue . '"'; + $filterValue = \is_numeric($filterValue) ? $filterValue : '"' . $filterValue . '"'; } $query = $attributeKey . '.' . $operators[$usedOperator] . '(' . $filterValue . ')'; From 468b84d01cd1bce1787a6df61f1552b761329df3 Mon Sep 17 00:00:00 2001 From: Matej Baco Date: Fri, 7 Jan 2022 11:15:20 +0100 Subject: [PATCH 4/4] Added sum to request, added format to realtime --- app/views/console/home/index.phtml | 4 ++-- public/dist/scripts/app-all.js | 3 ++- public/dist/scripts/app.js | 3 ++- public/scripts/filters.js | 7 +++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/views/console/home/index.phtml b/app/views/console/home/index.phtml index 02b9fe294..40ec64cea 100644 --- a/app/views/console/home/index.phtml +++ b/app/views/console/home/index.phtml @@ -97,13 +97,13 @@ $usageStatsEnabled = $this->getParam('usageStatsEnabled', true);
-
N/A
+
N/A
Requests
- 0 + 0
Connections
diff --git a/public/dist/scripts/app-all.js b/public/dist/scripts/app-all.js index 9fb064cbd..3f687fb85 100644 --- a/public/dist/scripts/app-all.js +++ b/public/dist/scripts/app-all.js @@ -3647,7 +3647,8 @@ let units=["kB","MB","GB","TB","PB","EB","ZB","YB"];let u=-1;do{$value/=thresh;+ let thresh=1000;if(Math.abs($value)=thresh&&u=thresh&&u