Solving the distributed schema problem with @effect/schema by Jess Martin (Effect Days 2024)

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ธ.ค. 2024

ความคิดเห็น • 21

  • @alexg2910
    @alexg2910 8 หลายเดือนก่อน +2

    1. what happens if the software on one of the devices hasn't been updated yet and the new schema is not supported on that device?
    2. how does effect/schema compares with things like Lenses from Ink&Switch or grafana/thema?

    • @jessamartin
      @jessamartin 8 หลายเดือนก่อน

      > what happens if the software on one of the devices hasn't been updated yet and the new schema is not supported on that device?
      basically, it's up to the application to handle that case. In Composer, it shows a "Data unsupported" message. however, the schema *is* serialized to the database, so it can be looked up and perhaps the older device will know how to handle it, similar to 28:40.

    • @jessamartin
      @jessamartin 8 หลายเดือนก่อน

      > how does effect/schema compares with things like Lenses from Ink&Switch or grafana/thema
      good question! As I mention at the end of the talk, we're not actually handling migration yet. We're talking with Geoff from I&S about adding some sort of lensing system on top of Effect/Schema. I'm not familiar with grafana/thema, but I'll take a look!

    • @alexg2910
      @alexg2910 8 หลายเดือนก่อน +1

      @@jessamartin got it, thanks! Thema has similar goals as I&S lenses, but uses Cue as the schema definition language and it’s for the Go ecosystem.

  • @electroheadfx
    @electroheadfx 8 หลายเดือนก่อน +2

    Amazing, so it would like to be able to run effect on heterogeneous environment, for exemple in backend/orm/postgres we work with fastapi, but effect can't work on python ?

    • @jessamartin
      @jessamartin 8 หลายเดือนก่อน +1

      Hmmm, I wonder ... while Effect doesn't (yet?) run in Python, you could at least get some of the benefits of unifying the schema across front-end and back-end by serializing the schema to JSON Schema and sharing that schema with your Python backend. You'd need some method for going from JSON Schema to your database schema.
      Ultimately, this problem is begging for some unified tooling.

  • @JohnMcclaned
    @JohnMcclaned 8 หลายเดือนก่อน +4

    Great talk. Would love if you could post all the talks at once, drip feeding a talk a week is too slow haha

    • @jessamartin
      @jessamartin 8 หลายเดือนก่อน

      Glad you enjoyed it!

  • @seanknowles9985
    @seanknowles9985 7 หลายเดือนก่อน +1

    Can this be used with Graphql? Can we define graphql schema with effect/schema?

  • @gregorywestneat5957
    @gregorywestneat5957 6 หลายเดือนก่อน +1

    13:07 - wooowwwwwww yesssss! 🔥🔥🔥
    Somebody get this video a Z-Pak - because it smashes - really brinin the hammer, don'cha'know - haters r like "it stings when you number 1"

  • @mr.komp1004
    @mr.komp1004 8 หลายเดือนก่อน +1

    So basically, it is a create-t3-app with NextJS Prisma and tRPC + some additional stuff that adds your dta into your localstorage and schema inside your db?

    • @jessamartin
      @jessamartin 8 หลายเดือนก่อน +4

      Not at all, actually! I'm actually building a comparison of a create-t3-app with Prisma + tRPC to a DXOS-based app. I'll share a link here when it's done.
      Good eye, though! That's definitely the stack I would choose to enable this sort of behavior if I wasn't using DXOS.

    • @mr.komp1004
      @mr.komp1004 6 หลายเดือนก่อน

      @@jessamartin is it ready?)

  • @Joshua-dc4un
    @Joshua-dc4un 8 หลายเดือนก่อน +6

    Very surprised by the emphasis on magic, we need less magic, not more

    • @jessamartin
      @jessamartin 8 หลายเดือนก่อน +3

      One of the benefits of frameworks is when it handles things for us so that we can move up the ladder of abstraction. But if you want to build it yourself, you can definitely assemble something DXOS-shaped from existing pieces!
      I'm writing an article that expands on this topic.

  • @timstewart2800
    @timstewart2800 หลายเดือนก่อน

    I'm sure people running the sound love it when you call them 'yo'. :(

  • @avwie132
    @avwie132 7 หลายเดือนก่อน +1

    So… Basically Zod

    • @invinciblemode
      @invinciblemode 6 หลายเดือนก่อน

      zod + drizzle orm actually. But zod only does validation in one direction. Saying this as a zod power user.

    • @michaelarnaldi6680
      @michaelarnaldi6680 6 หลายเดือนก่อน +1

      key difference is that schema is ast based so it allows you to generate whatever you want (incl encoding and decoding) from the ast

  • @invinciblemode
    @invinciblemode 6 หลายเดือนก่อน

    Cool talk, but feels like I just watched an ad mostly