https://discord.cloudflare.com logo
Join Discord
Powered by
# workers-discussions
  • a

    albert-zhao

    11/23/2020, 9:59 PM
    @User This uses the Serverless framework too 🙂
  • k

    kristian

    11/23/2020, 10:00 PM
    yeah, unfortunately i had a hard node.js dependency on one little piece of functionality so i used lambda 😬
  • i

    itsmatteomanf

    11/23/2020, 10:01 PM
    Fired! Ahah
  • i

    itsmatteomanf

    11/23/2020, 10:06 PM
    I have an idea for the substitution of the Lambda @User. First, is this run on a schedule or is it called upon request?
  • k

    kristian

    11/23/2020, 10:07 PM
    it'll fire once per purchase
  • k

    kristian

    11/23/2020, 10:07 PM
    via stripe webhook
  • i

    itsmatteomanf

    11/23/2020, 10:10 PM
    Gotcha. Damn though. If it were the other way around you could engineer it against a Google Script for just writing to the spreadsheet (quick and dirty, but accessible and free), but it's not easily doable this way.
  • i

    itsmatteomanf

    11/23/2020, 10:11 PM
    There is a REST API for Sheets, though.
  • i

    itsmatteomanf

    11/23/2020, 10:11 PM
    https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append
  • c

    catgirl

    11/23/2020, 11:43 PM
    Any ETA on when Workers will support MongoDB Atlus
  • c

    catgirl

    11/23/2020, 11:43 PM
    Atlas*
  • a

    albert-zhao

    11/24/2020, 12:02 AM
    No specific timeline on the roadmap, still working with the MongoDB team. Curious if anyone else on here wants support for this (or any other database)?
  • c

    catgirl

    11/24/2020, 1:35 AM
    Haha 1.1.1.1 DNS over HTTPS says its too late to keep impulse buying
  • k

    kristian

    11/24/2020, 1:55 AM
    @itsmatteomanf yea, i would like to implement it 100% in workers but if this is the same thing i was looking at a couple weeks ago, i would have to manually do a bunch of crypto/signature construction and i was like ... man i just want to like, add a single email a couple times lol
  • i

    itsmatteomanf

    11/24/2020, 1:57 AM
    Yeah... I feel you. That's why I normally use Google Scripts for this. Option #2: add the lists to KV and the list them starting from a cursor periodically via Google Sheets using one of their time triggers. It's not real time, but it can almost be.
  • k

    kristian

    11/24/2020, 2:15 AM
    @itsmatteomanf i haven’t used google scripts before, is there a way to expose it as a REST API? I would definitely be down to try it out, the lambda just takes a sheet ID and an email as a JSON body, nothing too complicated
  • i

    itsmatteomanf

    11/24/2020, 2:24 AM
    Maybe. Never done it, but it seems like it. This seems to be the relevant documentation: https://developers.google.com/apps-script/api/how-tos/execute#javascript
  • g

    Gary Somerhalder

    11/24/2020, 3:56 AM
    Hello everyone! We are using Lambdas and running Node. Could we move over to Workers? (We are using Serverless framework right now.)
  • g

    Gary Somerhalder

    11/24/2020, 4:00 AM
    @albert-zhao
  • g

    Gary Somerhalder

    11/24/2020, 4:00 AM
    Thank you for the invite Albert!
  • g

    Gary Somerhalder

    11/24/2020, 4:01 AM
    I’d love to hear about Lambda/Node support
  • g

    Gary Somerhalder

    11/24/2020, 4:03 AM
    We also use AWS RDS PostGres and AppSync
  • g

    Gary Somerhalder

    11/24/2020, 4:26 AM
    We also use Auth0 heavily
  • c

    catgirl

    11/24/2020, 6:08 AM
    Probably although there are some differences with Node Isolates and the Workers Platform you'll have to work with. You can't just deploy an existing ExpressJS app out of the box.
  • c

    catgirl

    11/24/2020, 6:10 AM
    There's a module to connect to SQL Databases through Argo Tunnels but you do not get a full ORM and it's very limited. You need a proxy api of some sort to take calls from workers and read/write to the database. I hear Mongo and Postgres will have workarounds in the future. Adding raw TCP to Node Isolates is challenging and doesn't seem to be a priority to the Chromium V8 Team
  • c

    catgirl

    11/24/2020, 6:10 AM
    I've heard about them and their platform looks interesting
  • g

    Gary Somerhalder

    11/24/2020, 1:21 PM
    @kristian @albert-zhao Whats the status of Node support and AWS RDS support for PostGres?
  • g

    Gary Somerhalder

    11/24/2020, 1:21 PM
    We are not using Express if this helps
  • c

    catgirl

    11/24/2020, 1:28 PM
    It helps in terms of you being able to use workers HTTP handling instead. I can’t speak on the status because I don’t know. For Cloudflare Workers to support SQL Databases there are two approaches. The first is if the Chromium Team who develops V8 the JavaScript runtime used by Node (and Node Isolates) adds support for raw outbound TCP connections or if Cloudflare contributes a patch. This is time intensive and likely years away if it ever happens.
  • c

    catgirl

    11/24/2020, 1:30 PM
    There is a second approach and that is for Cloudflare or it’s partners to provide an HTTP API to the database that mimics a traditional SQL query interface. Perhaps one day PostgreSQL and Mongo will support this natively. It’s in-progress with MongoDB Atlas/Enterprise. I can’t speak as to if Postgres will support it.
12345...2509Latest