Posts

JDK Version java -version openjdk version "1.8.0_151" OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12) OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode) Verify that the target server is configured to serve SSL https://www.ssllabs.com/ssltest/ Connecting to SSL services https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html If you are getting an exception due to “Illegal key size” and you are using Sun’s JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files. See the following links for more information:

导语:本文最早刊登于《哈佛商业评论》,是其历史最佳文章之一。 作者彼得·德鲁克是现代管理学之父,其著作影响了数代追求创新以及 最佳管理实践的学者和企业家们,各类商业管理课程也都深受彼得·德鲁克思想的影响。 本文后被收录在德鲁克的著作《21 世纪的管理挑战》中。非常值得一读再读。 作者 | 彼得·德鲁克 来源 | 《21世纪的管理挑战》第 6 章 自我管理(节选) 字数 | 7150(阅读约 10 分钟) 我们生活的时代充满着前所未有的机会:如果你有雄心,又不乏智慧,那么不管你从何处起步,你都可以沿着自己所选择的道路登上事业的顶峰。 不过,有了机会,也就有了责任。今天的公司并不怎么管员工的职业发展;实际上,知识工作者必须成为自己的首席执行官。你应该在公司中开辟自己的天地,知道何时改变发展道路,并在可能长达 50 年的职业生涯中不断努力、干出实绩。 要做好这些事情,你首先要对自己有深刻的认识——不仅清楚自己的优点和缺点,也知道自己是怎样学习新知识和与别人共事的,并且还明白自己的价值观是什么、自己又能在哪些方面做出最大贡献。 因为只有当所有工作都从自己的长处着眼,你才能真正做到卓尔不群。 历史上的伟人——拿破仑、达芬奇、莫扎特——都很善于自我管理。这在很大程度上也是他们成为伟人的原因。不过,他们属于不可多得的奇才,不但有着不同于常人的天资,而且天生就会管理自己,因而才取得了不同于常人的成就。 而我们当中的大多数人,甚至包括那些还算有点天赋的人,都不得不通过学习来掌握自我管理的技巧。 我们必须学会自我发展,必须知道把自己放在什么样的位置上,才能做出最大的贡献,而且还必须在长达 50 年的职业生涯中保持着高度的警觉和投入。 我们的长处是什么 多数人都以为他们知道自己擅长什么。其实不然,更多的情况是,人们只知道自己不擅长什么——即便是在这一点上,人们也往往认识不清。 然而,一个人要有所作为,只能靠发挥自己的长处,而如果从事自己不太擅长的工作是无法取得成就的,更不用说那些自己根本干不了的事情了。 我们需要知己所长,才能知己所属。 要发现自己的长处,唯一途径就是回馈分析法(feedback analysis)。每当做出重要决定或采取重要行动时,你都可以事先记录下自己对结果的预期。9 到 12 个月后,再将实际结果与自己的预期比较。 我本人采用这种方法已有 15 到 20 年了,而每次使用都有意外的收获。 我们只要持之以恒地运用这个简单的方法,就能在较短的时间内,发现自己的长处。在采用这种方法之后,你就能知道,自己正在做(或没有做)的哪些事情会让你的长处无法发挥出来。 同时,你也将看到自己在哪些方面能力不是特别强。最后,你还将了解到自己在哪些方面完全不擅长,做不出成绩来。 根据回馈分析的启示,你需要在几方面采取行动。 首先最重要的是,专注于你的长处,把自己放到那些能发挥长处的地方。 其次,加强你的长处。回馈分析会迅速地显示,你在哪些方面需要改善自己的技能或学习新技能。它还将显示你在知识上的差距——这些差距通常都可以弥补。 第三,发现任何由于恃才傲物而造成的偏见和无知,并且加以克服。有太多的人,尤其是那些术业有专攻的人,往往对其他领域的知识不屑一顾,或者认为聪明的头脑就可取代知识。 比如,很多一流的工程师遇上与人相关的事就束手无策,他们还以此为荣——因为他们觉得,对条理清晰的工程师头脑来说,人太混乱无序了。与此形成鲜明对照的是,人力资源方面的专业人员常常以他们连基本的会计知识或数量分析都一无所知而自傲。 不过,人们要是对这样的无知还沾沾自喜的话,那无异于自取灭亡。其实,要让自己的长处得到充分发挥,你就应该努力学习新技能、汲取新知识。 另外一点也同样重要——纠正你的不良习惯。所谓不良习惯,是指那些会影响你的工作成效和工作表现的事情。这样的习惯能很快地在回馈中反映出来。 与此同时,回馈还会反映出哪些问题是由缺乏礼貌造成的。礼貌是一个组织的润滑剂。 礼貌,其实也很简单。无非是说声「请」和「谢谢」,记住别人的名字,或问候对方家人这样的小事。许多聪明人,尤其是聪明的年轻人,没有意识到这一点。 如果回馈分析表明某个人只要一遇到需要别人合作的事就屡屡失败,那么很可能就意味着这个人的举止不大得体——也就是缺乏礼貌。 把预期和实际结果进行比较,也会发现自己不能做什么。我们每个人都有许多一窍不通、毫无天分的领域,在这些领域我们甚至连平庸的水平都达不到。人们,尤其是知识工作者,就不应该试图去完成这些领域的工作和任务。他们应该尽量少把精力浪费在那些不能胜任的领域上,因为从无能到平庸要比从一流到卓越需要人们付出多得多的努力。 我们的工作方式是怎样的 很少有人知道自己平时是怎样把事情给做成的。 实际上,我们当中的大多数人甚至不知道,不同人有着不同的工作方式和表现。 许多人不是以他们习惯的方式工作,这当然就容易造成无所作为。 对于知识工作者来说,「我的工作方式是怎样的?」可能比「我的长处是什么?」这个问题更加重要。 同一个人的长处一样,一个人的工作方式也是独一无二的,这由人的个性决定。 通常,几个常见的个性特征就决定了一个人的工作方式。 我属于读者型,还是听者型? 首先,你要搞清楚的是,你是读者型(习惯阅读信息)还是听者型(习惯听取信息)的人。绝大多数人甚至都不知道还有读者型和听者型之说,而且很少有人既是读者型又是听者型。知道自己属于哪种类型的人更少。 没有几个听者型的人可以通过努力变成合格的读者型——不管是主动还是被动的努力,反之亦然。不了解你的工作方式不可能发挥才干或取得成就。 我们如何学习 要了解一个人的工作方式,需要弄清的第二点是,他是如何学习的。

