Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor user activity queries #9526

Merged
merged 19 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions common_knowledge/Caching.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ _"There are only two hard things in Computer Science: cache invalidation and nam
- Choosing a right TTL could be very important, as app data is highly transactional

- **Caching Namespace:**
- Global - eg. /api/viewGlobalActivity
- User Specific - eg. /api/viewUserActivity or /api/status
- Global - eg. /api/internal/trpc/feed.GetGlobalActivity
- User Specific - eg. /api/internal/trpc/feed.GetUserActivity or /api/status

- **Hybrid Request Handler** -> Fetch followed by tracking of user activity
eg. get chain data & record current chain selected by user - these kind of request handler can only utilize sequelize result caching
Expand Down
2 changes: 1 addition & 1 deletion common_knowledge/Performance-Benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ _See also full [Datadog](./Datadog.md) entry._

We've implemented two new performance dashboards to monitor and track improvements in latency and call volume over time.

These dashboards serve a key role in prioritizing improvements by highlighting high call volume and slow endpoints. They are instrumental in monitoring the effect of improvements over time, as shown by specific examples corresponding to PRs like `getAddressProfile` larger batches and performance enhancements in backend API calls such as `/viewUserActivity` and `/status`. Additionally, they can effectively detect abnormal spikes in latency and call volume through real-time metrics reported to Datadog.
These dashboards serve a key role in prioritizing improvements by highlighting high call volume and slow endpoints. They are instrumental in monitoring the effect of improvements over time, as shown by specific examples corresponding to PRs like `getAddressProfile` larger batches and performance enhancements in backend API calls such as `/feed.GetUserActivity` and `/status`. Additionally, they can effectively detect abnormal spikes in latency and call volume through real-time metrics reported to Datadog.

## Change Log

Expand Down
22 changes: 21 additions & 1 deletion libs/api-client/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Common API

## TODO: write readme file
## Documentation

[Fern API Reference](https://common.docs.buildwithfern.com)

## CI/CD Instructions (Developers)

- TODO

## Manual Setup (Developers)

### Generate a new API client

- Start app with `pnpm start` so fern can refresh the lastest `openapi.spec` from `http://localhost:8080/api/v1/openapi.json`
- Run `pnpm generate-client` to generate:
- A new `fern/openapi/openapi.yml` file
- A client API in `/src`, formatted with our root `.prettierrc.json` config

### Deploy a new API client

- Update the version in `package.json`
- Run `pnpm publish` to publish the client
2 changes: 1 addition & 1 deletion libs/api-client/fern/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
instances:
- url: https://Common.docs.buildwithfern.com
- url: https://common.docs.buildwithfern.com
title: Common | Documentation
navigation:
- api: API Reference
Expand Down
2 changes: 1 addition & 1 deletion libs/api-client/fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "Common",
"version": "0.43.5"
"version": "0.44.11"
}
Loading
Loading