访问 NULL 指针错误背后的原理 | ShareHub



访问 NULL 指针错误背后的原理 | ShareHub

访问 NULL 指针的过程

C 语言中,NULL 的值是 0,即 NULL == 0 是成立的。我们前面说访问 NULL 指针的行为会产生不可预料的后果。但是在 Linux 系统中后果是确定的:访问空指针会产生 Segmentation fault 的错误。因此这里的"不可预料"指的是在不同系统产生的后果不一样。

让我们假设现在使用的是 C 语言,运行在 Linux 系统上,以此来分析访问 NULL 指针的过程。

  1. Linux 中,每个进程空间的 0x0 虚拟地址开始的线性区(memory region)都会被映射到一个用户态没有访问权限的页上。通过这样的映射,内核可以保证没有别的页会映射到这个区域。
  2. 编译器把空指针当做 0 对待,开心地让你去访问空指针。
  3. 缺页异常处理程序被调用,因为在 0x0 的页没有在物理内存里面。
  4. 缺页异常处理程序发现你没有访问的权限。
  5. 内核发送 SIGSEGV 信号给进程,该信号默认是让进程自杀。

Read full article from 访问 NULL 指针错误背后的原理 | ShareHub


访问 NULL 指针错误背后的原理 | ShareHub



访问 NULL 指针错误背后的原理 | ShareHub

为了研究这个问题,我查了很多资料。空指针的问题涉及 Linux 内存管理的知识,主要参考了 Robert Love 大神对该 问题 的回答和《深入理解Linux内核》。最大的感悟是带着问题去看内核的书,你会理解内核为什么要这么做,同时可以加深理解和记忆。

总之,空指针的实现取决于编译器的实现,访问空指针的后果取决于操作系统的实现。大部分系统类似于 Linux,会产生 Segmentation fault 的错误,至于内部实现就要看各个系统的代码了。


Read full article from 访问 NULL 指针错误背后的原理 | ShareHub


为ZooKeeper增加一个小功能:指定IP进行受限客户端过滤-ni掌柜的IT专栏-51CTO博客



为ZooKeeper增加一个小功能:指定IP进行受限客户端过滤-ni掌柜的IT专栏-51CTO博客

     ZooKeeper功能定位专一,这"导致"了他并不支持一些"非主流"功能。但是有时候,作为ZooKeeper管理员还是很需要某些功能:比如通过指定ip的方式,拒绝某个客户端的连接和操作请求。  目前ZooKeeper官方的说法是,通过配置iptables来实现这个需求。(另外,ZK能够设置单个客户端的最大连接数,但是对于突发情况,这个貌似是没用的,因为需要重启)。对于那些有Server的系统来说,这个功能其实还是蛮需要的,身边同事负责的系统,也有因为某个客户端的使用不当,影响Server性能的。

   我稍微修改了下zk的代码,目前已经支持动态limitedIp配置,至多10s(可配置)能够对指定客户端进行拦截,从而防止单个或若干个客户端对zk server的冲击, 禁止某个或某些ip对zk Server 的连接。已经给内部一个日志分析系统试用了。代码的patch和基于3.3.3-rc0 build出来的 zookeeper-3.3.3.jar_iplimited都可以到这里下载: ZOOKEEPER-1320 


Read full article from 为ZooKeeper增加一个小功能:指定IP进行受限客户端过滤-ni掌柜的IT专栏-51CTO博客


Spring Boot 2.0 新特性和发展方向



Spring Boot 2.0 新特性和发展方向

默认的连接池已经由Tomcat切换到了HikariCP。如果你过去使用spring.datasource.type在基于Tomcat的应用程序中强制使用Hikari,现在你可以删除这个覆盖了。同样的,如果想要使用Tomcat的连接池,只需要简单的加入以下配置就可以了:


Read full article from Spring Boot 2.0 新特性和发展方向


MongoDB is Web Scale



MongoDB is Web Scale

"And in conclusion, we have found MySQL to be an excellent database for our website. Any questions?"

Yes, I have a question. Why didn't you use MongoDB? MongoDB is a web scale database, and doesn't use SQL or JOINs, so it's high performance.

"That's an excellent question. We evaluated several NoSQL databases and concluded that the options are still too immature for our production needs. MySQL is a proven database that is used across the web and has the features we need."

But it doesn't scale. Everybody knows that relational databases don't scale because they use JOINs and write to disk.

"Scalability is a complicated topic and it's hard to make a general statement like that."

Relational databases weren't built for web scale. MongoDB handles web scale. You turn it on and it scales right up.


Read full article from MongoDB is Web Scale


2018年10个技术性前瞻



2018年10个技术性前瞻

区块链是一个共享的, 分布的, 分散的分类账本, 通过独立于个人应用程序或参与者来消除商业摩擦。 它允许不受信任的当事人进行商业交易。 这项技术有改变产业的希望, 尽管对话经常围绕着金融机会, 但区块链在政府、医疗、内容分销、供应链等领域有着广泛的应用前景。 然而, 许多区块链技术是不成熟的和未经证实的, 并且很大程度上是不受管制的。

一个切实可行的区块链方法需要清楚地了解业务机会、区块链的能力和局限性、可信架构和必要的实现技能。 在开始分布式分类账项目之前, 确保您的团队拥有加密技能, 以了解什么是可能的, 什么是不可能的。 确定现有基础设施的集成点, 并监测平台的演变和成熟。 在与供应商交互时要格外小心, 并确保你清楚地认识到"区块链"一词是如何使用的。

趋势9: 事件驱动

数字业务依赖于感知能力, 并随时准备应用到新的商业机会。商业活动反映了明显的状态或状态变化的发现, 例如购买订单的完成。 一些业务活动或事件组合构成了商业机会ーー一旦发现了商业机会, 需要采取一些具体的商业行动。 最重要的商业机会是那些对多个方面有影响的机会, 这些方面包括单独的应用程序、业务线或合作伙伴等。


