You are reading content from Scuttlebutt
@mix %2OmtLqgVGIH+Yl+9QKZzk67k/lC0tjJMmTeqtuo3fzs=.sha256

ssb-patchql demo cast

ssb-patchql demo video

VIDEO : https://www.youtube.com/watch?v=lVqUSi9XxnE

This is a tour of what it's like to use ssb-patchql since @piet announced this here ... I hope you can all see how easy it's going to be to build new things with this ... you don't really need to know any of the backend stuff, and you can pretty much get away without learning GraphQL !

User has chosen not to be hosted publicly
User has not chosen to be hosted publicly
@Hendrik Peter %0ZqnpeJqkt0bhL6Re1r1antuPI4SzMWjqISuqM6thNI=.sha256

Awesome!
Going to download this as soon as my boss looks away and play with it!

@Hendrik Peter %fDreCeFduabU71YKjY08DlVm5go0eFsgczmaxhQuAuY=.sha256

Looks like I need to run the Rust SSB server to make this work. Will see if I can transfer my "account data" over to Sunrise Choir or start a new identity

User has not chosen to be hosted publicly
@mix %1YwQPudF77kf62rPL2MlK2X104X8iUVCGssIu5o9MO8=.sha256
Voted This RAD [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519),
@mix %vzPEz+NmKV8IyT5jOi73MAxIjtP3xT/Un61u00yPAHI=.sha256
Voted Awesome! Going to download this as soon as my boss looks away and play with
@Hendrik Peter %g4L9mXT6wQUL2FyGertrZ8e6U3Zg42VyvKwMHWoI3eg=.sha256

It works, uploading stuff to youtube now ;)

@Hendrik Peter %J3s/DIyQJHg1RzTF+rsCA2wfoyf2pdMAVuDp+GgVYeQ=.sha256

https://youtu.be/OKL4vaQFxtw
runs with Tightbeam now ;)

@mikey %butTzfQbeWn2YJAwtRHAeqGGVlRywEMJI/OrDPcL9yw=.sha256

omgosh so awesome @mix @piet @hendrik! :scream_cat:

:dancer:

#sunrise-choir

User has chosen not to be hosted publicly
@Anders %vfzoOmzlkMAz2e9iAfAnuMOpyg+jwilUgS+BKBFmRn0=.sha256
Voted ## ssb-patchql demo cast ![ssb-patchql demo video](&oxjvrKXW5NGM6xxdK/KuAa
@Anders %Inj+Vyh3rbh5YrDdNzdRYbtKl13kkQfUbd5wbsfApvY=.sha256

Really impressive stuff!

I see that the interface already aggregates some things related to threads. What are the thoughts in relation to creating your own indexes? Imagine I would port books over to this interface.

@Hendrik Peter %PaE6VEEtheDqmAieuc7/gVXEtvTQm6EN48nkBQ9LLTI=.sha256
Voted omgosh so awesome [@mix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25
@Connor %NUGrt50SsQHA9uqUeujpig3xlu5sDUNYBKCEFcLBe7I=.sha256

@Robert.Best/d 🖥️ check this out. You've heard of graphql right?

Well if you can get this much working, you could run all the graph queries till your heart was content :p

User has not chosen to be hosted publicly
@mix %y6qQGEV5sCCSC3qJLfJp8HlpOjdmtbNZDDPFRdSQQEg=.sha256
Voted omgosh so awesome [@mix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25
@mix %OWXdMr4aLeIzZtWBEutryU6GEzghUppEF4lfWZ6xRKs=.sha256
Voted https://youtu.be/OKL4vaQFxtw runs with Tightbeam now ;)
@mix %EZgjI0k9h0+mHRdgLUxLSOPL52JRaI0KfiqeSY4w26I=.sha256

I think it would be sweet to understand the flow of data here. I was thinking about drawing a diagram. It goes like :

  1. replication into the log file (just a big no-sql dump)
  2. rust is told (via a graphql mutation) to nom some log into it's relational sql database, which currently looks something like :
    ssb-patchql
  3. rust provides a graphql interface which lets you ask a range of questions really easily of those sql tables.
  4. ssb-patchql is an js plugin for the js ssb-server which just starts the rust binary up so steps (2) and (3) just work

@arj to answer your question, the sql tables have a lot of what you want. I think with a little reading / more documentation we'll see that links might be the backlinks you might want ... you can see there's an about table which gathering about messages. The only things that might need dong would be to expose some of this using graphql. Personally I'm keen to replace some core Patchbay stuff with this .... start with something simple like likes ... move on to names (which is a massive slow cached process at the moment).

@mix %Jq2bvF8yQtqRLvqDNxDxuExChYgSBSc7LY1m9TOfagw=.sha256

and so ssb-patchql is being used in phones already!

Selection_344.jpg

wow @Hendrik Peter, that was quick! Awesome work

@Hendrik Peter %Gn71CPBPRyKUZadMDMfOurFEDHjQ7dr74BG1LFwmYUc=.sha256

psst, threads work too
https://youtu.be/FkhHMLOmWHg

@mix %7WFQiVLDtk49uDpRHcRzPLu9NmZAAgMz7Gqiu9gyi+I=.sha256
Voted psst, threads work too https://youtu.be/FkhHMLOmWHg
@Hendrik Peter %Jkk11NyPfESq/owSXd3yoUQHJd9+O31zI6l4mu2zBQI=.sha256
Voted and so `ssb-patchql` is being used in phones already! ![Selection_344.jpg]
User has not chosen to be hosted publicly
@Hendrik Peter %noIMans3K3cOZNIIOPczGdqeVGpPkiKd0YlVPvnq1MA=.sha256

@Piet , wow nice, I'll try that when I wake up tomorrow!

@mix %x9vEHX78Az73JA2dxREnSDuvj3uT9vc2+KZqtJY4Dtg=.sha256
Voted [@Piet](@U5GvOKP/YUza9k53DSXxT0mk3PIrnyAmessvNfZl5E0=.ed25519) , wow nice,
@mix %EDRZeWJ+y4kIve5qgcDRWf22H6NuazHlGv7jlUGH1uk=.sha256
Voted > psst, threads work too [@Hendrik Peter](@Bp5Z5TQKv6E/Y+QZn/3LiDWMPi63EP8
@Anders %6YHZD6c1KiEgPWYxoJNieJ2Fqy+iCaxPVZaXIIIL8PY=.sha256
Voted I think it would be sweet to understand the flow of data here. I was thinki
@Anders %L0x3quCRmn5pv5ZJNo1j8JEbsWdNKl+owNUr/ZkRl7A=.sha256

@mix that would work, I basically just need messageByType and backlinks.

One last thing, this doesn't have any way to do live queries, right?

This could be an interesting subtopic for our call next week.

@Hendrik Peter %uTcVT2Ycoe+AkuDRedxAwKVmv9BmdSH2dBPhLMBj3gY=.sha256

@piet

There’s and env var LISTEN which you can set, eg: LISTEN=0.0.0.0:8080

I tried this both like this:

export LISTEN=0.0.0.0:8080
npm start

in Patchbay and

export LISTEN=0.0.0.0:8080
npm install

The above don't really work, this is probably because let host = env::var("LISTEN").unwrap_or_else(|_| "localhost:8080".to_owned())8; in ssb-patchql is evaluated on compile-time (and not function()-run-time), so all builds on the build page (downloaded in jsbot-patchql) are locked to localhost. But that's super fine for now!

User has not chosen to be hosted publicly
User has chosen not to be hosted publicly
@Hendrik Peter %dUWo0hL+ri0+MAELc9qx4nzL585k8DAXqP5tbBVwh2A=.sha256
Voted [@Hendrik Peter](@Bp5Z5TQKv6E/Y+QZn/3LiDWMPi63EP8MHsXZ4tiIb2w=.ed25519) >
@Hendrik Peter %x1w2ZD14PqdLerNlqPI3cpjaWcwci7dckXtA8I1ksWw=.sha256

aha! that explains it. Thanks!

@mix %dC/HlJo9+/NE660VMSmsWiY876+Gq1i6RuycdjsjhIw=.sha256

@arj that's correct - there is no live stream with graphql (that I know of). I was planning to do some naive cache invalidation - have a live pull stream and if anything comes through that is in the neighbourhood of what I've been looking at, re-fetch + re-render

User has not chosen to be hosted publicly
@Hendrik Peter %q7yU0/SpDLkSUVUwEgQbfZ8mJyt4Y7/9oemZdem9qz0=.sha256

I was planning to do some naive cache invalidation

yeah, I need to restart the app now (haven't made that deep of a dive into caching in GraphQL yet), there isn't too much happening on my side when new messages come in on the backend.

@Anders %ZezqLHjt3CkvtLPJHZpVA0op5dJVjWICMc6uP4VnrJ8=.sha256
Voted [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519) > I was
User has not chosen to be hosted publicly
@Anders %gBHLnVBodSwo4DSJDgyRByG1HyQf2lx6eehyPczR5JI=.sha256
Voted > caching Trying to think of a few useful resources when it comes to updat
@Hendrik Peter %W6pWyDbBOlirlf2++4vQ0XCOdy/v+Vkp0i/WrvtWQB8=.sha256
Voted > caching Trying to think of a few useful resources when it comes to updat
@mix %l7NUgirCjy5uwlNK1JzSG6KkdQfTPjIuya/SGT/ce5M=.sha256
Voted [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519) > I was
@mix %JKy4J5DrKSzO0nxMr8tw9cdqCxY+i1R6AGrDa2mrIpI=.sha256
Voted [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519) > I was
@mix %tz6JPzEC/aeQqWSKdDqa2vQqWekIDDNFujUNhmOl99c=.sha256
Voted [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519) > I was
@mix %ghO//D1X6AjLw1bPSE7ZwR2bRamtnfCbsD2FpJgZkBI=.sha256
Voted [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed25519) > I was
@Rabble %FECeZXbog/Ptaz9SFhxTGEFmgSZBJd0LFsq/o/Rfp6c=.sha256

I tried to play with this but i can't seem to figure out how to trigger ti to process the log and put it in to sql lite. My sqlite db just has my identity stuff. What do i need to do?

@Luandro Pàtwy %hPw8gtCH0Uv90TxntN5yCX/UCdadRX8Qc7Sk3V8m4LA=.sha256

Did you call the process Mutation @Rabble? That's what triggers the indexing.

@Rabble %H3LFAiWt4XpuMDNEYOlBH7lH+VGcWk1JVnuuS9zAa0k=.sha256

Ok, i'm thinking, there's something about graphql i don't know... but perhaps others also don't know it. So i think it should be in the readme perhaps.

{
    process Mutation
}


{
  "errors": [
    {
      "message": "Unknown field \"process\" on type \"Query\"",
      "locations": [
        {
          "line": 30,
          "column": 2
        }
      ]
    },
    {
      "message": "Unknown field \"Mutation\" on type \"Query\"",
      "locations": [
        {
          "line": 30,
          "column": 10
        }
      ]
    }
  ]
}

Where do you run process Mutation?

@Hendrik Peter %PzeqaSEz3UjhcTJywCWkOfy18CX/aJ9ZTq0Y/GTbL2s=.sha256

check out this query @rabble:
https://git.picodevelopment.nl/ssbc/tightbeam-hub/blob/master/TightbeamHubNode/patchql.js#L9

@Hendrik Peter %b284/gGg037v4sIBvKcCk5vEnchJwUOIz9UdnOLl5m4=.sha256

or this one from @mixmix including nest logic:
https://github.com/ssbc/patchbay/blob/patchql/app/sync/initialise/patchql.js

User has not chosen to be hosted publicly
@Soapy mcSoap %ENR9WruMz0vywsg2sztQNAW5U3KGpEPpceTIipq6A/E=.sha256

hey @mixmix thanks for the video. Can't wait to play with it too.

@mix %39DjPgko02pqAi1rdOm6Fs0wykuWzR6i/7Skzw5CtzM=.sha256
Voted Ok, i'm thinking, there's something about graphql i don't know... but perha
@mix %feUke9YC/HwmcbAJeXzFGN3DK2g46wnwodzPKmLtJL4=.sha256
Voted or this one from [@mixmix](@ye+QM09iPcDJD6YvQYjoQc7sLF/IFhmNbEqgdzQo3lQ=.ed
@mix %IOq8GIqTbybYkI8pcl7owDx1ZTtVXDRb50mC+8I0AqU=.sha256

@Hendrik Peter it's awesome seeing you moving from new in this space, to building clients, to answering technical questions to make it more accessible for those following you. This makes my heart sing xxx

User has not chosen to be hosted publicly
@Rabble %kk+iyOTZa66jS9mtA3bxXzTOLUaboSfbEWEAaxTr+1Q=.sha256

:facepalm:

User has not chosen to be hosted publicly
@Rabble %nZeDK8rUjDYjI1rX0Npe7V7UqrCoD3nKT7VlmxPKSTY=.sha256

Yeah it works, the :facepalm: was for not figuring it out from the readme. I've got it running now with ssb-sqwish visualization too. Nifty stuff.

User has chosen not to be hosted publicly
Join Scuttlebutt now