Commit Graph

25 Commits

Author SHA1 Message Date
Sanjay
40cacee931 fix: Drop signer constraint in replicator temporarily (#1298) 2023-08-29 10:07:10 -07:00
Sanjay
35b0d2a281 feat: Support onchain events and username proofs in replicator (#1297) 2023-08-29 08:01:32 -07:00
Manan
ac12e69d1b remove hub_subscriptions on migrate down, add utility functions (#1249) 2023-08-14 14:20:26 -07:00
Manan
cbc45b5a98 fix: resolves conflicts for links_fid_target_fid_type_unique (#1223)
* fix: resolves conflicts for links_fid_target_fid_type_unique

* delete the rows to fix for follow/unfollow back & forth.

* keep the soft deletes but ensure we don't get multiple rows for a follow relation
2023-08-08 23:47:08 -07:00
Manan
7012a4c377 fix: unique hash on links, index embeds (#1174)
* fix: unique hash on links, index embeds

* fixes linting

* handle conflicts on the uniqueness

* remove the 2nd onConflict

* fix: merges embedsDeprecated into embeds

* yarn lint

* remove embedsDeprecated from interface
2023-07-31 22:44:02 -07:00
Tony D'Addeo
1fd9b2b22a docs: improve chron-feed example, upgrade @farcaster packages in examples (#1126)
* docs: fix chronfeed example

* bump farcaster package versions in examples

* run linter
2023-07-13 12:30:09 -05:00
Zach Terrell
9d843aac76 feat: Add hash to links table in postgres replicator (#1113)
* improvement: add hash to links table

* add type to Kysely

* add rome formatting
2023-07-12 11:04:05 -07:00
dependabot[bot]
81bee098b3 build(deps): bump protobufjs (#1094)
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 7.2.3 to 7.2.4.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/protobufjs-v7.2.3...protobufjs-v7.2.4)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 14:32:01 -07:00
Greg Skriloff
41c3b7b72a docs: update schema in the postgres example (#1069) 2023-07-05 20:38:36 +03:00
Varun Srinivasan
4c38067c15 chore: switch from eslint/prettier to rome (#1074)
* chore: add rome config files

* chore: add rome into configs and ci

* chore: remove eslint annotations

* chore: update annotations for rome ignores

* chore: remove prettier
2023-07-04 19:09:15 -07:00
Varun Srinivasan
f176841daf chore: prepare for rome migration (#1077) 2023-07-04 17:48:54 -07:00
Varun Srinivasan
1b0d50d5cb chore: run rome format --write on examples in packages (#1075) 2023-07-04 14:50:48 -07:00
Shane da Silva
f44e0053e5 Backfill links in replicate-data-postgres example (#1034)
This was missed in #1022.
2023-06-23 09:19:29 -07:00
David Furlong
d77ea28995 chore: add links support in the replicate to postgres example (#1022)
* chore: add links support in the replicate to postgres example

* chore: add a surrogate key to links table
2023-06-20 09:15:33 -07:00
Varun Srinivasan
1e8a04210b docs(hub-nodejs): cleanup replicate example readme (#957) 2023-05-10 09:42:49 -07:00
Shane da Silva
532622aa2f fix: Correct time remaining estimate (#956)
We were not calculating this correctly.

While here, also fix the health check to not result in `FATAL` error
messages in the logs.
2023-05-09 22:47:02 -07:00
Shane da Silva
5fee6b4f25 chore: Optimize replication example (#955)
Fetch data in batches and execute jobs concurrently. This reduces the
time estimate from ~4 hours to under 1 hour on my machine.

We could probably make this even faster by implementing a
`getAllMessages` endpoint on the hubs.
2023-05-09 22:07:25 -07:00
Shane da Silva
08354f4f19 Fix typos (#953) 2023-05-09 20:39:08 -07:00
Shane da Silva
ed8bde6f82 Streamline replication example further (#952)
Instead of requiring the user to run `yarn install` followed by `yarn
start`, we simply have them run `docker compose up` to start both the
app and Postgres together. This is much easier and reduces the need for
them to install anything else besides Docker. It also makes cleaning up
the example easier.
2023-05-09 18:45:38 -07:00
Shane da Silva
d8054207b7 chore: Adding missing sections of replication README (#951)
These were missed in 7d98fdf8.
2023-05-08 21:03:53 -07:00
Shane da Silva
7d98fdf844 chore: Improve documentation for replication example (#950) 2023-05-08 20:32:27 -07:00
Shane da Silva
32e660a181 fix: Reduce memory consumption of replication example (#943)
We had a report of one user on modern MacBook with 16GB of memory who
was running into heap allocation issues. This was likely due to the
excessive number of promises we were creating (as well as buffering all
data for each call).

Change the logic to fetch in batches of 1K records at most. This slows
down the initial sync but should reduce the likelihood that someone will
hit a memory limit.

We also specify a custom limit in the `yarn start` command so that when
we test locally we are using the same limit as everyone else.
2023-05-05 15:53:56 -07:00
Shane da Silva
987e1c460b chore: Remove some unused code from replication example (#941) 2023-05-05 11:14:34 -07:00
Shane da Silva
22f53d6c2b Fix handling of conflicts on UserData insertion (#940)
We were using hash as the conflict ID instead of FID + type. Fix this.
2023-05-05 10:26:48 -07:00
Shane da Silva
cc2f5a4fae Add syncing/replication example for Postgres (#938)
Provide a working end-to-end example of syncing data from hubs to a
Postgres database.

This should work with no additional dependencies besides what you
install with `yarn install` and Docker.
2023-05-05 09:56:48 -07:00