fly-atc 0.0.7-arm64-darwin → 0.1.0-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d76bf222d0cb1230011b051363721b3d607329533dc11f4791a3f1059ecb5f96
4
- data.tar.gz: 550636125ac108aa750e3701932895355cc31e542304478312f489de3571039c
3
+ metadata.gz: ae8422513367c101387251db3d67694f38c91468155c0ac01d5227ebcd56c583
4
+ data.tar.gz: 67143fd25ca8a49821cf23e77a12e793bdf3c51654eae3b0ab71246277ba5800
5
5
  SHA512:
6
- metadata.gz: 39dc94c9cfe4e227bc82e7f9c6268aae041c9865c7a641a792d4fae96c174191d8cdb2a1603bf0069ac79efb960bb2a182a35efb5f747046072ec835a6567742
7
- data.tar.gz: 78aea1067ec38347b3692e33a936be4b14fad13a36706f297e35344008e7fab43238242fdfcce35634bcc53dbc74336d13347739741ed9061d09b6d26a448409
6
+ metadata.gz: 2cfe592f6e5dc65e9b52e272398fc88b87503308dd14921924ed4472524c40cfbe2b95bdc755e698d6958f209e864e32e1b0c08f8ff1c4a826f2630ae162560d
7
+ data.tar.gz: 28c3e247478aa930d905592c8a0a8b184338134c4a21c00ba326ef9fc0be9627db74ea2f0ba319b16d3714c7b70529f035ec2330a918885f7d9fca129c80f220
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  A SaaS toolkit for converting a personal application into a efficient, siloed, multi-tenant application, where each user of your application is assigned a dedicated virtual machine.
4
4
 
5
- ** Work in Progress **
5
+ *** **Work in Progress** ***
6
+
7
+ Do not use in production just yet.
6
8
 
7
9
  ## Usage
8
10
 
@@ -24,79 +26,13 @@ bin/rails generate atc
24
26
 
25
27
  Edit `config/atc.yml` as needed.
26
28
 
