Skip to content

Commit

Permalink
Updated URLs to listen for; cleaned up an SDK bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottArbeit committed Feb 18, 2023
1 parent f3713a7 commit 10e0fe0
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 24 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ If you'd like to read about some of the design thinking and motivations behind G

Stop being afraid of your version control system, and start _enjoying_ it instead.

There are many fewer concepts to understand in Grace, so learning it is easy, and understanding what it's doing is easy.
Grace is easy-to-use, easy-to-understand, and fast, with cool new features that let version control fade into the background while you're working, and help you remember where you were when you get interrupted.

There's a simple-to-understand grammar, built-in aliases for common gestures, and common-sense defaults.
There are fewer concepts to understand in Grace, so learning it is easy, and understanding what it's doing is simple. There's a simple-to-understand grammar, built-in aliases for common gestures, and common-sense defaults.

Grace is powerful source control, minus the fear.

Expand Down Expand Up @@ -108,15 +108,15 @@ and, introducing:

### Every save is uploaded, automatically

By default, `grace watch` uploads new file versions after every save-on-disk, along with new directory contents and SHA-256 hashes.
By default, `grace watch` uploads new file versions after every save-on-disk, along with a new snapshot of the entire directory structure of the repo, including new SHA-256 hashes.

It happens so quickly you don't even notice it.

And it gives you some very cool things, like:

- **file-level undo** for as far back as your repository allows,
- **very fast** `grace checkpoint`, `grace commit`, and `grace promote` commands, and,
- a **Version History view** that will let you to flip through your versions, helping you remember what you were thinking, and enabling easy, instant restoration of any of your past changes.
- a **Version History view** that will let you to flip through your versions, helping you get remember where you were when you get interrupted, and enabling easy, instant restoration of any of your past changes.