安装Golang Dep

go get -v github.com/tools/godep

安装client-go

go get k8s.io/client-go/kubernetes
cd $GOPATH/src/k8s.io/client-go
git checkout v10.0.0
godep restore ./...

集群外开发

集群内开发

Organizations are looking for ways to reduce their physical data center footprints, particularly for secondary workloads such as backups, files, or on-demand workloads. However, bridging data between private data centers and the public cloud comes with a unique set of challenges. Traditional data center services rely on low-latency network attached storage (NAS) and storage area network (SAN) protocols to access storage locally. Cloud-native applications are generally optimized for API access to data in scalable and durable cloud object storage, such as Amazon Simple Storage Service (Amazon S3).

Amazon EC2 networking doesn’t allow to use private ips in the containers

through bridges or macvlan. Dedicating a network interface to a

container makes it directly unreachable from the host.

docker network create -d macvlan --subnet 172.30.80.0/20 --gateway 172.30.80.1 -o parent=eth0 pub_net


docker run -d --network pub_net --ip 172.30.80.10 busybox

Understanding Real-World Concurrency Bugs in Go

https://songlh.github.io/paper/go-study.pdf

高效编程

准备

  • 搭建测试环境

可以参考从源代码构件K8S开发环境

准备 初始化 draft init ... Installing default plugins... Preparing to install into /home/bigo/.draft/plugins/draft-pack-repo draft-pack-repo installed into /home/bigo/.draft/plugins/draft-pack-repo/draft-pack-repo Installed plugin: pack-repo Installation of default plugins complete Installing default pack repositories... Installing pack repo from https://github.com/Azure/draft Installed pack repository github.com/Azure/draft Installation of default pack repositories complete $DRAFT_HOME has been configured at /home/bigo/.draft. ... 设置docker镜像寄存器 draft config set registry registry.cn-beijing.aliyuncs.com/k4s or skip the push process entirely using the –skip-image-push flag

PersistentVolume A PersistentVolume (PV) is a piece of storage in the cluster that has been manually provisioned by an administrator, or dynamically provisioned by Kubernetes using a StorageClass. Many cluster environments have a default StorageClass installed. When a StorageClass is not specified in the PersistentVolumeClaim, the cluster’s default StorageClass is used instead Local volumes can only be used as a statically created PersistentVolume. Dynamic provisioning is not supported yet

