Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails at the Edge #279

Open
karllhughes opened this issue Jul 1, 2020 · 2 comments
Open

Rails at the Edge #279

karllhughes opened this issue Jul 1, 2020 · 2 comments
Labels
example An example project + readme

Comments

@karllhughes
Copy link

I'm planning a tutorial to demonstrate deploying a Ruby on Rails application at the edge using Fly.

I'm thinking I'll build a one-page Rails app that collects email addresses from users and sends them off to a backend (maybe Airtable or Mailchimp or something). After a user has submitted their email, it would show them a thank you page, even if they refresh the page (by storing the state in Redis).

The app would be packaged up as a Docker image and deployed to Fly.

If this sounds like a good idea, I'll go ahead and outline the post here. Thanks!

@mrkurt
Copy link
Member

mrkurt commented Jul 1, 2020

So we actually run Rails at the edge, I have lots of thoughts. The big problem with Rails is it's so heavily tied to a DB, any example that doesn't work with a normal Rails app might not give devs much to imagine about.

I think the "simplest" full Rails example is two Fly apps. One running in IAD and talking to postgres on Heroku or RDS or something. The other running "edge" locations with no DB adapter. And then some mechanism for proxying requests that require DB access to the primary.

This might be too complicated though. The better option might be to do Rails + CockroachDB or Yugabyte or MongoDB geo databases (we can get demo versions of these running).

@mrkurt mrkurt added the example An example project + readme label Jul 1, 2020
@karllhughes
Copy link
Author

Gotcha. It sounds like this might be a better one for your team to do then, honestly. Thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example An example project + readme
Projects
None yet
Development

No branches or pull requests

2 participants