![](https://gracevcsdevelopment.blob.core.windows.net/static/Green.svg)

Expand All @@ -132,29 +132,33 @@ As they're handled, they're sent to an event processor, which can log them in yo

When running `grace watch`, Grace uses [SignalR](https://dotnet.microsoft.com/en-us/apps/aspnet/signalr) to create a live, two-way communication channel between client and server.

This connection allows Grace to do All The Cool Things. Things like connecting you in real-time to everyone else working in your repository. Things like auto-rebasing. Things like watching for a set of events in your repository, notifying you when you want to be notified, and running custom local actions.
This connection allows Grace to do All The Cool Things. Things like connecting you in real-time to everyone else working in your repository. Things like auto-rebasing. Things like watching for events in your repository, notifying you when you want to be notified, and running custom local actions if you want.

Things like sharing your code with team members instantly, for those times when you need another set of eyes on it, or just want to show them something cool.
Imagine: there's a promotion to `main`, your branch gets auto-rebased on those latest changes, and then your local unit test suite gets run automatically so you immediately know if there's a problem.

Grace lets you share your code with team members effortlessly, around the world, for those times when you need another set of eyes on it, or just want to show them something cool.

Auto-rebasing keeps you up-to-date and ready to go, because...

![](https://gracevcsdevelopment.blob.core.windows.net/static/Green.svg)

### Shift left on merge conflicts
### Grace reduces merge conflicts

Merge conflicts suck. Finding out that you have one, when you thought you were already done with your work, is one of the most anxiety-inducing parts of coding. Grace helps you eliminate them by keeping your branch up-to-date.
Merge conflicts suck. Finding out that you have one, when you thought you were already done with your work, is one of the most anxiety-inducing parts of using source control. Grace helps you eliminate them by keeping your branch up-to-date.

When your parent branch (or any branch above that in the tree) gets updated, by default, `grace watch` will auto-rebase your branch on those changes, so you're always coding against the latest version that you'll have to merge with.
When your parent branch gets updated, by default, `grace watch` will auto-rebase your branch on those changes, so you're always coding against the latest version that you'll have to merge with.

Almost all of the time, when you rebase, nothing bad happens. You don't even notice it. The rest of the time, auto-rebase lets you find out right away, fix it while you're in flow, and skip the conflict later.

Grace can't promise to eliminate all conflicts, but it should reduce them quite a bit.
Let's shift left on merge conflicts. Grace can't eliminate all of them, but it should reduce how often they happen.

![](https://gracevcsdevelopment.blob.core.windows.net/static/Green.svg)

### Personal branches, not forks

With Grace, there's no need for forking entire repositories just to make contributions. In open-source repos, you'll just create a personal branch against the repo.

You'll own your personal branch, and you can make it visible or not. When your change is ready you can submit PR's to get your personal branch's version promoted to a public branch in the repo.
You'll own your personal branch, and you can make it public or private. When your change is ready you can submit PR's to get your personal branch's version promoted to a parent branch in the repo.

This is how I expect a large, open-source project in Grace to be: dozens of contributors, each with personal branches, working on a public project that remains securely controlled with ACL's. Everyone auto-rebased with every update to their parent branch, so there are no surprises later. No networks of forks to manage, no multiple entire copies of the repo. Just individuals working on the same repo, securely, together.

Expand All @@ -164,9 +168,9 @@ This is how I expect a large, open-source project in Grace to be: dozens of cont

Grace's default branching strategy is called _single-step_ and is designed to help reduce merge conflicts, and to make it easier to work on and promote code to shipping branches (like `main`).

Single-step branching is, we hope, both easy-to-use and powerful enough to be all that you need to run your projects. (We're open to supporting other branching models in the future.)
Single-step branching is, we hope, both easy-to-use and powerful enough to be all that you need to run your projects.

There's a [separate page](docs/Branching%20strategy.md) that describes it in detail.
There's a [separate page](docs/Branching%20strategy.md) that describes it in more detail.

![](https://gracevcsdevelopment.blob.core.windows.net/static/Green.svg)

Expand All @@ -192,15 +196,17 @@ Grace will let you specify how to handle those files, like only downloading them

Yeah, I said it.

Grace will have a native GUI app for Windows, Mac, Android, and iOS. (And eventually Linux.[^mauilinux])
Grace will have a native GUI app for Windows, Mac, Android, and iOS. (And probably Linux.)

Take Grace with you wherever you go. Merge conflict UI, Version History view, repository browsing, current status and more... all running at full native speed on your devices.

![](https://gracevcsdevelopment.blob.core.windows.net/static/Green.svg)

### Web UI

And Grace will ship with a default web UI. Sometimes the best way to share information is using a URL.
Shipping a native app doesn't mean that we don't also need a great web UI.

Sometimes the best way to share information is using a URL.

CLI + Web UI + GUI... use Grace the way you want to.

Expand Down Expand Up @@ -387,6 +393,4 @@ We intend to provide a Docker Compose template, as well as Kubernetes configurat

[^stream]: One thing I'd like to do with the event log as a stream: detect invalid sequences and frequencies of events in Grace that would indicate bugs or attacks.

[^mauilinux]: Grace will have a native Linux app if the [.NET MAUI team adds support for Linux Desktop](https://github.com/dotnet/maui/discussions/339), which you should totally go give a thumbs-up to.

[^gitexport]: Grace will export the latest state of each branch into a `git bundle` file. Exporting an entire Grace repository, including history, to a Git repository probably won't be supported, but maybe someone else will write it. (There are, no doubt, a lot of edge cases to be found the hard way in that translation, and it's a very low priority item for me.) Live two-way synchronization between Grace and Git is a non-goal, for the same reason.
5 changes: 5 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
</PropertyGroup>
</Project>
11 changes: 5 additions & 6 deletions src/Grace.SDK/Common.SDK.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ module Common =
httpClient.DefaultRequestHeaders.Add(Constants.ServerApiVersionHeaderKey, $"{Constants.ServerApiVersions.Edge}")
//httpClient.DefaultVersionPolicy <- HttpVersionPolicy.RequestVersionOrHigher
#if DEBUG
httpClient.Timeout <- TimeSpan.FromSeconds(1800.0) // Keeps client commands open while debugging.
//httpClient.Timeout <- TimeSpan.FromSeconds(1800.0) // Keeps client commands open while debugging.
httpClient.Timeout <- TimeSpan.FromSeconds(15.0) // Fast fail for testing network connectivity.
#endif
httpClient

Expand Down Expand Up @@ -101,12 +102,10 @@ module Common =
try
use httpClient = getHttpClient parameters.CorrelationId
let jsonContent = JsonContent.Create(parameters, options = Constants.JsonSerializerOptions)
let daprServerUri = Environment.GetEnvironmentVariable(Constants.EnvironmentVariables.DaprServerUri)
let graceServerPort = Environment.GetEnvironmentVariable(Constants.EnvironmentVariables.GraceAppPort)
let serverUri = Uri($"{daprServerUri}:{graceServerPort}/{route}")
//logToConsole $"serverUri: {serverUri}"
let serverUriWithRoute = Uri($"{Current().ServerUri}/{route}")
//logToConsole $"serverUriWithRoute: {serverUriWithRoute}"
let startTime = getCurrentInstant()
let! response = Constants.DefaultAsyncRetryPolicy.ExecuteAsync(fun _ -> httpClient.PostAsync(serverUri, jsonContent))
let! response = Constants.DefaultAsyncRetryPolicy.ExecuteAsync(fun _ -> httpClient.PostAsync(serverUriWithRoute, jsonContent))
let endTime = getCurrentInstant()
if response.IsSuccessStatusCode then
let! graceReturnValue = response.Content.ReadFromJsonAsync<GraceReturnValue<'U>>(Constants.JsonSerializerOptions)
Expand Down
1 change: 1 addition & 0 deletions src/Grace.Server/Program.Server.fs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module Program =

.ConfigureWebHostDefaults(fun webBuilder ->
webBuilder.UseStartup<Application.Startup>()
.UseUrls("http://*:5000", "https://*:5001")
.UseKestrel(fun kestrelServerOptions ->
kestrelServerOptions.ConfigureEndpointDefaults(fun listenOptions -> listenOptions.Protocols <- HttpProtocols.Http1AndHttp2)
kestrelServerOptions.ConfigureHttpsDefaults(fun options -> options.SslProtocols <- SslProtocols.Tls12 ||| SslProtocols.Tls13)
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Server/Properties/launchSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"applicationUrl": "https://localhost:5001;http://localhost:5000l;https://0.0.0.0:5001;http://0.0.0.0:5000",
"dotnetRunMessages": "true"
},
"Docker": {
Expand Down
5 changes: 5 additions & 0 deletions src/Grace.sln
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-co
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Grace.Server.Tests", "Grace.Server.Tests\Grace.Server.Tests.fsproj", "{B31CE180-594F-46CF-95FE-4A482EFEC24D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution items", "{40F2D935-0455-48D5-B8E1-BEC3020C4FF1}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down

0 comments on commit 10e0fe0

Please sign in to comment.