rocicorp / replicache-sdk-flutter

Replicant SDK for Flutter
https://replicache-sdk-flutter.now.sh/
Other
6 stars 1 forks source link

Add a way to use the Repm HTTP server #52

Closed arv closed 4 years ago

arv commented 4 years ago

This is usefule because gomobile takes a long time to rebuild and using an http server allows faster iterations.

vercel[bot] commented 4 years ago

This pull request is being automatically deployed with Vercel (learn more). To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rocicorp/replicache-sdk-flutter/4ysnxva7q ✅ Preview: https://replicache-sdk-flutter-git-fork-arv-repm-http.rocicorp.now.sh

arv commented 4 years ago

It is not clear to me how to best expose this. My current plan is to make Replicache constructor and the static functions (list and drop) take an optional invoke function or invoker instance.

I will do that tomorrow unless you have any cleaner suggestions?

aboodman commented 4 years ago

How about having a static string property repmURL. If null, repm is in-process. Otherwise, it is out of process, contacted via HTTP at the specified URL. The actual branch can be done via a special invoker fn as you describe, or just a branch.

arv commented 4 years ago

I settled on an repmInvoke parameter. Ended up being useful for the tests too.

arv commented 4 years ago

TBR