上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页
摘要: ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务。分布式应用可以使用它来实现诸如:统一命名服务、配置管理、分布式锁服务、集群管理等功能。公司常用到的是Java服务集群的管理。1.函数介绍//create a handle to used communicate with zooke... 阅读全文
posted @ 2013-04-27 17:53 春文秋武 阅读(1432) 评论(0) 推荐(0) 编辑
摘要: boost thread库提供了三种级别的锁:boost::shared_lock(读锁),boost::upgrade_lock(和读锁不互斥,与写锁、upgrade_loc互斥),boost::unique_loc(写锁)五种互斥变量:mutex:独占式互斥量shared_mutex: 读共享/... 阅读全文
posted @ 2013-04-27 16:59 春文秋武 阅读(503) 评论(0) 推荐(0) 编辑
摘要: 1.安装protobuf编译器./configure --prefix=dist; make; make install; 配置bin路径2.进入解压后的python目录下参考README.txt,python setup.py install3.使用message RowProto {requir... 阅读全文
posted @ 2013-03-28 10:39 春文秋武 阅读(446) 评论(0) 推荐(0) 编辑
摘要: Google Protocol Buffer( 简称 Protobuf) 是 Google 公司内部的混合语言数据标准,目前已经正在使用的有超过 48,162 种报文格式定义和超过 12,183 个 .proto 文件。他们用于 RPC 系统和持续数据存储系统。Protocol Buffers 是... 阅读全文
posted @ 2013-03-27 14:27 春文秋武 阅读(217) 评论(0) 推荐(0) 编辑
摘要: linux下常用线程库为POSIX线程(pthread),可运行于Solaris、FreeBSD、Linux 等平台,Windows平台亦有pthread-win32可供使用。常用类型:#include pthread_t pthread_attr_tpthread_t代表线程ID,不同平台是不同的... 阅读全文
posted @ 2013-02-07 10:15 春文秋武 阅读(195) 评论(0) 推荐(0) 编辑
摘要: log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration. ... 阅读全文
posted @ 2013-02-06 18:09 春文秋武 阅读(309) 评论(0) 推荐(0) 编辑
摘要: Boost Multi-index Containers Library定义了multi_index_container模板类,可以从不同的维度建索引、排序和存取。如上图,容器multi_index_container分别从shape,number和sequenced(默认插入的顺序)三个维度对元素... 阅读全文
posted @ 2013-01-08 18:41 春文秋武 阅读(831) 评论(0) 推荐(0) 编辑
摘要: time.h(ctime)是c time library,定义了获取和操作日期和时间的函数。1. 结构typedef long time_t;time_t是长整型,表示的是距(1970年,1月1日08:00:00)的秒数,常常通过time函数获得。struct tm {int tm_sec; //秒... 阅读全文
posted @ 2013-01-04 11:48 春文秋武 阅读(1413) 评论(0) 推荐(0) 编辑
摘要: zmq是一个消息队列。可以在进程内、进程间、TCP、多播中,以消息为单位传输数据,而不是socket的字节流。官方主页上有下载、使用、文档,蛮全的。常用模式有:Request-Reply,Publish-Subscribe,Parallel Pipeline。Request-Replyrequest... 阅读全文
posted @ 2012-12-27 18:23 春文秋武 阅读(1685) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int main() { int result = 0; char hostName[100]; struct hostent* host = NULL; result = gethostname(hostName,... 阅读全文
posted @ 2012-12-19 17:56 春文秋武 阅读(232) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 22 下一页