27
- For approximately $1 US per month, you can run:
28
- * [1 performance machine with 2Gb of RAM, 10GB of bandwidth, and 5GB of storage for 15 hours/month](https://fly.io/calculator?m=0_0_0_0_0&f=c&b=iad.10&a=no_none&r=shared_0_1_iad&t=10_100_5&u=0_1_100&g=1_performance_15_1_2048_iad_1024_0).
29
- * [1 shared machine with 1Gb of RAM, 10GB of bandwidth, and 5GB of storage for 80 hours/month](https://fly.io/calculator?m=0_0_0_0_0&f=c&b=iad.10&a=no_none&r=shared_0_1_iad&t=10_100_5&u=0_1_100&g=1_shared_80_1_1048_iad_1024_0).
30
-
31
29
  Vertical scaling can be achieved by adding more machines.
32
30
 
33
- ## Motivation
34
-
35
- I've been running my [Showcase](https://github.com/rubys/showcase?tab=readme-ov-file#showcase) software for nearly three years. Things have changed over time that I now want to take advantage of. I want take the opportunity to package those changes in the form of a toolkit that others can take advantage of.
36
-
37
- From Wikipedia description of [SaaS](https://en.wikipedia.org/wiki/Software_as_a_service):
38
-
39
- > SaaS customers have the abstraction of limitless computing resources, while [economy of scale](https://en.wikipedia.org/wiki/Economy_of_scale) drives down the cost. SaaS architectures are typically [multi-tenant](https://en.wikipedia.org/wiki/Multi-tenant); usually they share resources between clients for efficiency, but sometimes they offer a siloed environment for an additional fee.
40
-
41
- The focus of this toolkit is efficient, siloed, multi-tenant applications *with no changes to the application*, taking advantage of:
42
-
43
- * [Auto-suspend](https://community.fly.io/t/autosuspend-is-here-machine-suspension-is-enabled-everywhere/20942) - Virtual Machines that pop into existence when needed and disappear when not in use.
44
- * [SQLite ready for production](https://rubyonrails.org/2024/11/7/rails-8-no-paas-required#getting-sqlite-ready-for-production) - raw performance coupled with operational compression of complexity; see [Supercharge the One Person Framework with SQLite: Rails World 2024](https://fractaledmind.github.io/2024/10/16/sqlite-supercharges-rails/).
45
- * [Litestream](https://litestream.io/) - No-worry backups. Virtual machines can be literally destroyed and recreated elsewhere and start back up exactly where they left off.
46
- * [Tigris Global Storage](https://fly.io/docs/tigris/) - globally caching, S3-compatible object storage.
47
-
48
- That's a lot of moving parts. I've documented my [current architecture](https://github.com/rubys/showcase/blob/main/ARCHITECTURE.md) and published a [blueprint](https://fly.io/docs/blueprints/shared-nothing/).
49
-
50
- The goal of fly-atc is to enable you configure multiple tenants and then not worry about this further, enabling you to focus on your application.
51
-
52
- ## Approach
53
-
54
- For illustrative purposes consider a SaaS Calender application implemented in Ruby on Rails using SQLite3 as the database. (My showcase application is a bit more involved than a calendar, but those details aren't important).
55
-
56
- Key concepts:
57
-
58
- * Each user/customer has a primarly location, and is assigned a single machine near that location. Such machines can be accessed from anywhere, but have lower latency near that location.
59
- * Each user can have multiple calendars. Each calendar is associated with a single tenant on the user's machine. Each tenant consists a running instance of the web server application with one ([or more](https://rubyonrails.org/2024/11/7/rails-8-no-paas-required#a-solid-reduction-of-dependencies)) databases.
60
-
61
- With that in mind, consider the following URL paths:
62
-
63
- * `/bellevue/2025/winter/`
64
- * `/bellevue/2025/summer-medal-ball/`
65
- * `/bellevue/2025/summer-showcase/`
66
- * `/boston/2025/april/`
67
- * `/boston/2025/mini-comp/`
68
- * `/boston/2025/october/`
69
- * `/livermore/2025/the-music-of-prince/`
70
- * `/livermore/2025/james-bond/`
71
- * `/raleigh/2025/disney/`
72
- * `/raleigh/2025/in-house/`
73
-
74
- The first segment of the path identifies the user, and therefore the machine. The next two segments combined identify the tenant on that machine. This is but a subset of the planned showcases, you can see a [full list](https://smooth.fly.dev/showcase/) or even a [map](https://smooth.fly.dev/showcase/regions/) (click on the arrows under the map to move to different continents).
75
-
76
- `fly-atc`'s responsibilities are to:
77
- * Route requests to the correct machine
78
- * Ensure databases are present/restored from backup
79
- * Start/stop tenants as required
80
- * Hand off requests to tenants
81
-
82
- Rails 8 introduces [thruster](https://rubyonrails.org/2024/11/7/rails-8-no-paas-required#enter-kamal-2--thruster). `fly-atc` is a replacement for thruster:
83
- * thruster requires no configuration, is limited to a single tenant.
84
- * fly-atc enables multiple tenants, based on your configuration.
85
-
86
- ## Implementation
87
-
88
- Based on:
89
- * [Thruster](https://github.com/basecamp/thruster) ([announcement](https://dev.37signals.com/thruster-released/))
90
- * [tinyrp](https://github.com/pgaijin66/tinyrp) ([docs](https://prabeshthapa.medium.com/learn-reverse-proxy-by-creating-one-yourself-using-go-87be2a29d1e))
91
-
92
- Near term plans:
93
-
94
- * Remove certificate/https support
95
- * Add launch on request / shutdown on idle
96
- * Add [fly-replay](https://fly.io/docs/networking/dynamic-request-routing/)
97
-
98
- On the radar:
31
+ ## More information:
99
32
 
100
- * Support for targets other than fly.io.
101
- * Support for platforms other than Rails, likely starting with Node, and focusing on popular ORMs: [Prisma](https://www.prisma.io/), [TypeORM](https://typeorm.io/), and [Sequelize](https://sequelize.org/).
102
- * Dashboard. One should be able to deploy new users and make other configuration changes using only your cell phone. I [do this today](https://github.com/rubys/showcase/blob/main/ARCHITECTURE.md#administration) with my showcase application.
33
+ * [Overview](./docs/overview.md) - why this toolkit was created.
34
+ * [Demo](./docs/demo.md) - up and running in minutes.
35
+ * [Config](./docs/config.md) - configuration options
36
+ * [Iaas vs PaaS vs SaaS](./docs/paas.md) - Rails never needed a PaaS; Rails needs a PaaS now more than ever.
37
+ * [SQlite3](./docs/sqlite3.md) - perhaps Sqlite3 isn't right for you.
38
+ * [Todos](./docs/todos.md) - where we go from here.
Binary file
@@ -1,3 +1,3 @@
1
1
  module FlyAtc
2
- VERSION = "0.0.7"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fly-atc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-29 00:00:00.000000000 Z
11
+ date: 2024-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails