在eXtremeDB中,每个线程都需要有自己的连接,并且这个连接在线程中是不能共享的。

那么,我们是否可以在主线程中预先建立一个连接池,以供其他线程使用呢?答案是否定的。

WRT connection pool: it is important to understand and keep in mind the difference between eXtremeDB and other DBMS. eXtremeDB works in the same address space as the project that is using it. There is no cost for connects/re-connects. Strictly speaking, connecting to an eXtremeDB database costs the same as calling any other function. eXtremeDB does not allocate any additional memory, sync. primates, sockets and etc. for a connection. For In-memory only databases eXtremeDB uses a pre-allocated record from the connection array. For persistent databases it opens file handles for every storage and log file. For shared-memory databases it maps a shared memory region to the local address space for the first connection (all other re-use that mapping). All tasks (threads) runs in-memory (even file handle allocations). Real network-related processing, like TCP/IP dialogues, happen only for HA/Cluster enabled databases or RSQL access and requires using different APIs (not just mco_db_connect()). So, there is no point in maintaining any kind of connection pool.

WRT the question: “And I have another idea for it. we create a connection pool in the main thread and those connections will be used by other threads. Is this way right and feasible?”

In most OS’s, the program's "main thread" is no different from "other threads", except maybe the initial stack size. So there is no difference between the "main thread" and "all other threads". The rule is still the same: very simply "every thread uses its own separate connection to access the database". No exceptions.

关于eXtremeDB连接问题相关推荐

  1. 软件开发的浪费_软件项目和浪费时间

    软件开发的浪费 I switched into a programming life from a more traditional career path. Just a taste of prog ...

  2. Oracle 学习笔记,,,经验总结整理的。。。

    cmd进入: 1. D:\oracle\ora92\bin> 2. sqlplus /nolog 3. conn sys/sys as sysdba sqlplus进入: username:sy ...

  3. eXtremeDB打开连接问题

    在使用eXtremeDB的时候,正常的逻辑是,先打开数据库,连接数据库,断开连接,关闭数据库. eXtremeDB数据库只用打开一次,并且每个线程都需要拥有自己的连接,为了保证数据的一致性,在关闭数据 ...

  4. 嵌入式开发:McObject eXtremeDB嵌入式数据库系统

    嵌入式数据库已经成为数据库技术的一种流行应用,尤其是对于企业中的物联网应用.有很多理由将数据库嵌入到应用程序的端点中,而不仅仅是将数据推送到设备中.嵌入式开发人员在选择嵌入式数据库时,真正重要且与众不 ...

  5. McObject的eXtremeDB凭“杰出的结构化数据库”荣获业界倍受推崇的大数据卓越奖

    2018年5月29日 - 伦敦,纽约,西雅图:极速数据库管理系统eXtremeDB®的开发商McObject®,宣布以"杰出结构化数据库"类别荣获业界著名的大数据卓越奖. eXtr ...

  6. extremedb同步mysql_数据库选型之内存数据库eXtremeDB

    刘勇    Email:lyssym@sina.com 简介 鉴于内存数据库访问速率快的特点,本文分别从单线程.多线程(并发访问)和多线程读/写混合访问角度对eXtremeDB数据库读写速率展开测试. ...

  7. extremedb怎么和mysql_eXtremeDB 简单开发

    最近我接触了嵌入式数据库eXtremeDB,由于这方面资料很少,网上的参考资料都大同小异,只靠着软件本身提供的参考文档进行开发,所以刚开始开发有些困难.故将基本的用法整理一下. 关于eXtremeDB ...

  8. 在Chrome中打开网页时出现以下问题 您的连接不是私密连接 攻击者可能会试图从 x.x.x.x 窃取您的信息(例如:密码、通讯内容或信用卡信息)

    现象:在Chrome中打开网页时出现以下问题 您的连接不是私密连接 攻击者可能会试图从 x.x.x.x 窃取您的信息(例如:密码.通讯内容或信用卡信息). 当点开"了解详情"后显示 ...

  9. ECS(Linux)连接RDS,使用命令行方式连接实例

    使用命令行方式连接实例 通过命令行连接RDS MySQL数据库,连接方式如下: mysql -h<连接地址> -P<端口> -u<用户名> -p -D<数据库 ...

最新文章

  1. 超过200m文件发送_苦等10年的微信功能——大文件功能来了
  2. 看“意大利文艺复兴艺术展”(1)
  3. MVC2中Area的路由注册实现
  4. [py]py常用模块小结
  5. Node.js+windows
  6. java 汉字乱码_【转】Java中文乱码的解决
  7. 生信技能树 电脑配置linux,2019-07-23生信Linux20题---生信技能树
  8. DTCloud 报表开发
  9. html 圆圈项目符号,html5 项目符号
  10. golang快速入门[3]-go语言helloworld
  11. [NOI2002]贪吃的九头龙(树形dp)
  12. 抖音短视频变现的渠道有哪些
  13. B站UP主发起停更潮
  14. python电子英汉词典显示_如何使用python为Linux打造一款命令行下的在线英汉词典...
  15. SAP ABAP 调用 BAPI_GOODSMVT_CREATE 没有执行 MIGO/MB0A 相同检查的问题
  16. 绿厂Oppo年终刚刚开奖!只有去年的3-5折,员工心态炸了!
  17. 百度砸金22亿背后,要打造一个“万亿”市值的“新”YY直播?
  18. 安装 synaptic on ubuntu 18
  19. lqc_系统账号的安全管理
  20. 疫情防控大课观后感4

热门文章

  1. 原创课程:WordPress快速建站培训课程
  2. VisualGDB 系列
  3. 【2】python算法练习--动态规划专题(1)
  4. python语言的特点和优缺点
  5. Adreno GPU上Android 游戏开发介绍 (2)
  6. oss 服务端签名直传核心代码
  7. 一、拓扑空间与连续映射
  8. 数据集(casia,msu,replay,oulu)的详细信息
  9. Android的相机开发
  10. 前后端分离的项目——图书管理系统(上)