All Projects → msdn129 → DotNetFramework.CAP

msdn129 / DotNetFramework.CAP

Licence: MIT license
DotNetFramework.CAP 是一个基于 .NET Framework的 C# 库,它是一种处理分布式事务的解决方案,基于DotNetCore.CAP修改。

Programming Languages

C#
18002 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to DotNetFramework.CAP

Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+3791.3%)
Mutual labels:  distribution
Open social
Open Social install profile Drupal 8
Stars: ✭ 128 (+456.52%)
Mutual labels:  distribution
Forest
分布式任务调度平台,分布式,任务调度,schedule,scheduler
Stars: ✭ 231 (+904.35%)
Mutual labels:  distribution
Openy
The Open Y platform. See README.md below
Stars: ✭ 45 (+95.65%)
Mutual labels:  distribution
Typo3 Cms Speciality Distribution
Bootstrap Package for TYPO3 CMS
Stars: ✭ 83 (+260.87%)
Mutual labels:  distribution
Distro
A much more elaborate, renewed alternative implementation for Python's platform.linux_distribution()
Stars: ✭ 158 (+586.96%)
Mutual labels:  distribution
Rpi Debian Builder
Build your own Debian image for Raspberry Pi
Stars: ✭ 6 (-73.91%)
Mutual labels:  distribution
distribution-cheatsheet
📈📄👀A lookup repo for a variety of discrete and continuous distributions (incl. Beta, Binomial, Cauchy, Chi-squared, Geometric, Hypergeometric, Normal & Poisson)
Stars: ✭ 43 (+86.96%)
Mutual labels:  distribution
Fitter
Fit data to many distributions
Stars: ✭ 118 (+413.04%)
Mutual labels:  distribution
Ataraxia
Simple and lightweight source-based multi-platform Linux distribution with musl libc.
Stars: ✭ 226 (+882.61%)
Mutual labels:  distribution
Erpnext
Free and Open Source Enterprise Resource Planning (ERP)
Stars: ✭ 10,220 (+44334.78%)
Mutual labels:  distribution
Distribution Is All You Need
The basic distribution probability Tutorial for Deep Learning Researchers
Stars: ✭ 1,109 (+4721.74%)
Mutual labels:  distribution
Reliable
mq transaction, tcc, eventually consistency. tx life cycle: all listeners handled, if necessary, produce next message
Stars: ✭ 187 (+713.04%)
Mutual labels:  distribution
Pyscaffold
🛠 Python project template generator with batteries included
Stars: ✭ 1,022 (+4343.48%)
Mutual labels:  distribution
My Review
主要存放平时理论学习,比如java jdk源码分析、并发理论;面试、数据库、Linux、中间件、分布式、网络协议等方向
Stars: ✭ 237 (+930.43%)
Mutual labels:  distribution
Soda Profile
The installation profile for SODA distribution
Stars: ✭ 6 (-73.91%)
Mutual labels:  distribution
Build
Armbian Linux build framework
Stars: ✭ 1,827 (+7843.48%)
Mutual labels:  distribution
pimod
Reconfigure Raspberry Pi images with an easy, Docker-like configuration file
Stars: ✭ 94 (+308.7%)
Mutual labels:  distribution
Stanford Cme 106 Probability And Statistics
VIP cheatsheets for Stanford's CME 106 Probability and Statistics for Engineers
Stars: ✭ 242 (+952.17%)
Mutual labels:  distribution
Pke
PKE is an extremely simple CNCF certified Kubernetes installer and distribution, designed to work on any cloud, VM or bare metal.
Stars: ✭ 211 (+817.39%)
Mutual labels:  distribution

联系QQ 355809289

DotNetFramework.CAP

DotNetFramework.CAP 是一个基于 .NET Framework的 C# 库,它是一种处理分布式事务的解决方案,基于DotNetCore.CAP修改。

##1. 此代码是基于DotCore.CAP 2.5.1 版本修改.

##2. DotNetFramework.CAP 新增Core文件夹主要实现 DotNetCore下的Ioc容器. 日志Logger.

###a.  使用 AutoFac 实现 ServiceProvider,ServiceCollection,ServiceScope,ActivatorUtilities.

###b.  使用 Serilog 实现 Core下的Logger.

##3. 内部代码修改如下:

###a. 删除DashBoard.暂时没有实现。

###b. 启动配置修改。
./App_Srart

public class CapConfig
{
    public static IServiceCollection Services { get; set; }

    public static void RegisterCap()
    {
        Services = new ServiceCollection();
        Services.AddCap(stetup =>
        {
            // 注册节点到 Consul
            stetup.UseSqlServer("Data Source=localhost;database=donet61;Uid=sa;pwd=sa;");
            stetup.UseRabbitMQ(option =>
            {
                option.VirtualHost = "HengQueue";
                option.HostName = "localhost";
                option.Port = 5672;
                option.UserName = "zhangheng";
                option.Password = "123456";
            });
        });
        Services.BeginRegister();
        Services.ServiceProvider.GetService<IBootstrapper>().BootstrapAsync(new CancellationToken());
    }
}
protected void Application_Start()
{
    CapConfig.RegisterCap();
}

###c.  获取controller下订阅方法修改。
 (这里由于.net core asp.net 和 framework asp.net的web机制变化)
        //heng
        //var types = Assembly.GetEntryAssembly().ExportedTypes;
        var types = BuildManager.GetGlobalAsaxType().BaseType.Assembly.ExportedTypes;
###d. Dapper执行Sql (将异步执行改为同步,因为发现在frameworkwork下会卡死)
 connection.Execute(sql);
 
###e. Sqlserver执行操作的发布消息时机的改动。
###f. EntityFramework执行操作的发布消息时机的改动。

Diagnostic.DiagnosticSource
由于原作者(DoNetCoreCAP基于Core下Sqlserver的Diagnostic,完成的观测时机进行发布消息),
然而在framework下的Sqlserver Client代码没有实现Diagnostic的可观测行为。  (

扩展commit方法实时消息推送)  

修改为:   public static void Commit(this IDbTransaction trans, ICapPublisher bus)
          {
              bus.Transaction.Commit();
          }
          public static void Commit(this DbContextTransaction trans, ICapPublisher bus)
          {
              bus.Transaction.Commit();
          }    
          
          提交事务使用如下代码:   
          transaction.Commit(_capBus);   详情参阅例子代码CapWeb251 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].