Skip to content

Commit 6812d9e

Browse files
authored
Revert "Happy path updates (#1783)"
This reverts commit 4ea631a.
1 parent 4ea631a commit 6812d9e

11 files changed

+122
-167
lines changed

happy-path/aim.html.markerb

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,34 @@
11
---
2-
title: What is this deep dive demo?
3-
layout: docs
4-
nav: demo
2+
title: Aim
3+
layout: framework_docs_overview
54
order: 2
65
---
76

8-
To get the deep dive demo up and running on Fly.io, all you need is an empty directory and either Node or Ruby installed. But here are some more details about what the deep dive demo app actually is.
7+
For this demo, we will start with [MDN's Web Dictaphone](https://github.com/mdn/dom-examples/tree/main/media/web-dictaphone#web-dictaphone).
8+
You can play with a [live demo](https://mdn.github.io/dom-examples/media/web-dictaphone/). This is about as basic of an
9+
HTML form as you can get, and it has the added bonus of providing the ability to generate as many media files as you want using only your voice.
910

10-
The important thing to note is that this is all very straightforward stuff using industry standard components that you can run on your laptop, a VPS, AWS EC2, Google Compute Engine, or Azure.
11-
12-
The deep dive demo is based on [MDN's Web Dictaphone](https://github.com/mdn/dom-examples/tree/main/media/web-dictaphone+external).
13-
You can play with a [live demo hosted on GitHub](https://mdn.github.io/dom-examples/media/web-dictaphone/+external). The Web Dictaphone app is about as basic of an HTML form as you can get, and it has the added bonus of providing the ability to generate as many media files as you want using only your voice.
14-
15-
Your own app might have many forms, and more complex forms, but the dictaphone app demonstrates the the basic flow.
16-
17-
The basic Web Dictaphone is client side only, requiring a web server that can deploy static assets (HTML, CSS, JS, images), like NGINX, Apache HTTPd, or Caddy. Storing the data in databases requires a server that can handle HTTP GET, POST, PUT, and DELETE requests.
18-
19-
Our deep dive demo comes in two flavors:
20-
21-
- Node.js
22-
- Rails
23-
24-
The demo uses the following database and storage:
11+
Your app undoubtely has many forms, and more complex forms, but once you can see the basic flow, the rest should be easy.
2512

26-
* A [PostgreSQL](https://www.postgresql.org/+external) relational database to store the names of the audio clips
27-
* A [Tigris bucket](https://www.tigrisdata.com/+external) to store the the audio files
13+
That demo as it currently stands is client side only, so to deploy it all you need is a web server that can deploy static assets (HTML, CSS, JS, images),
14+
like NGINX, Apache HTTPd, or Caddy. In order to store the data in databases, we are going to need a server that can handle HTTP GET, POST, PUT, and DELETE requests.
2815

29-
To satisfy the realtime requirement, the demo uses:
16+
This demo application will come in two flavors. For Node.js, we will select [Express.JS](https://expressjs.com/), and for Rails we will use [Puma](https://github.com/puma/puma).
3017

31-
- [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API+external)
32-
- [Upstash for Redis](https://fly.io/docs/reference/redis/)
18+
* The names of the clips will go into a [PostgreSQL](https://www.postgresql.org/) relational database.
19+
* The audio files themselves will be placed into a [Tigris bucket](https://www.tigrisdata.com/).
20+
* For Node.js, the bulk of this code is in [app.js](https://github.com/fly-apps/node-dictaphone/blob/main/app.js). For Rails,
21+
[app/controller/clipController.rb](https://github.com/fly-apps/rails-dictaphone/blob/main/app/controllers/clips_controller.rb).
3322

34-
## Node.js
23+
To satisfy the realtime requirement, we will need [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
24+
and [Upstash for Redis](https://fly.io/docs/reference/redis/). The Node.js implementation is in [pubsub.js](https://github.com/fly-apps/node-dictaphone/blob/main/pubsub.js).
25+
For Rails, the heavy lifting is done by [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html), so all that is needed is
26+
one line in [app/models/clip.rb](https://github.com/fly-apps/rails-dictaphone/blob/6bdf4f639640c9fb55530546dbbed682b65a7df9/app/models/clip.rb#L2)
27+
and one line in [app/views/layouts/application.html.erb](https://github.com/fly-apps/rails-dictaphone/blob/6bdf4f639640c9fb55530546dbbed682b65a7df9/app/views/layouts/application.html.erb#L9).
3528

36-
The Node.js flavor of the deep dive demo uses an [Express.JS](https://expressjs.com/+external) server.
37-
38-
If you're looking for specific code:
39-
40-
* The bulk of the app code is in [app.js](https://github.com/fly-apps/node-dictaphone/blob/main/app.js)
41-
* The realtime implementation code is in [pubsub.js](https://github.com/fly-apps/node-dictaphone/blob/main/pubsub.js)
42-
43-
## Rails
44-
45-
The Rails flavor of the deep dive demo uses a [Puma](https://github.com/puma/puma+external) server.
46-
47-
If you're looking for specific code:
29+
The important thing to note is that this is all very straightforward stuff using industry standard components that you can run on your laptop, a VPS, AWS EC2, Google Compute Engine, or Azure.
4830

49-
* The bulk of the app code is in [app/controller/clipController.rb](https://github.com/fly-apps/rails-dictaphone/blob/main/app/controllers/clips_controller.rb)
50-
* The realtime implementation code is primarily in [ActionCable](https://guides.rubyonrails.org/action_cable_overview.html), so all that is needed is one line in [app/models/clip.rb](https://github.com/fly-apps/rails-dictaphone/blob/6bdf4f639640c9fb55530546dbbed682b65a7df9/app/models/clip.rb#L2)
51-
and one line in [app/views/layouts/application.html.erb](https://github.com/fly-apps/rails-dictaphone/blob/6bdf4f639640c9fb55530546dbbed682b65a7df9/app/views/layouts/application.html.erb#L9)
31+
If you want to see this up and running on fly.io (and certainly you do or why else would you be here?), all you need
32+
is an empty directory and either Node or Ruby installed.
5233

53-
**Next:** Now that you know what you're about to deploy, the next step is running [`fly launch`](../fire/).
34+
Now that we know what we are intending to accomplish, let's proceed to the exciting step: [Fire!](../fire/)

happy-path/application.html.markerb

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
title: Your Fly App
3-
layout: docs
4-
nav: demo
2+
title: Your Application
3+
layout: framework_docs_overview
54
order: 4
65
---
76

8-
Your demo app is running by default on two [Machines](https://fly.io/docs/machines/).
7+
Your application is running by default on two [Machines](https://fly.io/docs/machines/).
98

10-
Both Machines stop when not in use, and [autostart](https://fly.io/docs/launch/autostop-autostart/) when a new request comes in.
11-
This is entirely configurable. You can chose to [suspend](https://community.fly.io/t/new-feature-in-preview-suspend-resume-for-machines/20672) instead of stop, configure a [minimum number](https://fly.io/docs/reference/configuration/#the-http_service-section) of Machines to leave running, or even decide never to stop Machines at all.
9+
Don't worry about cost. Both machines stop when not in use, and [autostart](https://fly.io/docs/launch/autostop-autostart/) when a new request comes in.
10+
This is entirely configurable. You can chose to [suspend](https://community.fly.io/t/new-feature-in-preview-suspend-resume-for-machines/20672) instead of stop,
11+
configure a [minimum number](https://fly.io/docs/reference/configuration/#the-http_service-section) of machines to leave running, or even decide never to
12+
stop at all.
1213

13-
Familiarize yourself with the [fly.toml](https://fly.io/docs/reference/configuration/) config file. Make a change there -- or in fact to any part of your application -- and run `fly deploy`.
14+
Familiarize yourself with [fly.toml](https://fly.io/docs/reference/configuration/). Make a change there -- or in fact to any part of your application -- and run `fly deploy`.
1415

15-
The purpose of two Machines is twofold: redundancy and scalability. If the Machine hosting one goes down, the other can continue on. If both are available, in times of high use both can be started to handle requests.
16-
You can [vertically scale](https://fly.io/docs/launch/scale-machine/) the CPU and RAM on each Machine.
16+
The purpose of two machines is twofold: redundancy and scalability. If the machine hosting one goes down, the other can continue on. If both are available, in times of high use both can be started to handle requests.
17+
You can [vertically scale](https://fly.io/docs/launch/scale-machine/) the CPU and RAM on each machine.
1718

18-
You can also [horizontally scale](https://fly.io/docs/launch/scale-count/) to more Machines. Be sure to scroll down on that page far enough to see how to scale to multiple [regions](https://fly.io/docs/reference/regions/). If you have a co-worker on another continent, create a Machine there.
19+
You can also [horizontally scale](https://fly.io/docs/launch/scale-count/) to more machines. Be sure to scroll down on that page far enough to see how to scale to
20+
multiple [regions](https://fly.io/docs/reference/regions/). If you have a co-worker on another continent, create a machine there.
1921

20-
All this is made possible by [Anycast](https://fly.io/docs/networking/services/), a [load balancing proxy](https://fly.io/docs/reference/fly-proxy/), and [DNS certificates](https://fly.io/docs/networking/custom-domain/). Be sure to read that last link if you're interested in custom domains.
22+
And all this is made possible by [Anycast](https://fly.io/docs/networking/services/), a [load balancing proxy](https://fly.io/docs/reference/fly-proxy/), and [DNS certificates](https://fly.io/docs/networking/custom-domain/).
23+
Be sure to read the last link if you are interested in custom domains.

happy-path/fire.html.markerb

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
11
---
2-
title: Launch the demo
3-
layout: docs
4-
nav: demo
2+
title: Fire
3+
layout: framework_docs_overview
54
order: 3
65
---
76

8-
This is the point where you might expect to see that the marketing hype promised by [Speedrun](https://fly.io/speedrun) doesn't quite cut it. But the fact is that Fly.io is built for an excellent developer experience (DX) for full stack applications with both realtime time and object storage requirements.
7+
This is the point where the rubber meets the road, so this is where you would expect to see where the marketing hype promised by [Speedrun](https://fly.io/speedrun) and
8+
the [Quick Start](../getting-started/launch/) don't quite cut it. But the fact of the matter is that fly.io is honed for an excellent developer experience (DX) for full stack applications with both realtime time and object storage requirements.
99

10-
There are only two steps.
10+
There truly are only two steps involved.
1111

12-
**Step 1:** [Install flyctl](https://fly.io/docs/flyctl/install/).
12+
Step 1: [install flyctl](https://fly.io/docs/flyctl/install/)
1313

14-
**Step 2:** Run:
15-
```cmd
16-
fly launch --from https://github.com/fly-apps/node-dictaphone
17-
```
18-
-or-
19-
```cmd
20-
fly launch --from https://github.com/fly-apps/rails-dictaphone
21-
```
14+
Step 2: run `fly launch --from https://github.com/fly-apps/node-dictaphone` or `fly launch --from https://github.com/fly-apps/rails-dictaphone`
2215

23-
If you are new to Fly.io, the second step will take you to a page where you can register before continuing.
16+
If you are new to fly, the second step will first take you to a place where you can register. Then it will provide a description of what you will be getting, and give you an opportunity to tweak the settings (suggestion: don't. They are fine for this demo and we will walk you through how to adjust them later). And then it will build and assemble and wire up your application.
2417

25-
The `fly launch` output describes what you'll be getting for the app, and gives you an opportunity to tweak the settings (suggestion: Don't. The defaults are fine for this demo and we'll walk you through how to adjust them later). And then it will build and assemble and wire up your app.
18+
Take your time and play with it. Open your application in multiple browser windows. Send a link to a friend on another continent and watch your browser update in realtime.
2619

27-
Take your time and play with it. Open the application in multiple browser windows. Send a link to a friend on another continent and watch your browser update in realtime.
28-
29-
And then relax. We promised you it would be less than an hour. You're already up and running. If you are so inclined, try bringing up this exact same application on another cloud provider. We don't mind. In fact, we encourage it. Just please don't count the time you spent there against the hour budget we asked you to allot to this activity.
30-
31-
Once you're back and/or rested up, explore app and add-on components. Feel free to review the following in any order, or chose to skip ahead:
20+
And then relax. We promised you it would be less than an hour. You are already up and running. In fact, if you are so inclined try bringing up this exact same application on another cloud provider.
21+
We don't mind. In fact we encourage it. Just please don't count the time you spent there against the hour budget we asked you to allot to this activity.
3222

23+
Once you are back and/or rested up, let's explore. You've seen the code. You're up and running. Now lets take inventory.
24+
Feel free to review the following in any order, or chose to skip ahead:
3325
* [Your application](../application/)
3426
* [PostgreSQL](../postgresql/)
3527
* [Tigris](../tigris/)
3628
* [Redis](../redis/)
3729

38-
Finally, as an added treat, you can add some AI functionality, in this case speech recognition using [Whisper](../whisper/).
30+
Finally, as an added treat and as promised, let's add some AI functionality, in this case speech recognition using [Whisper](../whisper/).
3931

40-
When you're all done, visit the [recap](../recap).
32+
And when you are done, join us for a [recap](../recap)

happy-path/index.html.markerb

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
---
2-
title: Deep dive demo
3-
layout: docs
4-
nav: demo
2+
title: The Happy Path
3+
layout: framework_docs
54
toc: false
65
---
76

8-
You probably landed on this page because somebody recommended Fly.io to you. You're curious, and you want to know more before you commit.
7+
You landed on this page because somebody recommended fly.io to you,
8+
you are a bit curious, but you want to know more before you commit.
99

10-
If you came from our [Speedrun](https://fly.io/speedrun) or [Getting started](https://fly.io/docs/getting-started/) pages, maybe you want to not only be up and running fast, you want to feel confident that you're making a good decision; choosing a platform that can both support you now, and scale with you later on as you grow.
10+
You are aware that there is a [Speedrun](https://fly.io/speedrun) and
11+
a [Quick Start](../getting-started/launch/), but perhaps they feel a bit
12+
too _Ready! Fire! Aim!_ for you. You want to not only be up and running,
13+
you want to feel confident that you are heading in the right direction. A
14+
direction that can both scale and support your present and future needs.
1115

12-
Maybe you're concerned about lock in. You want to know that you can
16+
You are concerned about lock in. You want to be confident that you can
1317
use services from other places and even eject entirely and move your entire
1418
application elsewhere if things don't work out.
1519

16-
If you want to explore more deeply but in a time-boxed way, then you're in the right place. You should be up and running within minutes, and have enough of the hour left over to spend some time understanding what you just did and run a few commands and see what they do.
20+
But most of all, you want to explore in a time boxed way as you are
21+
a busy person. If you don't get a good feeling within an hour, you are out
22+
of here. If you do have a good feeling, then perhaps you'd consider
23+
sticking around for even deeper dives into areas that interest you.
1724

18-
If you don't get a good feeling within an hour, you're out of here. If you do get a good feeling, then consider
19-
sticking around to experiment and learn more about features that interest you. And when you're done, you can delete everything and launch the application that you brought here to launch.
25+
If so, you have come to the right place. You should be up and
26+
running within minutes, and have enough of the hour left over so
27+
that you can spend some time understanding what you just did and
28+
run a few commands and see what they do.
2029

21-
**Next:** [Beyond `hello fly`](/docs/happy-path/ready/)
30+
And when you are done, you can delete everything and then launch the
31+
application that you came here for.
32+
33+
Let's get started... [Ready](./ready/) ... [Aim](./aim/) ... [Fire](./fire/)!

happy-path/postgresql.html.markerb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: PostgreSQL
3-
layout: docs
3+
layout: framework_docs_overview
44
order: 5
5-
nav: demo
65
---
76

8-
Fly Postgres is deployed as a separate app, and that app comes initially configured with a single [Fly Postgres](https://fly.io/docs/postgres/) Machine. That's fine for development, but for production you need redundancy and scalability. With a [few commands](https://fly.io/docs/postgres/advanced-guides/high-availability-and-global-replication/) you can create an HA cluster in your primary region and read-only replicas elsewhere.
7+
Your application comes initially configured for a single [Fly Postgres](https://fly.io/docs/postgres/) machine.
8+
That is great for development, but for production we need redundancy and scalability. With but a [few commands](https://fly.io/docs/postgres/advanced-guides/high-availability-and-global-replication/) we can create a HA cluster in my primary region and read only replicas elsewhere.
99

10-
If you're interested in a managed offering, [Supabase Postgres](https://fly.io/docs/reference/supabase/) is in public alpha.
10+
If you are interested in a managed offering, [Supabase Postgres](https://fly.io/docs/reference/supabase/) is in public alpha.
1111

12-
And there is no lock in here. We have a list of [recommended external providers](https://fly.io/docs/postgres/getting-started/what-you-should-know/#recommended-external-providers), but you're free to host your database literally anywhere.
12+
And there is no lock in here. We have a list of [recommended external providers](https://fly.io/docs/postgres/getting-started/what-you-should-know/#recommended-external-providers), but you are free to host your database literally anywhere.
1313

14-
Before moving on, one last observation on the relational database. While you want and need your application to be on the internet, you are much better off if your relational database is NOT directly exposed to the internet, but can only be accessed via your application. That’s the value of an [internal private network](https://fly.io/docs/networking/private-networking/). The private connection from the demo app to the Postgres app was configured automatically for you.
14+
Before moving on, one last observation on the relational DB. While you want and need your application to be on the internet, you are much better off if your relational database is NOT directly exposed to the internet, but can only be accessed via your application. That’s the value of an [internal private network](https://fly.io/docs/networking/private-networking/). This too was configured automatically for you.

0 commit comments

Comments
 (0)