https://github.com/64j0/orleans-fsharp--url-shortener
This repository holds the F# code that implements the Microsoft Orleans quickstart example UrlShortener.
https://github.com/64j0/orleans-fsharp--url-shortener
asp-net csharp fsharp microsoft-orleans orleans orleans-example
Last synced: about 2 months ago
JSON representation
This repository holds the F# code that implements the Microsoft Orleans quickstart example UrlShortener.
- Host: GitHub
- URL: https://github.com/64j0/orleans-fsharp--url-shortener
- Owner: 64J0
- License: mit
- Created: 2025-08-02T01:07:06.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2025-08-02T01:07:46.000Z (2 months ago)
- Last Synced: 2025-08-23T06:24:33.342Z (about 2 months ago)
- Topics: asp-net, csharp, fsharp, microsoft-orleans, orleans, orleans-example
- Language: F#
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Microsoft Orleans with F#
This repository holds the F# code that implements the Microsoft Orleans quickstart example UrlShortener:
- [Quickstart: Build your first Orleans app with ASP.NET Core](https://learn.microsoft.com/en-us/dotnet/orleans/quickstarts/build-your-first-orleans-app?tabs=visual-studio-code)
## Project structure
```mermaid
graph LR;
Grains["Grains (F#)"];
CodeGen["CodeGen (C#)"];
Server["Server (F#)"];
Grains-->CodeGen;
CodeGen-->Server;
```Notice that for now, it's necessary to have part of the project in C#, so Orleans correctly generates code. There's more information at the following links:
- [DejanMilicic/OrleansFsharp](https://github.com/DejanMilicic/OrleansFsharp)
- Issue :: [F# host: Could not find an implementation for interface OrleansDashboard.IDashboardGrain - C# host ok](https://github.com/dotnet/orleans/issues/8235)
- Q&A :: [How to use Orleans in a single F# script file .fsx?](https://github.com/dotnet/orleans/discussions/9155)## How to run?
```bash
# start the server
dotnet run --project Server/
# assert that the HTTP server started at the port 5062
```Then, at the browser, open the server endpoint that shortens another URL, like:
- http://localhost:5062/shorten?url=https://gaio.dev
This endpoint outputs a new URL, like `http://localhost:5062/go/4F09B02C`, which, once you open must redirect you to the previously shortened URL, in this case: `https://gaio.dev`.