{"id":39231893,"url":"https://github.com/cv-lang/application-server","last_synced_at":"2026-01-17T23:42:10.597Z","repository":{"id":52081755,"uuid":"253434002","full_name":"cv-lang/application-server","owner":"cv-lang","description":"Application Server","archived":false,"fork":false,"pushed_at":"2022-08-13T17:47:42.000Z","size":35351,"stargazers_count":60,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"version6-3","last_synced_at":"2025-12-29T21:50:26.343Z","etag":null,"topics":["application-server","bpmn","csharp","native-workflows","virtual-machine","workflow"],"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/cv-lang.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-04-06T08:06:15.000Z","updated_at":"2025-08-08T05:35:44.000Z","dependencies_parsed_at":"2022-08-30T10:01:15.368Z","dependency_job_id":null,"html_url":"https://github.com/cv-lang/application-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cv-lang/application-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cv-lang%2Fapplication-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cv-lang%2Fapplication-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cv-lang%2Fapplication-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cv-lang%2Fapplication-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cv-lang","download_url":"https://codeload.github.com/cv-lang/application-server/tar.gz/refs/heads/version6-3","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cv-lang%2Fapplication-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28522313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["application-server","bpmn","csharp","native-workflows","virtual-machine","workflow"],"created_at":"2026-01-17T23:42:09.997Z","updated_at":"2026-01-17T23:42:10.585Z","avatar_url":"https://github.com/cv-lang.png","language":"C#","readme":"# .NET application-server 6\n\n## Process type\n\n- Step base process - Process running in native job-worker and api. After execution of part od task, change his step. Buisness logic depend on step.\n- Long running process - Process running in virtual-machine it's execution can by hibernatet (stopped) and resume later. \n\n\n\n\n\n\n\n\n# Previous version\n\n# .NET application-server\n\u003cimg src=\"https://raw.githubusercontent.com/cv-lang/application-server/master/wiki/dotnet-application-server-process.png\" alt=\".net application server\"/\u003e \n\n### Run your long-running business process\n\n.NET Application-server is a program that manages your business applications,  native workflow/business processes, jobs and performs the “magic” of converting .Net Console Application into native workflow that can be run on it.\n\nLike IIS, the application-server is responsible for running your business processes,native workflows, jobs and services. Provides uniform methods for communication, logging, debugging and managing the entire system. It allows you to run business processes on different server nodes (on different physical machines).\n\n[Getting started - step by step - creating a business native workflow](https://github.com/cv-lang/application-server/blob/master/wiki/GettingStarted.md)\n\n# .Net Native workflow\n.Net Native workflow is similar to .Net Console Application but has two differences:\n- Can communicate with the frontend to display more complex business forms and enter multiple data simultaneously. List of suppoerted frontends: Asp.Net Core MVC, Blazor server-site, Blazor Client-site, WPF.\n- It has the ability to suspend execution while waiting for user data or external events.. This pause can last for seconds, days, months, years without using CPU or RAM resources - it only uses harddrive to store execution state.\n\n.Net Virtual Machine is used in the background - to hibernate the entire process while it's waiting -  and save it to storage as a hard disk. \nOnce exterlnal trigger received (user interaction, timers ...), the process can be loaded from storage into the virtual machine and restored. Hibernated process can be restored on any another machine.\n\n# Alternative to\n- Azure Functions / Durable Functions - .Net Native workflow is just like a regular console application, without the await hack's and can be persisted for years \n- AWS Lambda - It cannot run long-running processes\n- Windows Workflow Foundation - WF4 is a nightmare, don't even waste your time on it\n\n\n# Example of a simple native workflow\n\nBelow is an example process with three steps. 1) View and get user data. 2) Put the process to sleep for **2 years**. 3) Send an email to the address provided earlier.\n\nView from the process - step 1:\n\n\u003cimg src=\"https://raw.githubusercontent.com/cv-lang/application-server/master/wiki/simpleTestPRocessView.png\" alt=\"simple test process view\" width=\"360px\"/\u003e \n\nCode for the sample native workflow process:\n\n```csharp\npublic class SimpleTestProcess : BaseProcess\n{\n    protected override object Start(object inputParameter)\n    {            \n        //prepare model to show in MVC frontend\n        var model = new HelloWorlsModel();  //code below\n        model.MessageToTheWorld = \"Hello World\";\n        model.AnotherMessage = \"Message from process\";\n        model.DateTimeFromProcess = DateTime.Now;\n\n        //show MVC view HelloWorldView with model\n        var response = ShowForm(\"HelloWorldView\", model); //we show form and waiting for user to submit form\n\n        //after user submit form, save to property user data \n        UserEmail = response.UserEmail;\n        UserMessage = response.MessageFromUser;\n\n        //go to deep sleep - 2 years\n        Sleep(TimeSpan.FromDays(365 * 2));\n\n        //after wakeup if it's  Sunday\n        if ( DateTime.Now.DayOfWeek == DayOfWeek.Sunday)\n        {\n            //go to sleep for a day\n            Sleep(TimeSpan.FromDays(1));\n        }\n\n        //after 2 year sleeping, send email to user with notification\n        sendEmail();\n\n        //end process\n        return null;\n    }\n\n    private void sendEmail()\n    {\n        Log($\"Sending email to user {UserEmail}, {UserMessage}\");\n\n        //you should do real sending ...\n        //var emailService = new EmailService();\n        //emialService.SendEmail(UserEmail,UserMessage);\n    }\n\n    #region Process properties\n    public string UserEmail { get; set; }\n    public string UserMessage { get; set; }\n    #endregion\n}\n\npublic class HelloWorlsModel\n{\n    public string MessageToTheWorld { get; set; }\n    public string AnotherMessage { get; set; }\n    public DateTime DateTimeFromProcess { get; set; }\n    public string UserEmail { get; set; }\n    public string MessageFromUser { get; set; }\n}\n```\n\nBlazor page - HelloWordView - view for step 1\n```html\n\u003cdiv class=\"row\"\u003e\n    \u003cdiv class=\"col-lg-8 mx-auto\"\u003e\n        \u003ch1 class=\"pt-5 pb-3\"\u003eHello World View\u003c/h1\u003e\n        \u003cp\u003e\n            @Model.MessageToTheWorld        \n            Message from process: @Model.AnotherMessage at @Model.DateTimeFromProcess\n        \u003c/p\u003e\n        \u003cEditForm Model=\"@Model\" OnValidSubmit=\"@OnSubmit\"\u003e\n            \u003cDataAnnotationsValidator /\u003e\n            \u003cValidationSummary /\u003e\n            \u003cdiv class=\"form-group mt-5\"\u003e\n                \u003ch3\u003eUser data form\u003c/h3\u003e\n            \u003c/div\u003e\n            \u003cdiv class=\"form-group\"\u003e\n                \u003clabel asp-for=\"Model.UserEmail\" class=\"control-label\"\u003eEmail\u003c/label\u003e\n                \u003cInputText class=\"form-control\" @bind-Value=\"Model.UserEmail\" /\u003e\n            \u003c/div\u003e\n            \u003cdiv class=\"form-group\"\u003e\n                \u003clabel asp-for=\"Model.MessageFromUser\" class=\"control-label\"\u003eMessage\u003c/label\u003e\n                \u003cInputText class=\"form-control\" @bind-Value=\"Model.MessageFromUser\" /\u003e\n            \u003c/div\u003e\n            \u003cbutton class=\"btn btn-primary btn-block mt-2\" type=\"submit\"\u003e Confirm \u003c/button\u003e\n        \u003c/EditForm\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n\n# Advantages and disadvantages of Native workflow\n**Advantages of Native workflow:**\n- are structural 1: 1 with BPMN diagrams\n- they have all the necessary functionalities in one place (sub-processes, jobs, timers, etc.)\n- they are very easy to write - you write like a console application\n- they are very easy to debug - you can run them like a console application\n- they are very easy to test (as opposed to e.g. Windows Workflow Foundation)\n\n**Disadvantages:**\n- If you've read the 'Example of a simple native workflow' section, you may be wondering how to put a process to sleep for 2 years without having to run the entire server for 2 years?\nThe answer is - virtual machine. Thanks to it, it is possible to hibernate the process and restore it later. This virtualization has some performance impact. It is just as fast as other alternatives such as Windows Workflow Foundation etc.\n\n\n# Example of the customer's loan process\nLet's assume that we have a customer who wants to get a bank loan. The diagram below provides a general overview of all steps in the process. The steps are performed by the customer and/or the bank's system.\nThis diagram is drawn in the Business Process Model Notation (BPMN - https://en.wikipedia.org/wiki/Business_Process_Model_and_Notation) and starts in the top left blank circle.\nActions and steps are represented by a rounded rectangle and performed in the direction of the arrow. So first we have \"Registration and approvals ...\", then \"Send verification code by e-mail ...\" and so on. \nThese kinds of diagrams do not show all the details. They are used to show high-level functionality. The BPMN diagram is then \"converted\" by the developer to the native workflow / business process shown in Diagram 2.\n\n\u003cimg width=\"65%\" src=\"https://raw.githubusercontent.com/cv-lang/application-server/master/wiki/loanProcessDiagram.png\" alt=\".net application server\"/\u003e\nDiagram 1 - BPMN Bank loan process\n\n\u003cimg width=\"65%\" src=\"https://raw.githubusercontent.com/cv-lang/application-server/master/wiki/loanProcessNativeWorkflow.png\" alt=\".net application server\"/\u003e\nDiagram 2 - Native workflow in C#\n\n\nCode for Registration step:\n```csharp\nprotected void Registration()\n{\n    SetStepData(\"Registration\", \"Get email, phone number and agreements from Custromer\");\n    var registration = getRegistrationStepModel();\n    var registrationResponse = ShowForm(\"Registration\", registration);\n\n    SetStepData(\"Registration-response\", \"Custromer put contact data\");\n    Log(\"check, just in case, whether approved consents\");\n    validateRegistrationStepResponse(registrationResponse);\n\n    SetStepData(\"Registration-approve\", \"Custromer approve consents\");\n\n    Log(\"Save the Customer selections\");\n    SelectedProduct = registrationResponse.SelectedProduct;\n    ClientEmail = registrationResponse.Email;\n    ClientPhoneNumber = registrationResponse.PhoneNumber;\n}\n```\n\nRegistration .Net Core Asp.Net MVC - Registration View\n\n\u003cimg width=\"50%\" src=\"https://raw.githubusercontent.com/cv-lang/application-server/master/wiki/CustomersLoanProcessView.png\" alt=\".net application server\"/\u003e\n\n# Frontends\n- Asp.Net Core MVC\n- Asp.Net Core Blazor Server\n- Asp.Net Core Blazor Client (wasm)\n\n# Solution description\n- Cvl.ApplicationServer.NodeHost - NodeNetwork module\n- Cvl.ApplicationServer.NodeHostWeb - Hosting application of NodeNetwork module \n- **Cvl.ApplicationServer.Server** - main part for server  ( contains all staf needet for create simple application serwer node)\n- **Cvl.ApplicationServer.Standard** - core part of application server \n- Cvl.ApplicationServer.TestBuisnessProcesses - Automation test for buisness process\n- Cvl.ApplicationServer.UnityTest- test for application server logics\n- Cvl.ApplicationServer.WpfConsole - WPF application to managment server \n- Cvl.ApplicationServer.WpfConsoleCore - WPF Core application to managment\n\n# NuGet 'Cvl.ApplicationServer'\nPM\u003e Install-Package Cvl.ApplicationServer -Version 0.9.1\n\n[NuGet package Cvl.VirtualMachine](https://www.nuget.org/packages/Cvl.ApplicationServer/)\n\nPM\u003e Install-Package Cvl.ApplicationServer.Server -Version 0.9.1\n\n[NuGet package Cvl.VirtualMachine.Server](https://www.nuget.org/packages/Cvl.ApplicationServer.Server/)\n\n# Dependencies\n\n[.NET virtual-machine](https://github.com/cv-lang/virtual-machine)\n\n[.NET node-network](https://github.com/cv-lang/node-network)\n\n# Getting started\n[Getting started - step by step - creating a business native workflow](https://github.com/cv-lang/application-server/blob/master/wiki/GettingStarted.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcv-lang%2Fapplication-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcv-lang%2Fapplication-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcv-lang%2Fapplication-server/lists"}