Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[openvsx-dev] Open VSX Results
  • From: Aart van Baren <amvanbaren@xxxxxxxxxxx>
  • Date: Tue, 16 Nov 2021 15:35:56 +0000
  • Accept-language: nl-NL, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rU7OnWs+iW0vUgXtmwZM9eF23lnbHItWNoosEoDkXlY=; b=Q+kQ/Ik08o1C9uzDKzoa5wL+SlN/ZMLVrOxJltjfkKVueDQpKia6K84LotrjNtKXzbRh1AAdHnDAT3azgZoaUV94MNDpDSYOc7OQdx6DHMiLLf612cm9MTI8AvH8DTZt9uiiV3zpAj4m9n/4DBKZKiETLMAjIfIlJHXDq/Qg3pPx6Poe/UsCJeLGzL3bfiOYscunJz4CMIWqVtQno+5WibTUNaZtHxyZQLdm9QG2pL1nLZpL+dducb2w8zLgArTu3hoSZmJJrawsNlIcCLF83bD0cAkpYcnKE6GaQGVuxiddyEGR1yiEASRYNwE8J/dOHnYMFVcmabPNCxxgOAw0gg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=POCu7k1wD9BOx23J9sQjatGanqbSyVxChu9/Qqmpb4bGo7TW6Z6zu1uS1V1M/wbHHFwwUG5nEmX8YuKt2M3eths2/fOWSLt/IhNpF/t3HD1FqtNsTvKFQectMsZmC+Yrs4z3bc1SSktkQge3mM6M46Hvx+nde1Tw4MgmM6j6IKcy+4336q2kNi1JvzlVvYyT32aobKJsGrAmFm8zvyv5QAtV2NMGNCkvvfvhwol2uP2KGGxuifIX+RVqiVhkYsORejj9dtk6O72cOtPG66dmnjDQ8lbFrGAMZA1Z8XYKfmP76O2oO3kOgJTt+ZEgLsemM2lDuMu8y7JRSCgtFItRLQ==
  • Delivered-to: openvsx-dev@xxxxxxxxxxx
  • List-archive: <https://dev.eclipse.org/mailman/private/openvsx-dev/>
  • List-help: <mailto:openvsx-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://dev.eclipse.org/mailman/listinfo/openvsx-dev>, <mailto:openvsx-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://dev.eclipse.org/mailman/options/openvsx-dev>, <mailto:openvsx-dev-request@eclipse.org?subject=unsubscribe>
  • Suggested_attachment_session_id: 1164692d-9183-f892-5bda-61905fd102a1
  • Thread-index: AQHX2v8NkquEcRKv3kyofNc7i1Mlng==
  • Thread-topic: Open VSX Results

Hi,


I was sponsored by the Cloud DevTools working group to do some work on Open VSX. My changes touched both the project code at https://github.com/eclipse/openvsx and the service code at https://github.com/EclipseFdn/open-vsx.org. During this time I became a committer for the project.


Here is a summary of what was achieved.

Redundant calls for OPTIONS #287

Work: Added GET method as replacement of POST method for /api/-/query endpoint.

Results: The added GET method is a CORS simple request which doesn’t trigger an OPTIONS request. Additionally the GET method can be cached by a load balancer.

Add Spring caching #280

Work: HTTP responses are already cached by a load balancer and Hibernate caches managed database entities. Instead of adding an additional caching layer, the decision was made to optimize the /vscode/gallery/extensionquery endpoint to research how performance can be improved.

Results: The amount of database queries is greatly reduced by fetching results upfront in bulk instead of one by one while composing the JSON response. Data transfer objects (DTOs) were used instead of managed entities to minimize Hibernate overhead. The downside of this approach is that the resulting queries are verbose string literals that might hurt the project’s maintainability in the future.

Add more cache directives to the server #266

Work: Added Cache-Control response headers where possible.

Results: Responses are cached correctly by the load balancer.

Download Count seems off #283

Work: Configured Azure Blob Storage metrics. Added download count service that pulls in the metrics, extracts the downloads and updates extension download counts.

Results: Open VSX server can keep caching download redirect responses, while accurate download counts are pulled in from Azure Blob Storage. After being broken for an extended period, download count is now working again.

Search leads to unexpected results #244

Work: Added search by extension id (namespace.name) as a first step. No further search algorithm improvements were needed.

Results: Search no longer leads to unexpected results. Users can now search by extension id.

[Admin] Server Error Removing Extension #285, was #447

Work: Removing an extension failed, because there was a mismatch between the expected and actual query parameter type. The issue was resolved by changing the database queries that search for dependencies and bundled extensions.

Results: Admin can remove extensions again.

Deployment Statistics in the Admin Dashboard #235

Work: Added /admin/report endpoint that provides monthly statistics in CSV format.

Results: Admin can request monthly statistics through the admin REST API.

Upload fails with an Internal Server Error #343

Work: Increased extension version tags column size. Added deduplication and sorting logic for new and existing extension version tags.

Results: Tags are deduplicated and sorted the same way as the Visual Studio Marketplace.

Optimize performance for /api/-/query endpoints #356

Work: Reduce database queries by fetching results upfront in bulk. Minimize Hibernate overhead by using DTOs.

Results: After deployment of the changes the open-vsx.org production server saw a 20x decrease in the amount of database transactions needed (from 10.000 to 500 transactions) and a 5x decrease in peak CPU usage (from peaks hitting 5 to peaks slightly over 1).

Use jOOQ instead of DTOs to improve maintainability #358

Work: Configure jOOQ. Rewrite DTO queries to use jOOQ instead.

Results: The rewritten queries will break when the database schema changes, so that errors are discovered in development and can be quickly fixed. String literals are more error prone in general (typos, missing space or comma) than object oriented queries. Using jOOQ improves the maintainability of the Open VSX project.


Overall, the Open VSX project is in a better position for further growth and adoption.

The server performs better, and by refactoring other REST endpoints in a similar way the server can be improved further. Critical usability issues regarding publishing, deleting and searching extensions were resolved. Extension download counts are updated again, after being broken for an extended period.


Special thanks go out to:

Miro Spönemann, for introducing jOOQ to the project and reviewing my pull requests.

Anton Kosyakov, for testing the optimized REST endpoints and reviewing my pull requests.

Mikael Barbero and Frederic Gurr, for helping test the server in the staging environment.

Brian King, for his understanding, guidance and making this sponsorship happen.



Kind regards,

Aart van Baren



Back to the top