如果xml文件带有名字空间,XPATH支持 还不够完善。下面介绍两种可以工作的方式 namespace for XML documents http.get("https://wubigo.com/en/sitemap.xml", function(res) { useNamespaces const select = xpath.useNamespaces({"ns0": "http://www.sitemaps.org/schemas/sitemap/0.9"}); const nodes = select("//ns0:loc", doc); nodes.forEach((value) => console.log("ns0:"+value)); Implementing a Default Namespace Resolver const nsResolver = function nsResolver(prefix) { const ns = { 'ns0' : 'http://www.sitemaps.org/schemas/sitemap/0.9', 'mathml': 'http://www.w3.org/1998/Math/MathML' }; return ns[prefix] || null; }; nsResolver.lookupNamespaceURI = nsResolver; var result = xpath.evaluate( "//ns0:loc", // xpathExpression doc, // contextNode nsResolver, // namespaceResolver xpath.XPathResult.ANY_TYPE, // resultType null // result ) node = result.

在windows上搭建Leveldb的开发环境 Leveldb使用了checkstyle https://github.com/wubigo/leveldb/blob/master/src/checkstyle/checks.xml <module name="RegexpMultiline"> <property name="format" value="\r"/> <property name="message" value="Line contains carriage return"/> </module> 使用git默认设置拣出代码的时候,换行设置编译的时候会报错如下 [ERROR] src\main\java\org\iq80\leveldb\WriteOptions.java:[6] (regexp) RegexpMultiline: Line contains carriage return [ERROR] src\main\java\org\iq80\leveldb\WriteOptions.java:[7] (regexp) RegexpMultiline: Line contains carriage return 解决办法之一是调整git换行设置 git换行设置(line endings) 换行设置的3个选项: Checkout Windows-style, commit Unix-style Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows (“core.

表分区 主键=((分区键) + [簇键]) create table kvstor ( k_part_one text, k_part_two int, k_clust_one text, k_clust_two int, k_clust_three uuid, data text, PRIMARY KEY((k_part_one, k_part_two), k_clust_one, k_clust_two, k_clust_three) ); 分区键 分区键决定数据在集群内的分布在哪个分区 簇键 簇建决定数据的在分区内的排列顺序 Cassandra DB 主要缺点 Cassandra has big issue with Data Read Latency Hard to tune-up for both latency and throughput Highly depended on Work load and type Max 20 % P99 latency drop Most memory consumed by storage engine To store huge amount of data, JVM is required to manage the memory to clean up garbage collection that is not done by the application but by a language in Cassandra Cassandra is not recommended if you have following use cases :

问题

长链接

通过连接池和数据库保持长链接

Amazon Aurora Serverless is an on-demand, auto-scaling configuration for Amazon Aurora (MySQL-compatible and PostgreSQL-compatible editions), where the database will automatically start up, shut down, and scale capacity up or down based on your application’s needs. It enables you to run your database in the cloud without managing any database instances. It’s a simple, cost-effective option for infrequent, intermittent, or unpredictable workloads.

webpack-simple Webpack is a module bundler for Javascript applications, it starts at the entrypoint and then build a dependency graph of the whole application, pulling those dependencies into one or more bundles that can be included in application. It supports multiple different file types through loaders, loaders will take files that have no concept of modules (e.g. css) and process them in a way that allows them to participate

Understanding Dynamic Routing between Capsules

https://jhui.github.io/2017/11/03/Dynamic-Routing-Between-Capsules/

Serverless Architectures

https://www.amazon.com/dp/1617293822/ref=rdr_ext_tmb

ISBN-10: 1617293822

Linux Bridge supported GRE Tunnels, but not the newer and more scalable VXLAN model https://vincent.bernat.ch/en/blog/2017-vxlan-linux

This post will talk

about the various building blocks available to speed up packet processing

both hardware based e.g.SR-IOV, RDT, QAT, VMDq, VTD

and software based e.g. DPDK, Fd.io/VPP, OVS etc and give

hands on lab experience

https://www.telcocloudbridge.com/blog/dpdk-vs-sr-iov-for-nfv-why-a-wrong-decision-can-impact-performance/

EMQX单节点吞吐量 EMQX 5.0 23个节点的集群支持:(100 million MQTT连接 + 1 million message)每秒 每个节点的吞吐量为4万每秒 The dispersed nature of the Internet of Things (IoT) presents a major operational challenge that is uncommon in the traditional Internet or enterprise networks[5]. Devices that are managed together — say a fleet of railcars — are not physically colocated. Instead, they are widely geographically distributed. The operational approaches for management and security used in enterprise networks, where most hosts are densely contained in buildings or campuses, do not translate to the IoT.

VPC之间的连接方式

  • 专线

  • VPN托管服务

  • VPN Peering

  • 自建或第三方VPN

  • PrivateLink

VPC与私有网络之间的连接方式

  • VPN托管服务

  • 专线

  • 专线+VPN

  • 自建或第三方VPN

  • Transit VPC

  • VPN Hub