Read full article from 2018年10个技术性前瞻


低延迟与用户体验杂谈 | 行思錄 | Travel Coder



低延迟与用户体验杂谈 | 行思錄 | Travel Coder

最近在做系统设计梳理的时候,明显感觉到「低延迟」已经成为被提及越来越频繁、考量权重越来越大的因素。 并且,越是靠用户近的系统,对延迟越敏感,对用户体验影响越大,对低延迟要求越高。


Read full article from 低延迟与用户体验杂谈 | 行思錄 | Travel Coder


Detecting WebSocket Connects and Disconnects in Spring 4 - Sergi Almar's Blog



Detecting WebSocket Connects and Disconnects in Spring 4 - Sergi Almar's Blog

Presence detection is an essential feature in real-time applications like games, collaborative apps, chats… In order to do that, we should be able to detect when a client connects and disconnects.


Read full article from Detecting WebSocket Connects and Disconnects in Spring 4 - Sergi Almar's Blog


Improve lost connection detection · Issue #473 · TooTallNate/Java-WebSocket · GitHub



Improve lost connection detection · Issue #473 · TooTallNate/Java-WebSocket · GitHub

In my opinion, it's not enough to detecting the disconnection just sending ping.
For example, one client was shut down suddenly, without sending closeframe or closing the connection, the server could still send message to this disconnected connection without any errors due to the tcp retransmission. Drop all outgoing packages from client side using iptables can simulate this scenario:

iptables -A OUTPUT -p tcp --sport {CLIENT_PORT} -j DROP  

So it's necessary to check whether the corresponding pong was received within a certain amount of time. But this would bring more pressure to server when there are plenty of clients.


Read full article from Improve lost connection detection · Issue #473 · TooTallNate/Java-WebSocket · GitHub


Performance and Scalability patterns | Microsoft Docs



Performance and Scalability patterns | Microsoft Docs

Performance is an indication of the responsiveness of a system to execute any action within a given time interval, while scalability is ability of a system either to handle increases in load without impact on performance or for the available resources to be readily increased. Cloud applications typically encounter variable workloads and peaks in activity. Predicting these, especially in a multi-tenant scenario, is almost impossible. Instead, applications should be able to scale out within limits to meet peaks in demand, and scale in when demand decreases. Scalability concerns not just compute instances, but other elements such as data storage, messaging infrastructure, and more.+


Read full article from Performance and Scalability patterns | Microsoft Docs


分布式技术集锦



分布式技术集锦

推送了这么久的文章,这次文章集锦又来啦。

所有文章均由麦克叔叔所写。

而我,只是文章的搬运工。


关于技术管理的集锦  


此处是分布式技术集锦


Read full article from 分布式技术集锦


kubernetes ConfigMap 和 Secrets-blog.qikqiak.com|阳明的博客|Kubernetes|Cloud Native



kubernetes ConfigMap 和 Secrets-blog.qikqiak.com|阳明的博客|Kubernetes|Cloud Native

DockerKubernetes环境变量的不足之处在于它们是和容器的部署相关的,如果我们想要更改它们的话,就得重新构建容器或者修改 Deployment,更麻烦的是,如果想将变量用于多个容器或 Deployment 的话,就必须将配置复制过去。

幸运的是,Kubernetes中提供了Secrets(用于比较私密的数据)和ConfigMap(用于非私密的数据)两种资源可以很好的解决我们上面的问题。

Secret 和 ConfigMap 之间最大的区别就是 Secret 的数据是用Base64编码混淆过的,不过以后可能还会有其他的差异,对于比较机密的数据(如API密钥)使用 Secret 是一个很好的做法,但是对于一些非私密的数据(比如数据目录)用 ConfigMap 来保存就很好。


Read full article from kubernetes ConfigMap 和 Secrets-blog.qikqiak.com|阳明的博客|Kubernetes|Cloud Native


技术漫谈:为何KPI毁了索尼,而OKR却成就了谷歌?



技术漫谈:为何KPI毁了索尼,而OKR却成就了谷歌?

不要小看了这两个词的力量,正是这两个词决定了 OKR 和 KPI 的本质差异:OKR 关注的是目标,KPI 关注的是指标。当我们关注"目标"的时候,我们会思考接下来我要做的事情是什么;而我们关注"指标"的时候,我们会思考自己的工作如何评价。

  • 以程序员为例,如果我们关注目标,我们会想接下来我应该做什么事情,是要解决产品的卡顿问题,还是可以引入大数据来做精准推荐;而如果关注指标,因为我们的工作是编程,那我们就会想哪些指标可以衡量编程工作呢?我们想到的是代码行数、bug 数、单元测试覆盖率这些;

  • 以足球运动员为例,如果关注目标,我们会想到夺冠、四强、保级;如果关注指标,那我们就会想到进球数、助攻数、跑动距离、比赛场次等;

  • 以滴滴和快的为例,如果关注目标,快的的目标应该是超越滴滴;如果关注指标,快的的指标应该是司机数量、订单数、乘客数等;

为何这两种思考方式差异非常大呢?有一句名言形象的说明了这点:如果方向对了,就不怕路途遥远!而如果方向不对,指标再漂亮都没有意义,甚至指标越漂亮就错的越大。目标就是我们的方向,指标就是评价我们做的事情的质量。使用 OKR 的时候,我们的思维第一反应是"我们的目标是什么";而使用 KPI 的时候,我们的思维第一反应是"我们的职责是什么",如果我们将思维固化在当前的职责,那就不会去审视整个环境当前的状态以及后续可能的变化,也就不会及时的根据实际情况进行调整。


Read full article from 技术漫谈:为何KPI毁了索尼,而OKR却成就了谷歌?


Tracking Metadata Locks (MDL) in MySQL 5.7 – Chris on MySQL



Tracking Metadata Locks (MDL) in MySQL 5.7 – Chris on MySQL

