Closed mattriese closed 3 months ago
Thank you @mattriese Let me write down a few notes that might help you:
In the client-side-db project, each implementation uses the same angular components and setup. Only the logic-interface is different for each implementation. For example the pouchdb logic is here: https://github.com/pubkey/client-side-databases/blob/master/projects/pouchdb/src/app/app.logic.ts This is the crucial part to make it work, so for electric-sql, you have to implement that logic via electric instead of pouchdb.
All subprojects use the same e2e test suite, so when you have implemented the logic, you can add a test:electric-sql script and run that (see package.json for the other scripts)
Adding backend replication would be great but is NOT required. Having only implemented the client side part is also ok.
Do not forget to add the electric test scripts to the CI
udpate: I would like another couple weeks to finish this.
@mattriese No problems, thanks for the update.
Update: I have a first pass at translating the logic to use electric-sql and setting up the scripts so the project will run. But the auto-generated typescript electric-sql client is being generated with many typescript errors, so it won't build. I asked about this in the electric-sql discord today but haven't got a response yet. If I don't hear back about that I will try manually fixing the type issues when I have some time this week.
How will I make a PR when it is working? will you grant me write access to this repo?
Also, when I try to run the projects in this repo and use them in the browser, only the Firebase projects works. And it only fully works in production mode. In dev mode it does not load the chat history, but I can add new messages. All the other projects get stuck on the loading spinner after I enter my name. (I haven't tried the AWS project because of the extra steps). I'm not sure what the problem is, but PouchDB, WatermelonDB, Dexie, and Loki all have an error on the server related to ng-cli-ws, like '"GET /ng-cli-ws" Error (404): "Not found"' PouchDB and WatermelonDB get the "user document not found" log in the client.
The e2e tests do seem to run fine, though.
How will I make a PR when it is working?
Just make a single PR and I will merge it.
For your problems, maybe you want to clear the browser state in the "applications" tab in the dev tools. That might help. The projects build in the CI and the tests work, so it should be also working for you.
Hi @mattriese thanks for the update, lets wait for them to fix that.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem. Notice that only bugs in the rxdb premium plugins are ensured to be fixed by the maintainer. Everything else is expected to be fixed by the community, likely you must fix it by yourself.
@mattriese the PRs at the electric repo seem to be fixed/closed.
Ah yeah, I just noticed they released it with electric-sql@0.9.5. I'll try to wrap this up this week
I've created a draft PR to show my progress so far. There's a sqlite error when I try to load the app and the tests seem to have another problem. Any advice would be appreciated :) I'm hoping to hear back from the electric-sql discord channel about the sqlite error soon.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem. Notice that only bugs in the rxdb premium plugins are ensured to be fixed by the maintainer. Everything else is expected to be fixed by the community, likely you must fix it by yourself.
I solved one of the problems and narrowed down the cause of the other. see the new comments in the PR
If you have any wisdom around loading wasm files in a way that's compatible with Angular and testCafe, please let me know! :)
@mattriese On some projects I am spawning a different server just to serve static files to testcafe browsers. I am not sure if that is the only possible solution. Maybe bundling the wasm file into a base64 is an option, but that might impact the performance results.
@pubkey Ok thanks for the suggestions I will give it a shot
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem. Notice that only bugs in the rxdb premium plugins are ensured to be fixed by the maintainer. Everything else is expected to be fixed by the community, likely you must fix it by yourself.
Update: I didn't get any responses to my question in the Electric-SQL discord about this issue. I tried the suggestion of spawning a separate express server just to serve the wasm files, and that did work in dev mode but when running the tests I got the same error (TypeError: cannot read properties of undefined
. reading "durability"). I didn't try the suggestion of bundling the wasm into base64.
Unfortunately, I have run out of bandwidth to keep trying to fix this bug. Maybe someone else can take over from here. I hope once the bundling/testcafe issue is fixed, it will be pretty close to being done. I'd be happy to jump back in if that problem is fixed and there are questions or issues with my implementation of electric-sql.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag.
@pubkey hey I just wanted to make sure you saw my last update on here.
@mattriese yes I have seen it. There is no hurry, just ping me when you want to continue.
Ok gotcha. I don't have any immediate plans to continue working on this by myself, but if I do I will let you know.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag.
Issues are autoclosed after some time. If you still have a problem, make a PR with a test case or to prove that you have tried to fix the problem.
Add electric-sql to the client-side-databases project to measure the performance metrics.
For that, create an angular subproject like the already existing ones and then implement the logic interface.
I plan to be done with this on Feb 11th.