diff options
Diffstat (limited to '')
3 files changed, 525 insertions, 0 deletions
diff --git a/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides b/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides new file mode 100644 index 0000000..a18700d --- /dev/null +++ b/_slides/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.slides @@ -0,0 +1,47 @@ +--- +title: "Datomic on global: good reasons for and against it" +date: 2020-10-22 +layout: slides +lang: en +ref: datomic-on-global-good-reasons-for-and-against-it +published: false +--- + +# Datomic on global + +**Good** reasons for and against it + +--- + +When creating a new service... + +--- + +```clojure +(defn prototype->database + [prototype] + (if (= :global prototype) + :datomic + #{:dynamodb :redis :nothing})) +``` + +--- + +...which is, in my opinion, a poor heuristic. + +--- + +notifications vs toasty + +jurassic-park vs auth + +blackleach -> diablo -> ledger + +--- + +## Thank you! + +References: + +1. these slides: [{{ site.tld }}/slides.html]({% link slides.md %}) +2. [prose version of this presentation]({% link _articles/2020-10-22-datomic-on-global-good-reasons-for-and-against-it.md %}) diff --git a/_slides/2020-10-22-graphql-for-bffs-navigating-the-trade-offs.slides b/_slides/2020-10-22-graphql-for-bffs-navigating-the-trade-offs.slides new file mode 100644 index 0000000..17e15a6 --- /dev/null +++ b/_slides/2020-10-22-graphql-for-bffs-navigating-the-trade-offs.slides @@ -0,0 +1,216 @@ +--- +title: "GraphQL for BFFs: navigating the trade-offs" +date: 2020-10-22 +layout: slides +lang: en +ref: graphql-for-bffs-navigating-the-trade-offs +published: false +--- + +# GraphQL for BFFs + +Navigating the trade-offs + +??? + +1. slides já estão online, com sugestões incorporadas +2. artigo online +3. tupy: começar pelos slides é mais fácil + +--- + +# Mobile is **hard** + +--- + +## Immature ecosystem + +??? + +Compared to desktop, browser and server ecosystem, which are many years older. + +iOS SDK released on 2008, which is: +- the same year Python 3.0 was released; +- 1 year after Clojure's release and 13 years after Java's and JavaScript's + release; +- 10 years after GTK release + +--- + +## Almost no competition + + +??? + +Effectively a duopoly, better than a monopoly, but meh. + +Closed, walled gardens. + +Less competition, lower quality. + +Compare to: browser ecosystem, desktop ecosystem + +--- + +## Little to no control over the environment + +??? + +Bad on Android, worse on iOS. + +--- + +## Our usage of GraphQL + +History goes here + +??? + +savings: React Native, GraphQL, TypeScript, stormshield + +--- + +# Proposal + +Adopt GraphQL as the default for BFFs + +--- + +## Target + +**data fetching** and **chaining** + +??? + +It is not about: +- over fetching +- different clients with different data requirements + +--- + +## Goal + +Move **complexity** out of mobile to the backend, get more **dynamicity** out of it +??? + +The complexity doesn't vanish or shrink, it just shifts. + +https://media.tenor.com/images/ce1962c14da22c969e664560e098b2bc/tenor.gif + +--- + +# Alternatives +AKA, why not "just use a RESTful BFF"? + +--- + +## REST + +??? + +It doesn't address JOINs + +--- + +## Fulcro + +??? + +For 10 reasons for using GraphQL, 8~9 are shared for Fulcro. + +The other 1~2 aren't so relevant: +- data > syntax: already false for Swift, Kotlin, Dart +- attributes > aggregates: already false for Swift, Kotlin, Dart + +--- + +## Falcor + +--- + +## SOAP + +--- + +# Implications + +--- + +## Invalid arguments + +--- + +### "GraphQL isn't RESTful" + +🤷 + +??? + +Similar to saying "REST isn't GraphQL" + +--- + +### "GraphQL has a bad caching story" + +True, but we don't do HTTP caching + +--- + +### "query-params can be used for selection in a BFF with REST" + +👎 + +??? + +This isn't RESTful, and is an *ad-hoc* querying format + +--- + +### "over-fetching isn't a problem" + +??? + +That is not the main reason for GraphQL + +--- + +### "library X for GraphQL is bad" + +--- + +## Valid arguments + +--- + +### "Throttling by query complexity is hard" + +--- + +## Lessons learned + +--- + +### Error handling + +--- + +# Takeaways + +--- + +## None of the points are specific to Flutter + +--- + +## GraphQL enables declarative **dynamicity** + +--- + +## Thank you! + +References: + +1. these slides: FIXME [{{ site.tld }}/slides.html]({% link slides.md %}) +2. [prose version of this presentation]({% link _articles/2020-10-22-graphql-for-bffs-navigating-the-trade-offs.md %}) +3. "[Clients in control: building demand-driven systems with Om Next](https://www.youtube.com/watch?v=Zb18iPjDgwM)", by António Nuno Monteiro +4. "[Om Next](https://www.youtube.com/watch?v=MDZpSIngwm4)", by David Nolen diff --git a/_slides/2020-10-26-on-local-first-beyond-the-crdt-silver-bullet.slides b/_slides/2020-10-26-on-local-first-beyond-the-crdt-silver-bullet.slides new file mode 100644 index 0000000..b0bfa39 --- /dev/null +++ b/_slides/2020-10-26-on-local-first-beyond-the-crdt-silver-bullet.slides @@ -0,0 +1,262 @@ +--- +title: 'On "local-first": beyond the CRDT silver bullet' +date: 2020-10-26 +layout: slides +lang: en +ref: on-local-first-beyond-the-crdt-silver-bullet +published: false +--- + +# On local-first + +Beyond the CRDT silver bullet + +--- + +# Part 1 + +Exposition + +--- + +## "cloud apps" vs "old-fashined apps" + +--- + +## Target + +- documents +- files +- personal data repositories + +Not: banking services, e-commerce, social networking, ride-sharing, *etc*. + +--- + +## 7 Ideals for local-first software + +--- + +### 1 - No Spinners: Your Work at Your Fingertips + +--- + +### 2 - Your Work Is Not Trapped on One Device + +--- + +### 3 - The Network Is Optional + +--- + +### 4 - Seamless Collaboration with Your Colleagues + +--- + +### 5 - The Long Now + +--- + +### 6 - Security and Privacy by Default + +--- + +### 7 - You Retain Ultimate Ownership and Control + +--- + +## Towards a Better Future + +CRDTs (Conflict-free Replicated Data Types) as a Foundational Technology + +--- + +### Use case + +``` +# in node A and node B +s = "Hello, World" + +# in node A +s = "Hello, Alice" + +# in node B +s = "Hello, Bob" +``` + +How to reconcile those? +- `Hello, ABloibce` +- `Hello, AliceBob` +- `Hello, BobAlice` +- `Hello, Alice` +- `Hello, Bob` + +--- + +Existing CRDTs differ: +- performance +- storage +- compression +- metadata overhead + +--- + +Hint towards the "automerge" CRDT + +--- + +*show comparison table, page 9* + +--- + +# Part 2 + +Critique + +--- + +### Software license + +> In our opinion, maintaining control and ownership of data does not mean that +> the software must necessarily be open source. + +--- + +#### Example 1 - intentional restriction + +```bash +#!/bin/sh + +TODAY=$(date +%s) +LICENSE_EXPIRATION=$(date -d 2020-10-27 +%s) + +if [ $TODAY -ge $LICENSE_EXPIRATION ]; then + echo 'License expired!' + exit 1 +fi + +echo $((2 + 2)) +``` + +```bash +# today +$ ./useful-adder.sh +4 +# tomorrow +$ ./useful-adder.sh +License expired! +``` + +--- + +#### Example 2 - unintentional restriction + +```bash +# today +$ useful-program +# ...useful output... + +# tomorrow, with more data +$ useful-program +ERROR: Panic! Stack overflow! +``` +--- + +### local-first **requires** free/libre software + +Otherwise "The Long Now" (ideal nº5) is lost + +--- + +### Denial of existing solutions + +> In principle it is possible to collaborate without a repository service, +> e.g. by sending patch files by email, but the majority of Git users rely +> on GitHub. + +Solution: either GitHub+CRDTs or `git` **`send-email`** + +--- + +### Plain text formats + +> Git is highly optimized for code and similar line-based text file + +It even pulls software to the plain text direction, e.g.: +- delivery-templates +- `common-core.protocols.config` + +Why not exploit that more? + +--- + +### Ditching of web applications + +> The architecture of web apps remains fundamentally server-centric + +Disagree. Constrast [PouchDB][pouchdb] with Android [Instant Apps][instant-apps] + +[pouchdb]: https://pouchdb.com/ +[instant-apps]: https://developer.android.com/topic/google-play-instant + +??? + +Talk on dynamic content + +--- + +### Costs are underrated + +- storage +- backups +- maintanence + +Example: blog vs vlog + +--- + +### Real-time collaboration a bit overrated + +It is only possible on the presence of reliable, medium-quality network +connection + +> X also works when inside an elevator, subway or plane! + +<!-- 🤦 --> + +--- + +### On CRDTs and developer experience + +> For an app developer, how does the use of a CRDT-based data layer compare to +> existing storage layers like a SQL database, a filesystem, or CoreData? Is a +> distributed system harder to write software for? + +Yes. + +See "[A Note on Distributed Computing][note-dist-comp]" + +[note-dist-comp]: https://web.archive.org/web/20130116163535/http://labs.oracle.com/techrep/1994/smli_tr-94-29.pdf + +--- + +## Conclusion + +Why this is a "paper I love": it took offline-first and ran with it. + +But a pinch of CRDT won't make the world local-first. + +The tricky part is the end of the sentence: "**in spite of the Cloud**". + +--- + +## Thank you! + +References: + +1. these slides: [{{ site.tld }}/slides.html]({% link slides.md %}) +2. [prose version of this presentation]({% link _articles/2020-10-26-on-local-first-beyond-the-crdt-silver-bullet.md %}) +3. "[Local-First Software: You Own Your Data, in spite of the Cloud](https://martin.kleppmann.com/papers/local-first.pdf)", + by M. Kleppmann, A. Wiggins, P. Van Hardenberg and M. F. McGranaghan +4. [The Morning Paper](https://blog.acolyer.org/2019/11/20/local-first-software/) + article |