I've blogged about metadata locks (MDL) in the past (1 2 3) and in particular discussed how best to track them down and troubleshoot threads stuck waiting on metadata locks.


Read full article from Tracking Metadata Locks (MDL) in MySQL 5.7 – Chris on MySQL


Save Sets of Multiple Tabs to Launch Later in the Bookmarks Bar



Save Sets of Multiple Tabs to Launch Later in the Bookmarks Bar

Chrome/Firefox: Whether you have a set of commonly used tabs you'd like to launch easily, or you just want to save a research session for later, you can add as many tabs as you'd like to one button with the "Bookmark all tabs" option.


Read full article from Save Sets of Multiple Tabs to Launch Later in the Bookmarks Bar


Save All Open Chrome Tabs for a Future Browsing Session



Save All Open Chrome Tabs for a Future Browsing Session

Chrome is remarkably good at remembering what tabs you had open if the browser were to crash. But what if you were ending a work day and wanted to close business-related tabs so that you could start browsing the web for fun? Luckily, Chrome has an easy way to save your open tabs during a browsing session so you can re-open them later, like the next day, at work.


Read full article from Save All Open Chrome Tabs for a Future Browsing Session


1月份GitHub上最热门的Java项目 - Java编程 | 十条



1月份GitHub上最热门的Java项目 - Java编程 | 十条

Design patterns 是程序员在设计应用程序或系统时可用来解决常见问题的最佳实践手册。它可以帮助你加快开发进程,有效防止一些可能导致重大失误的细节问题,不过深入了解 java-design-patterns 之前,你应提前熟悉各种编程/软件设计原则。


Read full article from 1月份GitHub上最热门的Java项目 - Java编程 | 十条


RethinkDB is shutting down - RethinkDB



RethinkDB is shutting down - RethinkDB

Today I have sad news to share. After more than seven years of development, the company behind RethinkDB is shutting down. We worked very hard to make RethinkDB successful, but in spite of all our efforts we were ultimately unable to build a sustainable business. There is a lot of information to unpack – over the next few months, I'll write about lessons learned so the startup community can benefit from our mistakes.


Read full article from RethinkDB is shutting down - RethinkDB


开源巨献:2017 年 Google 开源了这些超赞的项目 - Linux爱好者 | 十条



开源巨献:2017 年 Google 开源了这些超赞的项目 - Linux爱好者 | 十条

Istio 是一个由谷歌、IBM 与 Lyft 共同开发的开源项目,旨在提供一种统一化的微服务连接、安全保障、管理与监控方式。Istio 项目能够为微服务架构提供流量管理机制,同时亦为其它增值功能(包括安全性、监控、路由、连接管理与策略等)创造了基础。这款软件利用久经考验的 Lyft Envoy 代理进行构建,可在无需对应用程序代码作出任何发动的前提下实现可视性与控制能力。Istio 项目是一款强大的工具,可帮助 CTO/CIO 们立足企业内部实施整体性安全、政策与合规性要求。


Read full article from 开源巨献:2017 年 Google 开源了这些超赞的项目 - Linux爱好者 | 十条


2018年,Java程序员应该学习的 9 个建议 - 21CTO | 十条



2018年,Java程序员应该学习的 9 个建议 - 21CTO | 十条

2018年另一个有意思的发布便是 Spring Security 5.0。Spring Security 5.0是一个主版本。他们重写了几个模块并修复了几百个错误。最有趣的部分是OAuth 2.0模块。 不幸的是,目前学习 Spring Securtiy 5.0的资源并不多,但幸运的是Eugen已将Learn Spring Security更新到5.0版本,并在OAuth 2.0增加了一个新模块。


Read full article from 2018年,Java程序员应该学习的 9 个建议 - 21CTO | 十条


Julia Evans - Julia Evans



Julia Evans - Julia Evans

Hey! I'm Julia. Welcome to my blog. Here's every post I've ever written. If you want somewhere to start, try my favorites (the ones with stars next to them, below). Enjoy!

Read full article from Julia Evans - Julia Evans


The Hiring Post — Quarrelsome



The Hiring Post — Quarrelsome

If you're like most teams, the first experience a candidate has with your selection process is an adversarial tech-out phone screen (or, if they're lucky, the HR call that schedules that phone screen).

This sucks: it demands that a candidate start running the gauntlet without knowing what to expect. Not knowing what to expect makes candidates nervous. That's a pointless handicap.


Read full article from The Hiring Post — Quarrelsome


How To Safely Generate A Random Number — Quarrelsome



How To Safely Generate A Random Number — Quarrelsome

Why not {SecureRandom, OpenSSL, havaged, &c}?

These are userspace CSPRNGs. You want to use the kernel's CSPRNG, because:

  • The kernel has access to raw device entropy.

  • It can promise not to share the same state between applications.

  • A good kernel CSPRNG, like FreeBSD's, can also promise not to feed you random data before it's seeded.


Read full article from How To Safely Generate A Random Number — Quarrelsome


Read Resumes Backwards – jocelyngoldfein



Read Resumes Backwards – jocelyngoldfein

What happens next? School and first job are largely a function of opportunity. Within a few years, if someone has the potential I'm looking for, I'd expect to start seeing separation from his peers. Does he tackle larger and more central portions of the projects he's doing? Rise to tech lead or project lead in a small company? Does she make the jump to better known companies, or change projects to work with the most modern technology? If he started in QA, has he crossed over to software engineering? If she started in a satellite office, did she move to HQ?


Read full article from Read Resumes Backwards – jocelyngoldfein


7 proven ways to get more done in less time | kate{mats}



7 proven ways to get more done in less time | kate{mats}

I feel like I have never been busier. And the hard part is juggling everything. Over the last year I have learned to develop strategies that help me get more done in a limited amount of time. Since I know this is something other people struggle with, too, I have listed some of my strategies below to give you some ideas on how to make more out of your busy days.


Read full article from 7 proven ways to get more done in less time | kate{mats}


The Future of Ops – Brave New Geek



