{"id":24438871,"url":"https://github.com/marcduiker/demos-serverless-persistence","last_synced_at":"2025-10-11T22:20:39.315Z","repository":{"id":37508624,"uuid":"307489325","full_name":"marcduiker/demos-serverless-persistence","owner":"marcduiker","description":"Repository with demos for my talk 'Persistence in Serverless Applications'","archived":false,"fork":false,"pushed_at":"2023-04-28T10:00:47.000Z","size":77,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T00:13:34.825Z","etag":null,"topics":["azure-functions","blob-storage","cosmosdb","durable-entities","serverless","table-storage"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcduiker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-26T19:57:35.000Z","updated_at":"2022-11-14T10:46:53.000Z","dependencies_parsed_at":"2023-02-17T17:31:22.000Z","dependency_job_id":null,"html_url":"https://github.com/marcduiker/demos-serverless-persistence","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcduiker/demos-serverless-persistence","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcduiker%2Fdemos-serverless-persistence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcduiker%2Fdemos-serverless-persistence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcduiker%2Fdemos-serverless-persistence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcduiker%2Fdemos-serverless-persistence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcduiker","download_url":"https://codeload.github.com/marcduiker/demos-serverless-persistence/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcduiker%2Fdemos-serverless-persistence/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009061,"owners_count":26084549,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-functions","blob-storage","cosmosdb","durable-entities","serverless","table-storage"],"created_at":"2025-01-20T19:18:00.085Z","updated_at":"2025-10-11T22:20:39.300Z","avatar_url":"https://github.com/marcduiker.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Persistance in Serverless Applications\n\nThis repository contains demos for my talk: 'Persistence in Serverless Applications'.\n\nThe `src` folder contains an Azure Functions project (.NET 6 in-process) with the following HTTP triggered functions:\n\n| Name | Binding | Description\n| -- | -- | --\n| StorePlayerWithStreamBlobOutput | Blob output | Using `Stream`\n| StorePlayerWithStringBlobOutput | Blob output | Using `string`\n| StorePlayerWithStringBlobOutputDynamic | Blob output | Using `IBinder` (dynamic binding)\n| GetPlayerWithStreamBlobInput | Blob input | Using `Stream`\n| GetPlayerWithStringBlobInputDynamic | Blob input | Using `IBinder` (dynamic binding)\n| StorePlayerReturnAttributeTableOutput | Table output | Using return attribute\n| StorePlayersWithCollectorTableOutput | Table output | Using `IAsyncCollector\u003cPlayerEntity\u003e`\n| GetPlayerByRegionAndIdTableInput | Table input | Using `PlayerEntity`\n| GetPlayersByRegionTableClient | Table input | Using `TableClient`\n| StorePlayerCosmosOutput | CosmosDB output | Using the `Player`\n| StorePlayerReturnAttributeCosmosOutput | CosmosDB output | Using return attribute\n| StorePlayersWithCollectorCosmosOutput | CosmosDB output | Using `IAsyncCollector\u003cPlayer\u003e`\n| GetPlayerByRegionAndIdCosmosInput | CosmosDB input | Using `Player`\n| GetPlayersByRegionDocumentClientCosmosInput | CosmosDB input | Using `DocumentClient`\n| UpdatePlayerScore | Durable Entity | Uses Durable Functions\n\n## Running locally\n\n### Prerequisites\n\n- [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0); the SDK and runtime to develop Azure Functions in C# .NET 6.\n- [VSCode](https://code.visualstudio.com/Download); a powerful cross platform source editor.\n- [Azure Functions extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurefunctions); for creating and running Azure Functions locally (using the Azure Functions Core Tools).\n- [Azurite extension for VSCode](https://marketplace.visualstudio.com/items?itemName=Azurite.azurite); Storage emulator for blobs, tables and queues.\n- [Azure Databases extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb); To manage your cloud based CosmosDB from VSCode.\n- [Azure CosmosDB](https://docs.microsoft.com/azure/cosmos-db/try-free) or the [CosmosDB Emulator](https://docs.microsoft.com/azure/cosmos-db/local-emulator); a NoSQL data store.\n- [Azure Storage Explorer](https://azure.microsoft.com/features/storage-explorer); Graphical user interface to manage and inspect blobs, tables, and queues, either in the cloud or locally emulated.\n- A REST client, such as the [REST Client extension for VSCode](https://marketplace.visualstudio.com/items?itemName=humao.rest-client).\n\n\u003e *All VSCode extensions are automatically recommended to be installed when you open this folder in VSCode.*\n\n### Running the Function App\n\n1. Clone this repo.\n2. Open the folder in VSCode.\n3. Install the recommended extensions.\n4. Ensure that a CosmosDB instance is present in either the cloud or the emulator with these settings:\n   - Database: `gamedb`\n   - Collection: `players`\n   - PartitionKey: `region`\n5. Build the project to ensure that there are no errors:\n   - Via the build task: `CTRL/CMD+SHIFT+B` or\n   - Via the terminal in the `src/ServerlessPersistence` folder: `dotnet build`\n6. Start Azurite services:\n   - Via the command palette: `CRTL/CMD+SHIFT+P` -\u003e `Azurite: Start`\n7. Run the Function App:\n   - Via the debug command: `F5` or\n   - Via the terminal in the `src/ServerlessPersistence` folder: `func start`.\n8. Now use the http files located in `tst` and a REST client to trigger the functions.\n\n## More info\n\nIf you want to learn more about Azure Functions, have a look at [Azure Functions University](https://github.com/marcduiker/azure-functions-university), a free and open source curriculum on GitHub and YouTube.\n\nFound a bug or want to ask a question? Feel free to raise an [issue](https://github.com/marcduiker/demos-serverless-persistence/issues) or submit a pull request. Or you can reach out to me on [Twitter](https://twitter.com/marcduiker).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcduiker%2Fdemos-serverless-persistence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcduiker%2Fdemos-serverless-persistence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcduiker%2Fdemos-serverless-persistence/lists"}