https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • s

    sorenbs

    11/23/2016, 2:32 PM
    Interesting point about reconnection time jitter. We are defining the protocol in collaboration with apollo, and this seems like something that might be worth specifying at the protocol level.
  • s

    sorenbs

    11/23/2016, 2:32 PM
    Do you know if pusher wrote about the issue and their solution?
  • t

    thisismissem

    11/23/2016, 2:32 PM
    but also.. you'd be doing effectively this: graphcool -> lambda -> graphql (find by generate val) -> lambda -> graphcool -> database -> GOTO 1 if error
  • t

    thisismissem

    11/23/2016, 2:32 PM
    I don't think we did
  • t

    thisismissem

    11/23/2016, 2:33 PM
    it was basically just that in your automatic reconnect function, you need to do it as a setTimeout, and you normally have backoff
  • t

    thisismissem

    11/23/2016, 2:34 PM
    so to add jitter, you just do something like
    backoff + Math.random() * 20
  • t

    thisismissem

    11/23/2016, 2:34 PM
    there's also articles like this: http://tylerpower.io/post/go-backoff/
  • t

    thisismissem

    11/23/2016, 2:34 PM
    but I don't think you can enforce it at protocol level
  • s

    sorenbs

    11/23/2016, 2:35 PM
    Exactly. In our case we don’t implement the clients ourselves - we just follow an open protocol. So we should specify this behavior in the protocol and make sure at least the big clients follow it.
  • t

    thisismissem

    11/23/2016, 2:35 PM
    and there's this: https://www.awsarchitectureblog.com/2015/03/backoff.html
  • s

    sorenbs

    11/23/2016, 2:35 PM
    Thanks for bringing this up!
  • t

    thisismissem

    11/23/2016, 2:36 PM
    no worries 🙂
  • t

    thisismissem

    11/23/2016, 2:36 PM
    the aws blog there is actually really good; it even has graphs to visualise the impacts
  • a

    annek

    11/23/2016, 9:42 PM
    Hello, I've found the learnappollo.com tutorial extremely helpful. Thank you. However I couldn't do the interactive version as when I click on 'Get GraphQL Endpoint' I get the following error:
  • a

    annek

    11/23/2016, 9:42 PM
    Fetch API cannot load https://73zvpdo0k5.execute-api.eu-west-1.amazonaws.com/prod/lambda-learnapollo_auth. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://learnapollo.com' is therefore not allowed access. The response had HTTP status code 502. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
  • e

    emilrmoeller

    11/23/2016, 11:24 PM
    Hey! Is there any way i can take backups of my models (and maybe the data)? My app is getting quite complex and big now that it would be devastating if i accidentally deletes a model which is related to something and breaks everything 🙂
  • t

    thisismissem

    11/23/2016, 11:37 PM
    This might be of interest to some: https://twitter.com/thisismissem/status/801569823750811648
  • e

    emilrmoeller

    11/23/2016, 11:56 PM
    @thisismissem One of the teams I’m working with would love to know, do you have a link for where to read more about it?
  • t

    thisismissem

    11/23/2016, 11:56 PM
    follow that tweet, there's replies
  • t

    thisismissem

    11/23/2016, 11:57 PM
    but this is something I'd actually need to test out and experiment with
  • t

    thisismissem

    11/23/2016, 11:57 PM
    it's also be only an effective subset of graphql, but it's something
  • t

    thisismissem

    11/23/2016, 11:58 PM
    the main problem is that the POST body contains two things: 1) The constant query (cacheable per query type) 2) Variables that change heavily and need to be understood to influence caching
  • e

    emilrmoeller

    11/23/2016, 11:58 PM
    Ah clever! (sorry didn’t understand the new twitter replies design)
  • t

    thisismissem

    11/23/2016, 11:58 PM
    So, if you can split that apart, then you get the query body that just needs to be hash
  • t

    thisismissem

    11/23/2016, 11:59 PM
    and the query arguments
  • t

    thisismissem

    11/23/2016, 11:59 PM
    I mean, it's not partial caching, but in theory that could be possible as well, using ESI's
  • e

    emilrmoeller

    11/24/2016, 12:00 AM
    I see, it’s sounds like a good theory
  • t

    thisismissem

    11/24/2016, 12:00 AM
    but I'd say partial caching is only marginally helpful — but I do know people who want that
  • e

    emilrmoeller

    11/24/2016, 12:01 AM
    I guess partial caching would be good if you are using @live in the future, or takes advantage of the apollo polling feature
  • e

    emilrmoeller

    11/24/2016, 12:02 AM
    or maybe i’m missing someting ?
1...525354...637Latest