The Future of Ops – Brave New Geek

Traditional Operations isn't going away, it's just retooling. The move from on-premise to cloud means Ops, in the classical sense, is largely being outsourced to cloud providers. This is the buzzword-compliant NoOps movement, of which many call the "successor" to DevOps, though that word has become pretty diluted these days. What this leaves is a thin but crucial slice between Amazon and the products built by development teams, encompassing infrastructure automation, deployment automation, configuration management, log management, and monitoring and instrumentation.


Read full article from The Future of Ops – Brave New Geek


How to create a Minimal, Complete, and Verifiable example - Help Center - Stack Overflow



How to create a Minimal, Complete, and Verifiable example - Help Center - Stack Overflow

How to create a Minimal, Complete, and Verifiable example

When asking a question about a problem caused by your code, you will get much better answers if you provide code people can use to reproduce the problem. That code should be…

  • …Minimal – Use as little code as possible that still produces the same problem
  • …Complete – Provide all parts needed to reproduce the problem
  • …Verifiable – Test the code you're about to provide to make sure it reproduces the problem

Minimal

The more code there is to go through, the less likely people can find your problem. Streamline your example in one of two ways:

  1. Restart from scratch. Create a new program, adding in only what is needed to see the problem. This can be faster for vast systems where you think you already know the source of the problem. Also useful if you can't post the original code publicly for legal or ethical reasons.
  2. Divide and conquer. When you have a small amount of code, but the source of the problem is entirely unclear, start removing code a bit at a time until the problem disappears – then add the last part back.

Minimal and readable

Minimal does not mean terse – don't sacrifice communication to brevity. Use consistent naming and indentation, and include comments if needed to explain portions of the code. Most code editors have a shortcut for formatting code – find it, and use it! Also, don't use tabs – they may look good in your editor, but they'll just make a mess on Stack Overflow.

Complete

Make sure all information necessary to reproduce the problem is included:

  • Some people might be prepared to load the parts up, and actually try them to test the answer they're about to post.
  • The problem might not be in the part you suspect it is, but another part entirely.

If the problem requires some server-side code as well as an XML-based configuration file, include them both. If a web page problem requires HTML, some JavaScript and a stylesheet, include all three.


Read full article from How to create a Minimal, Complete, and Verifiable example - Help Center - Stack Overflow


The End of End-to-End? - MIT Technology Review



The End of End-to-End? - MIT Technology Review

One of the fundamental design principles of today's Internet is so basic and so important that few users have ever heard its name; they just assume its existence. It's called "end-to-end," and some disturbing new developments are putting it in jeopardy. The end-to-end principle asserts that information pushed into one end of the Internet should come out the other without modification: the Net should act like a big, fat, dumb, digital pipe.


Read full article from The End of End-to-End? - MIT Technology Review


File crash consistency and filesystems are hard



File crash consistency and filesystems are hard

I haven't used a desktop email client in years. None of them could handle the volume of email I get without at least occasionally corrupting my mailbox. Pine, Eudora, and outlook have all corrupted my inbox, forcing me to restore from backup. How is it that desktop mail clients are less reliable than gmail, even though my gmail account not only handles more email than I ever had on desktop clients, but also allows simultaneous access from multiple locations across the globe? Distributed systems have an unfair advantage, in that they can be robust against total disk failure in a way that desktop clients can't, but none of the file corruption issues I've had have been from total disk failure. Why has my experience with desktop applications been so bad?

