My Participation in ServiceComb - Apache Committer 成长经验分享HUAWEI.COM My Participation in ServiceComb Security Level: Feng Zheng 2018-10-12 Contents 1. Biography 2. My First Meet with ServiceComb 3. My Contributions to the Saga Project 4. How to Advance processing and transaction processing in microservice-based environments. Huawei Confidential 4 My First Meet with ServiceComb • Red Hat Narayana LRA (Long Running Action) • ServiceComb Saga • We in distributed environments l Eventual consistency based on the Saga model Huawei Confidential 5 My Contributions to the Saga Project l Used the Byteman tool to optimize the exception and timeout test0 码力 | 9 页 | 2.23 MB | 1 年前3
 现代C++ 教程:高速上手C++11/14/17/20象自动删除。 但还不够,因为使用 std::shared_ptr 仍然需要使用 new 来调用,这使得代码出现了某种程度上的 不对称。 std::make_shared 就能够用来消除显式的使用 new,所以 std::make_shared 会分配创建传入参 数中的对象,并返回这个对象类型的 std::shared_ptr 指针。例如: #include#include int(10); // illegal, no direct assignment // Constructed a std::shared_ptr auto pointer = std::make_shared (10); foo(pointer); std::cout << *pointer << std::endl; // 11 // The shared_ptr will be 可以通过 get() 方法来获取原始指针,通过 reset() 来减少一个引用计数,并 通过 use_count() 来查看一个对象的引用计数。例如: auto pointer = std::make_shared (10); auto pointer2 = pointer; // 引用计数 +1 auto pointer3 = pointer; // 引用计数 +1 53 5.3 std::unique_ptr 0 码力 | 83 页 | 2.42 MB | 1 年前3
 C++高性能并行编程与优化 - 课件 - Zeno 中的现代 C++ 最佳实践 作为纯虚函数,然后让猫和狗分别实现他 clone 的调用 • 这样一来,我们通用的 eatTwice 函数里 只需调用 obj->clone() ,就等价于调用了 相应的猫或是狗的 make_shared(*obj) ,这就实现了拷 贝的多态。 如何批量定义 clone 函数? • 可以定义一个宏 IOBJECT_DEFINE_CLONE ,其内容是 clone 的实现。这里我们用 然后在这个 IObjectClone 里实现 clone 即可。那为什么需要派生类作为模板参数 ? • 因为 shared_ptr 的深拷贝需要知道对象具 体的类型。注意这里不仅 make_shared 的参数有 Derived , this 指针(原本是 IObjectClone const * 类型)也需要转化成 Derived 的指针才能调用 Derived 的拷贝 构造函数 0 码力 | 54 页 | 3.94 MB | 1 年前3
 FISCO BCOS 2.1.0 中文文档服务并登陆: root 账户密码。 CentOS: 执行下面两条命令进行安装。 启动 MySQL 服务,登陆并为 root 用户设置密码。 配置MySQL参数 查看配置文件my.cnf 执行之后可以看到如下如下数据 配置my.cnf sudo apt install -y mysql-server mysql-client libmysqlclient-dev service msyql start are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找 这几个文件,找到第一个存在的文件,在[mysqld]段中新增如下内容(如果存 在则修改值)。 重启mysql-sever,验证参数。 std::make_shared(_origin)); } else { // 值不存在,插入 count = table->insert( HELLOWORLD_KEY_FIELD_NAME, entry, std::make_shared (_origin)); 0 码力 | 1058 页 | 740.85 KB | 1 年前3
 FISCO BCOS 2.3.0 中文文档服务并登陆: root 账户密码。 CentOS: 执行下面两条命令进行安装。 启动 MySQL 服务,登陆并为 root 用户设置密码。 配置MySQL参数 查看配置文件my.cnf 执行之后可以看到如下如下数据 配置my.cnf sudo apt install -y mysql-server mysql-client libmysqlclient-dev service msyql start are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找 这几个文件,找到第一个存在的文件,在[mysqld]段中新增如下内容(如果存 在则修改值)。 重启mysql-sever,验证参数。 std::make_shared(_origin)); } else { // 值不存在,插入 count = table->insert( HELLOWORLD_KEY_FIELD_NAME, entry, std::make_shared (_origin)); 0 码力 | 1227 页 | 10.79 MB | 1 年前3
 FISCO BCOS 2.2.0 中文文档服务并登陆: root 账户密码。 CentOS: 执行下面两条命令进行安装。 启动 MySQL 服务,登陆并为 root 用户设置密码。 配置MySQL参数 查看配置文件my.cnf 执行之后可以看到如下如下数据 配置my.cnf sudo apt install -y mysql-server mysql-client libmysqlclient-dev service msyql start are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找 这几个文件,找到第一个存在的文件,在[mysqld]段中新增如下内容(如果存 在则修改值)。 重启mysql-sever,验证参数。 table->update(HELLOWORLD_KEY_FIELD_NAME, entry, table->newCondition(), std::make_shared(_origin)); } else { // 值不存在,插入 2.2.5 注册合约并编译源码 注册开发的预编译合约。修改FISCO- 0 码力 | 1156 页 | 10.03 MB | 1 年前3
 FISCO BCOS 2.4.0 中文文档服务并登陆: root 账户密码。 CentOS: 执行下面两条命令进行安装。 启动 MySQL 服务,登陆并为 root 用户设置密码。 配置MySQL参数 查看配置文件my.cnf 执行之后可以看到如下如下数据 配置my.cnf sudo apt install -y mysql-server mysql-client libmysqlclient-dev service msyql start are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找 这几个文件,找到第一个存在的文件,在[mysqld]段中新增如下内容(如果存 在则修改值)。 重启mysql-sever,验证参数。 std::make_shared(_origin)); } else { // 值不存在,插入 count = table->insert( HELLOWORLD_KEY_FIELD_NAME, entry, std::make_shared (_origin)); 0 码力 | 1314 页 | 11.21 MB | 1 年前3
 FISCO BCOS 2.5.0 中文文档服务并登陆: root 账户密码。 CentOS: 执行下面两条命令进行安装。 启动 MySQL 服务,登陆并为 root 用户设置密码。 配置MySQL参数 查看配置文件my.cnf 执行之后可以看到如下如下数据 配置my.cnf sudo apt install -y mysql-server mysql-client libmysqlclient-dev service msyql start are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找 这几个文件,找到第一个存在的文件,在[mysqld]段中新增如下内容(如果存 在则修改值)。 重启mysql-sever,验证参数。 std::make_shared(_origin)); } else { // 值不存在,插入 count = table->insert( HELLOWORLD_KEY_FIELD_NAME, entry, std::make_shared (_origin)); 0 码力 | 1456 页 | 13.35 MB | 1 年前3
 FISCO BCOS 2.2.0 中文文档文件 件 件my.cnf mysql --help | grep 'Default options' -A 1 执行之后可以看到如下如下数据 Default options are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf 配 配 配置 置 置my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找这几个文件,找到第一个存 在的文件,在[mysqld]段中新增如下内容(如果存在则修改值)。 max_allowed_packet = 1024M sql_mode =STRICT_TRANS_TABLES 6.8. 分 分 分布 布 布式 式 式存 存 存储 储 储 77 FISCO entry, table-> ˓→newCondition(), std::make_shared(_origin)); } else { // 值不存在,插入 count = table->insert( HELLOWORLD_KEY_FIELD_NAME, entry, std::make_shared (_ ˓→origin)); } if 0 码力 | 418 页 | 6.51 MB | 1 年前3
 FISCO BCOS 2.3.0 中文文档文件 件 件my.cnf mysql --help | grep 'Default options' -A 1 执行之后可以看到如下如下数据 Default options are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf 配 配 配置 置 置my.cnf mysql依次从/etc/mysql/my.cnf,/etc/my.cnf,~/.my.cnf中加载配置。依次查找这几个文件,找到第一个存 在的文件,在[mysqld]段中新增如下内容(如果存在则修改值)。 max_allowed_packet = 1024M sql_mode =STRICT_TRANS_TABLES 重 重 重启 启 启mysql-sever, , ,验 验 验证 证 证参 Documentation, 发 发 发布 布 布 v2.3.0 (续上页) std::make_shared(_origin)); } else { // 值不存在,插入 count = table->insert( HELLOWORLD_KEY_FIELD_NAME, entry, std::make_shared (_ ˓→origin)); } if 0 码力 | 442 页 | 7.23 MB | 1 年前3
共 511 条
- 1
 - 2
 - 3
 - 4
 - 5
 - 6
 - 52
 