Well, what sort of failures can occur? Crash consistency (maintaining consistent state even if there's a crash) is probably the easiest property to consider, since we can assume that everything, from the filesystem to the disk, works correctly; let's consider that first.

Crash Consistency

Pillai et al. had a paper and presentation at OSDI '14 on exactly how hard it is to save data without corruption or data loss.

Let's look at a simple example of what it takes to save data in a way that's robust against a crash. Say we have a file that contains the text a foo and we want to update the file to contain a bar. The pwrite function looks like it's designed for this exact thing. It takes a file descriptor, what we want to write, a length, and an offset. So we might try

pwrite([file], "bar", 3, 2)  // write 3 bytes at offset 2  

What happens? If nothing goes wrong, the file will contain a bar, but if there's a crash during the write, we could get a boo, a far, or any other combination. Note that you may want to consider this an example over sectors or blocks and not chars/bytes.

If we want atomicity (so we either end up with a foo or a bar but nothing in between) one standard technique is to make a copy of the data we're about to change in an undo log file, modify the "real" file, and then delete the log file. If a crash happens, we can recover from the log. We might write something like


Read full article from File crash consistency and filesystems are hard


项目报错:This is supposed to be overridden by subclasses.-李阳博客



项目报错:This is supposed to be overridden by subclasses.-李阳博客

第一次看到这个错误,有点懵逼,果断去stackoverflow搜了一下,原来就是protobuf-java的版本问题,如果想要保留最新版,那么需要使用protobuf重新生成java类,由于这个项目是比较古老的项目了,所以我就此放弃。


Read full article from 项目报错:This is supposed to be overridden by subclasses.-李阳博客


Microservices



Microservices

When building communication structures between different processes, we've seen many products and approaches that stress putting significant smarts into the communication mechanism itself. A good example of this is the Enterprise Service Bus (ESB), where ESB products often include sophisticated facilities for message routing, choreography, transformation, and applying business rules.


Read full article from Microservices


SS + SwitchyOmega实现代理自动切换 | Eliyar's Blog



SS + SwitchyOmega实现代理自动切换 | Eliyar's Blog

按照配置ShadowSocks服务器配置的Shadowsocks服务器一起在默默的工作,特别是最近用了Google Cloud Servers后在单位翻墙速度超级快。访问境外境内网站基本一个速度。

此前我一直在用Shadowsocks + GoAgentX + SwitchyOmega 的方式翻墙,虽然快速切换代理很方便。但是如果我在观看YouTube视频的同时要访问国内网站的话要么得忍受龟速,要么得切换成直接连接从而导致Youtube视频中断。


Read full article from SS + SwitchyOmega实现代理自动切换 | Eliyar's Blog


程序员以上帝视角解读“旅行青蛙”,你的呱真的在旅行嘛? - 程序猿 | 十条



程序员以上帝视角解读"旅行青蛙",你的呱真的在旅行嘛? - 程序猿 | 十条

不得不佩服游戏的设计者,为了追求真实,实现了一套非常完整的旅行模拟系统,有严谨的旅游路线设计。


因为旅行的过程并不展示给用户,我原本以为逻辑会十分简单。发现这套旅行模拟系统的时候,我也有些惊讶,也促使我深入研究这款游戏的逻辑。


Read full article from 程序员以上帝视角解读"旅行青蛙",你的呱真的在旅行嘛? - 程序猿 | 十条


Metadata: My Distributed Systems Seminar's reading list for Spring 2016



Metadata: My Distributed Systems Seminar's reading list for Spring 2016

Below is the list of papers I plan to discuss in my distributed systems seminar in Spring'16 semester. These are all very exciting papers, and I am looking forward to the Spring semester.

If you have some suggestions on other good/recent papers to cover, please let me know in the comments.

Read full article from Metadata: My Distributed Systems Seminar's reading list for Spring 2016


Introduction to BouncyCastle with Java | Baeldung



Introduction to BouncyCastle with Java | Baeldung

BouncyCastle is a Java library that complements the default Java Cryptographic Extension (JCE).

In this introductory article, we're going to show how to use BouncyCastle to perform cryptographic operations, such as encryption and signature.


Read full article from Introduction to BouncyCastle with Java | Baeldung


Elasticsearch as a column store | Elastic



Elasticsearch as a column store | Elastic

If you have no idea what questions you will want to ask your data when you start ingesting it, columnar storage is probably a good option for you: it helps in two areas that are often close to the heart of users who deal with large amounts of data:


Read full article from Elasticsearch as a column store | Elastic


Under Snowden's Light Software Architecture Choices Become Murky - High Scalability -



Under Snowden's Light Software Architecture Choices Become Murky - High Scalability -

How does Cloud Native transfer to the enterprise? Let's say you have 20 enterprise customers. What kind of common cloud architecture can you expect?  If we had a winner in the not-Amazon private cloud race that had a very rich set of services that was widely adopted in the enterprise then that would be an option, but that's not the case, yet. So what you may want to do is scale up. Get a huge machine with a few terabytes of memory and run on that. It's simpler to install and manage in an unknown environment.


Read full article from Under Snowden's Light Software Architecture Choices Become Murky - High Scalability -


To anyone considering laser eye surgery – David Byttow – Medium



To anyone considering laser eye surgery – David Byttow – Medium

This morning, I had my checkup about 1.5 months after the procedure. According to the doctor, they expected my eyesight to settle around 20/25, but it actually is around 20/15. My eyes are completely healed and show absolutely zero signs of the fact that I had the surgery. I couldn't be more happy and relieved.


Read full article from To anyone considering laser eye surgery – David Byttow – Medium


Boost message passing between Erlang nodes



Boost message passing between Erlang nodes

Message passing between Erlang nodes is considerably slower than within the same node. This is normal, and is due to the fact that messages sent between nodes are actually copied from the area of the sender to that of the receiver, then sent over from one node to the other via TCP/IP.


Read full article from Boost message passing between Erlang nodes


技术广度和技术深度一样重要 - CSDN博客



技术广度和技术深度一样重要 - CSDN博客

每个人都有自己的局限性,每天接触的技术和工作都是固定的,工作常用的技能随着时间就熟练了。


Read full article from 技术广度和技术深度一样重要 - CSDN博客


I’m not smart, I just sat there for longer than you



I'm not smart, I just sat there for longer than you

If anyone's struggling with coding, or just learning something difficult, this post might give you some sort of weird hope.

I can code in a few languages and I have studied computer science, so why when people tell me I'm an awesome developer, do I have the feeling they're wrong? I usually will respond with something like:


Read full article from I'm not smart, I just sat there for longer than you


5 alternatives to NodeJS for Java / Webagility



5 alternatives to NodeJS for Java / Webagility

Eclipse Vert.x is a toolkit for building reactive web applications on the Java platform. It's very pluggable and speaks multiple languages - aka polyglot. That means you may freely choose your language, and JavaScript might be one of your choices. In Vert.x you have full control over the server runtime. If you are developing a web application, you actually need to create the http server in your code. 


Read full article from 5 alternatives to NodeJS for Java / Webagility


High Scalability - Treehouse Blog



High Scalability - Treehouse Blog

Scaling a site or app is a tricky topic to tackle. There's no shortage of technologies out there to increase performance, spread load, distribute databases and so forth; the difficulty is choosing from the sheer volume of options and permutations.

It's widely understood that languages don't scale, but how should you choose your stack, caching techniques, hardware (or whether to go virtual or cloud), monitoring tools and backup solutions? How should the database be structured and in what way will code upgrades / bug fixes / features be rolled out?


Read full article from High Scalability - Treehouse Blog


Putting your design system into practice - DesignBetter.Co



Putting your design system into practice - DesignBetter.Co

  1. Potential for common components. Does this pilot have many components that can be reused in other products?
  2. Potential for common patterns. Does this pilot have many patterns that can be reused in other products?
  3. High-value elements. Even if uncommon, is there a component or pattern with high business value at the heart of this project? We're talking about elements that are integral to a flow or audience with unusually high value for the organization.
  4. Technical feasibility. How simple is a technical implementation of the design system? Is a large refactor required?
  5. Available champion. Will someone working on this product see it through and celebrate/evangelize using the design system (and even contribute to it)?
  6. Scope. Is this work accomplishable in our pilot timeframe of [3–4 weeks] (insert your timing here)?
  7. Technical independence. Is the work decoupled enough from other legacy design and code that there are clear start and end points?
  8. Marketing potential. Will this work excite others to use the design system?

There was one downside to building the new design system alongside a product—it ended up being biased to the needs of that product. Afterward, it needed further development to work for the whole Etsy application. Working in a silo with minimal outside feedback allowed us to make progress quickly, but meant that we had to work harder to encourage other teams to adopt the design system.


Read full article from Putting your design system into practice - DesignBetter.Co


How Your Kids Can Use Google Home   



How Your Kids Can Use Google Home   

Saying, "Hey Google, tell me a human story," or "Hey Google, tell me a summer story" will play an interview with a real person from a StoryCorps collection. A great way to introduce kids to those with experiences different from their own.


Read full article from How Your Kids Can Use Google Home   


适当地引入防卫性编程 | Harttle Land



适当地引入防卫性编程 | Harttle Land

这样上文中提到的隐式接口的各种问题都可以得到不同程度的解决:

  • 调试困难。现在可以抛出具有足够信息的错误,便于调试。上述例子中 assert 的第二个参数可以极尽详细地描述错误。
  • 容错困难。实现应满足一切合法输入,不再需要在实现的过程中进行容错,减少容错也让正确性更加明显。
  • 重构困难。防卫性的接口描述可以做到足够清晰,接口描述不再影响重构。上述例子中,只需要继续支持 POST, PUT 即可保持接口的向后兼容。


Read full article from 适当地引入防卫性编程 | Harttle Land


做一个有批判性思维的程序员 - Bridge for You



做一个有批判性思维的程序员 - Bridge for You

好的游戏一定要让玩家玩的很爽吗?王者荣耀和吃鸡游戏的成功,让这个问题的答案似乎毫无争议,不能带给玩家刺激的游戏就不是好游戏。
什么样的游戏才能吸引玩家不断的玩下去?答案就一个字,爽,用罗胖的话说就是,从前打一局CS,让你十几分钟爽一次,现在,来一盘农药,让你几分钟就爽一次。然后,吃鸡,一款让你爽的更频繁的游戏又出来了,紧接着,各个大厂的吃鸡游戏陆续上线,大家都在力争带给玩家更多的刺激,因为他们都相信,只有让玩家爽下去,他们才不会把游戏卸载掉。
就在游戏制造商们为生产出更加痛快的游戏杀红了眼的时候,一只青蛙,一边旅行着,一边给家里寄照片,默默的嘲笑道,"他们真俗"。

Read full article from 做一个有批判性思维的程序员 - Bridge for You


私密信息传递工具PandoraBox | Toryzen's Blog



私密信息传递工具PandoraBox | Toryzen's Blog

PandoraBox 由Server与Client两部分组成,Server使用Java SpringBoot编写,数据存储为Mysql,欢迎页面使用iview编写;Client使用C#编写,数据存储为sqlite,Client使用inno setup打包为安装包。且为了方便快速的信息发送,Server的数据结构内需要维护一套用户验证体系与用户组织结构,目前PandoraBox仅可发送文本信息。


Read full article from 私密信息传递工具PandoraBox | Toryzen's Blog


不懂算法的我,到底怎么让APP快点AI起来?



不懂算法的我,到底怎么让APP快点AI起来?

HiAI引擎的目标,通过开放应用层API,使能开发者在不懂AI算法的情况下也能开发高质量AI应用,完全聚焦在应用的体验和业务实践上。这就需要平台将多种能力全面开放给开发者,在不同层级打开AI开放基础环境,让不同需求、不同基础的开发者都可以有效选择适合的方式,即使彻底不懂算法的开发者,也可以短时间将自己的APP进行针对性AI化。


Read full article from 不懂算法的我,到底怎么让APP快点AI起来?


为什么我们要尝试Kotlin – ThoughtWorks洞见



为什么我们要尝试Kotlin – ThoughtWorks洞见

技术雷达:对Android的完美支持为迅速发展的Kotlin语言提供了额外的推动力,我们也正在密切关注Kotlin / Native(基于LLVM,可以将Kotlin代码编译为原生可执行文件)的进展。在使用Anko库开发Android应用时,我们已经尝到了空指针安全、数据类和易于构建DSL的甜头。尽管初始编译速度慢,且只有IntelliJ才提供一流的IDE支持,但我们仍然建议尝试一下这种新颖简洁的现代语言。


Read full article from 为什么我们要尝试Kotlin – ThoughtWorks洞见


2017下半年学习计划



2017下半年学习计划

java & jvm

  • 学习两个java项目源码:spring、netty
  • 看jdk源码:
    • concurrency包
    • nio
  • 再了解清楚jvm工作机制
  • 知道一些JVM内存可视化工具的使用方法
  • 能解决出现在jvm层面的问题

操作系统 & 网络

  • http://www.icourses.cn/coursestatic/course_6801.html 看完这个课程
  • 重新整理tcp/ip协议的知识
  • 能处理出现在操作系统、网络层面的问题

中间件知识

  • 学习公司的服务框架 - pylon
  • 学习公司的数据库中间件 - dal
  • 对比市场上流行的开源中间件

分布式架构知识

  • 学习公司架构技术,到源码级别
  • 还不知道要学什么…但有几本书可以看

DDD

  • 看完两本书,可以自己写个demo

软件工程

  • 看完《软件工程》这本书
  • 知道建模、开发、测试的流程,知道怎么能构建一个可靠的工程。

写两个开源项目

  • 学习ddd期间可以写个微信小程序
  • 写个数据库中间件的demo


Read full article from 2017下半年学习计划


大规模业务服务器开发总结 | liubo



大规模业务服务器开发总结 | liubo

有层级的服务比普通SOA好

SOA要求我们把各业务逻辑服务化,没有层级的服务化就是噩梦。主要服务之间一定要有金字塔一样的规则,否则会对各种跨机房、迁移等带来麻烦

kv存储比RDS好

只用kv,存储层维持状态,扩展、迁移都大大降低难度。使用rds,qps变化时延迟并不是线性变化,kv就能保证这点。维护状态的一层大多在db,
以kv这样容易扩展的方式,更加利于未来的迁移和扩张。

无状态比有状态好

服务带上状态,以后迁移、扩容各种毛病,只要有一个理由可以不要状态,就一定要无状态。

闭源比开源好

开源项目都是解决共性需求,规模越大,越是有特性,越不可能开源,闭源可以省很多事

组成系统的必要服务
把设计的成果讲给别人听
设计的改变不可避免
上游服务的health check,本身服务的high availability

在普通架构师们眼里,微服务、异步消息队列、重用甚至开源是很酷的事情,但在一线架构师眼里……有趣的反常识
不超过1年的时间里,无论当初采用何种技术框架,应用何种架构,缓慢地混乱的过程似乎是不可抗拒的宿命


Read full article from 大规模业务服务器开发总结 | liubo


程序员不可不知的Linux性能工具 - 简书



程序员不可不知的Linux性能工具 - 简书

在实际开发中,有时候会收到一些服务的监控报警,比如CPU飙高,内存飙高等,这个时候,我们会登录到服务器上进行排查。本篇博客将涵盖这方面的知识:Linux性能工具。


Read full article from 程序员不可不知的Linux性能工具 - 简书


Developer interviews at startups – 叶剑烨的个人注释



Developer interviews at startups – 叶剑烨的个人注释

I've been worked for Slide (A startup acquired by Google last year) for 2 years, and probably have interviewed more than 50 people, most of them are developer candidates. I'd like to share my 2 cents on this topic today.


Read full article from Developer interviews at startups – 叶剑烨的个人注释


Keyboard for hackers – 叶剑烨的个人注释



Keyboard for hackers – 叶剑烨的个人注释

5年前,在我刚工作不久之后,我买过花了500块买了IBM UltraNav Travel Keyboard,因为很喜欢当时IBM Thinkpad键盘的手感,所以买了这个与Thinkpad键盘手感完全相同的外置键盘,用于自己的台机。直到09年买了Macbook,那时的Macbook还是白色塑料外外壳的,俗称小白。小白的键盘手感非常好,并不逊色于Thinkpad。虽然小白的使用时间不到半年,在之后的日子一直用Macbook Pro但至今我仍这得小白键盘的手感要比MBP好些,mbp的键盘有点太软了。


Read full article from Keyboard for hackers – 叶剑烨的个人注释


organized



organized

Organized is designed to allow you to keep notes, a schedule, and todo list inside of Atom.


Read full article from organized


再见Evernote, 你好Orgmode – 叶剑烨的个人注释



再见Evernote, 你好Orgmode – 叶剑烨的个人注释

打个比方,就像写一本书,你会先收集原始素材,然后开始由总纲开始,定义章节,小节,段落,再逐步细化。首先,Evernote的单个笔记中不存在层级关系,也无法折叠或是展开笔记中的某一个段落。其次,虽然Evernote支持笔记之间的引用,但不支持引用其他笔记中某个特定位置。若是把Evernote的笔记链接比做URL,那么它就是一个不支持带#的URL。因为这两个缺点,当Evernote里的笔记多了以后,笔记间的关系非常松散,很难对笔记的内容做二次提炼。


Read full article from 再见Evernote, 你好Orgmode – 叶剑烨的个人注释


如何在桌面浏览器看微信公众平台的文章? - 知乎



如何在桌面浏览器看微信公众平台的文章? - 知乎

开发和维护的一个微信导航网站,之所以将它放在首位是因为这个网站可以真正完整地展现一些有价值的微信公众号的全部历史文章。

优点:

1.相对来说,这个网站关于微信账号的收录应该较为严格,所收集的公众账号质量也比较高,总体而言具有小而精的特点。

2.所收录的账号有分类比较合理,可以发现很多优秀账号。且有各个分类的最近10天左右的阅读榜、点赞榜(数据较为详细)。

3.网站右边显示推荐账号与热门账号。如果发现有的优质账号没有收录,可以提交。

4.文章排版比较好(字体看起来比微信稍微大点),微信图片也可以看到,单篇微信也可以分享到社交空间,还可以查看某账号热门微信文章。单篇微信文章也有阅读和点赞的数据。


Read full article from 如何在桌面浏览器看微信公众平台的文章? - 知乎


New parents should read Freakonomics, than watching it.



New parents should read Freakonomics, than watching it.

What did his analysis say? A Child tend to do well in school, when the child have

  • Well educated parents
  • Lots of books at home
  • Parents with High socio-economic status
  • Mother, who is 30+ years during the birth
  • Parents speak English
  • Parents involved in PTA

and these facts or behavior which may not guarantee that child will do good at school (note he doesn't say BAD, just says may not help to large extend or sometimes may cause damage)

  • Family is intact
  • Parents moved to a better neighborhood
  • Mother didn't work between birth and kindergarten
  • Child attended Head stat
  • Parents take Child regularly to a museum
  • Parent read to child nearly every day


Read full article from New parents should read Freakonomics, than watching it.


提高开发效率的 Eclipse 实用操作(2) - 文章 - 伯乐在线



提高开发效率的 Eclipse 实用操作(2) - 文章 - 伯乐在线

直接在Eclipse中连接linux

使用如下快捷键可以弹出一个窗口,用于配置终端去连接Linux:


Read full article from 提高开发效率的 Eclipse 实用操作(2) - 文章 - 伯乐在线


谷歌的零信任安全架构实践 - 安全内参 | 网络安全首席知识官



谷歌的零信任安全架构实践 - 安全内参 | 网络安全首席知识官

部分企业的IT部门已经实现了零信任的很多方面。他们通常已经部署了多因子身份验证、IAM和权限管理。其环境中也越来越多地实现了微分隔。

但建立零信任环境不仅仅是实现这些单个技术,而是应用这些技术来施行"无法证明可被信任即无法获得权限"的理念。企业得从战略上确定哪些技术有助实现这一理念,然后再去买入这些技术。

在技术的应用上最忌讳病急乱投医,与其期待乱买来的药能治好病,不如先好好诊断诊断,弄清楚自身情况再采用相应的技术。转向零信任模型不是一朝一夕之功,也不是件容易的事儿,尤其是在有不适应该新模型的遗留系统的时候。


Read full article from 谷歌的零信任安全架构实践 - 安全内参 | 网络安全首席知识官


naming - The suffix Exception on exceptions in java - Software Engineering Stack Exchange



naming - The suffix Exception on exceptions in java - Software Engineering Stack Exchange

Specifying a suffix of Exception on exception classes feels like a code smell to me (Redundant information - the rest of the name implies an error state and it inherits from Exception). However, it also seems that everyone does it and it seems to be good practice.


Read full article from naming - The suffix Exception on exceptions in java - Software Engineering Stack Exchange


USER GUIDE · alibaba/jvm-sandbox Wiki · GitHub



USER GUIDE · alibaba/jvm-sandbox Wiki · GitHub

沙箱有两种启动方式:ATTACH和AGENT

  • ATTACH方式启动
    即插即用的启动模式,可以在不重启目标JVM的情况下完成沙箱的植入。原理和GREYS、BTrace类似,利用了JVM的Attach机制实现。

    # 假设目标JVM进程号为'2343' ./sandbox.sh -p 2343


Read full article from USER GUIDE · alibaba/jvm-sandbox Wiki · GitHub


谁动了我的 class?



谁动了我的 class?

虽说 JVM 之上可能跑这些小青年,但原则还是有的。毕竟 JVM 的第一个字母可是 J。


这里说的原则,或者说新青年们能跑在 JVM 这个舞台上的,是因为他们在使用各自语言语法编写之后,生成的内容都是 class 文件。 没错,就是那个和 Java

的 class 一样的 class。每个语言使用自己的编译器,按照规范生成 class 文件。


你是XX 请来对比这些语言的么?


当然不是。


我们主要看看这些操作 class 的阶段与方式,是谁在什么时候动了你的「class」。


还记得初学 Java 时,满怀信心的在命令行敲下 javac HelloWorld.java 的情形么? 运行程序时看着输出的「Hello World」,感觉这门语言已经上传完成,

全部进入你的大脑,可以改变世界了。


Read full article from 谁动了我的 class?


如何写出更好的Java代码 - 尚学堂java培训 | 十条



如何写出更好的Java代码 - 尚学堂java培训 | 十条

我们这些码农干的最简单的事情就是传递数据了。传统的方式就是定义一个JavaBean:


Read full article from 如何写出更好的Java代码 - 尚学堂java培训 | 十条


Lower Risk in Your Portfolio with These ETFs - Nasdaq.com



Lower Risk in Your Portfolio with These ETFs - Nasdaq.com

This fund offers exposure to the stocks with lower volatility than the broader market by tracking the Fidelity U.S. Low Volatility Factor Index. Holding 128 stocks in its basket, it is well spread across components with none holding more than 3.04% share. From a sector look, the ETF is skewed toward the information technology sector at 21.5% while financials, healthcare, consumer discretionary and industrials round off the next four spots with a double-digit allocation each. Since its debut in September, the fund has been able to garner just $20.2 million in AUM so far and average daily volume is also low at 11,000 shares. FDLO charges 29 bps in annual fees from investors.

Read full article from Lower Risk in Your Portfolio with These ETFs - Nasdaq.com


gson-extras is not available as a Maven artifact · Issue #1104 · google/gson · GitHub



gson-extras is not available as a Maven artifact · Issue #1104 · google/gson · GitHub

gson-extras is not distributed as part of the main artifact, and there is no independent artifact for it.
This leads to either including the source code, or relying on 3rd party artifacts (outdated).


Read full article from gson-extras is not available as a Maven artifact · Issue #1104 · google/gson · GitHub


Labels

Algorithm (219) Lucene (130) LeetCode (97) Database (36) Data Structure (33) text mining (28) Solr (27) java (27) Mathematical Algorithm (26) Difficult Algorithm (25) Logic Thinking (23) Puzzles (23) Bit Algorithms (22) Math (21) List (20) Dynamic Programming (19) Linux (19) Tree (18) Machine Learning (15) EPI (11) Queue (11) Smart Algorithm (11) Operating System (9) Java Basic (8) Recursive Algorithm (8) Stack (8) Eclipse (7) Scala (7) Tika (7) J2EE (6) Monitoring (6) Trie (6) Concurrency (5) Geometry Algorithm (5) Greedy Algorithm (5) Mahout (5) MySQL (5) xpost (5) C (4) Interview (4) Vi (4) regular expression (4) to-do (4) C++ (3) Chrome (3) Divide and Conquer (3) Graph Algorithm (3) Permutation (3) Powershell (3) Random (3) Segment Tree (3) UIMA (3) Union-Find (3) Video (3) Virtualization (3) Windows (3) XML (3) Advanced Data Structure (2) Android (2) Bash (2) Classic Algorithm (2) Debugging (2) Design Pattern (2) Google (2) Hadoop (2) Java Collections (2) Markov Chains (2) Probabilities (2) Shell (2) Site (2) Web Development (2) Workplace (2) angularjs (2) .Net (1) Amazon Interview (1) Android Studio (1) Array (1) Boilerpipe (1) Book Notes (1) ChromeOS (1) Chromebook (1) Codility (1) Desgin (1) Design (1) Divide and Conqure (1) GAE (1) Google Interview (1) Great Stuff (1) Hash (1) High Tech Companies (1) Improving (1) LifeTips (1) Maven (1) Network (1) Performance (1) Programming (1) Resources (1) Sampling (1) Sed (1) Smart Thinking (1) Sort (1) Spark (1) Stanford NLP (1) System Design (1) Trove (1) VIP (1) tools (1)

Popular Posts