//www.dawgtracker.com/feed.atom. 马丁福勒 www.dawgtracker.com的新闻和更新的主馈送 马丁福勒 fowler@acm.org //www.dawgtracker.com 2021 - 06 - 23 - t11:17:00内 Lamport时钟 2021 - 06 - 23 - t11:17:00内 标签:Martinfowler.com,2021-06-23:Lamport-Clock

从unmesh的下一个分布式系统模式是。分布式系统不能假设服务器之间的时间一致,有时时间会向后倒置。然而,有一些方法可以订购事件。

更多... 混合动力时钟 2021 - 06 - 23 - t11:17:00内 标签:www.dawgtracker.com, 2021-06-23: Hybrid-Clock < div class = ' img ' > < a href = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/hybrid-clock.html " > < img src = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/card.png "宽度= " > < / img > < / > < / div > < p > Lamport时钟时常常需要订单事件在一个分布式系统,客户通常也需要知道实际的时间。Hybrid Clock, Unmesh的下一个模式,结合了这两个需求。

more…

版本化的价值 2021-06-22T09:23:00-04:00 标签:www.dawgtracker.com, 2021-06-22: Versioned-Value < div class = ' img ' > < a href = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/versioned-value.html " > < img src = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/card.png "宽度= " > < / img > < / > < / div > < p >当分布式系统可变数据,节点需要知道哪个是最近的值,因此,a 版本值存储每个值的版本号。

more…

八卦传播 2021-06-17T10:18:00-04:00 标签:www.dawgtracker.com, 2021-06-17: Gossip-Dissemination < div class = ' img ' > < a href = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/gossip-dissemination.html " > < img src = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/card.png "宽度= " > < / img > < / > < / div > < p > Unmesh Joshi完成另一批系列的分布式系统模式。首先是八卦传播

more…

?

more 论经历的多样化和奇妙形状 2021 - 06 - 02 - t11:58:00内 标签:Martinfowler.com,2021-06-02:在 - 多样化 - 和幻想的形状 - 测试

有关测试组合是否应该是金字塔或更像蜂窝的论据。我对此论点的第二个最大问题是,它呈现了不透明的事实,即不清楚人们认为单位和集成测试之间的区别是什么。

注意平台执行间隙 2021-04-27T09:51:00-04:00 标签:Martinfowler.com,2021-04-27:思维 - 平台执行差距

2021-04-07T10:00:00-04:00 标签:www.dawgtracker.com, 2021-04-07: Bitemporal-History
2021 - 01 - 28 - t10:38:00凌晨 //www.dawgtracker.com/bliki/refinementcodereview.html.

人们想到代码审查时,他们通常会在开发团队工作流程中的明确步骤中思考。如今, Pre-Integration Review ,在 pull请求上是代码审查的最常见机制,到许多人无效地考虑不使用拉出请求的程度删除所有代码审查的机会。如此狭窄的代码审查观点不仅忽略了一些明确的审查机制,更重要的是忽视可能是最强大的代码审查技术 - 整个团队完成的永久性细化。

一个在软件中最普遍的观点是我们构建和完整的东西的概念 - 因此,建筑和建筑的无尽隐喻。188比分直播网 坚持原创然而,软件的关键属性是它是,可以在释放之后轻松修改,因为它在最初在程序员编辑器中组成。这就是为什么Erikdörnenburg明智地认为,建筑是一个糟糕的比喻,并且会更好被城市规划所取代的。有价值的软件通常处于恒定的变化状态,因为我们添加了更好地理解它可以带来的价值的功能。但是这个机会不仅仅是添加新功能,而且还要改进软件 - 将团队稳定地了解该软件如何最好地了解这些软件可以实现这些更改的课程。

与合适的环境,我可以看六个月前写了一些代码,看看它写的一些问题,并快速修复它们。 This may be because this code was flawed when it was written, or that changes in the code base since led to the code no longer being quite right. Whichever the cause, the important thing is to fix problems as soon as they start getting in our way. As soon as I have an understanding about the code that wasn't immediately apparent from reading it, I have the responsibility to (as Ward Cunningham so wonderfully said) take that understanding out of my head and put it into the code. That way the next reader won't have to work so hard.

This process of refinement is exactly the same as what happens in a code review, but it's triggered each time the code is looked at rather than when the code is added to the codebase. This was, for me, a crucial insight. After all, many problems that code reviews seek to remedy are problems that only become problems when the code is read in the future. There's a strong argument for not worrying about them until then. After all, just like adding a large apartment complex changes traffic patterns, we may have altered the context of the code six months later, altering the kind of fix that code needs. It also involves more people, in this scheme every developer that reads the code is a reviewer, and one that's able to review based on their actual use of the code rather than on some general, but often hazily-justified guidelines.

A way to think about the validity of a practice is by thinking about what happens if it's a monopoly. What if the only code review mechanism we have is the iteration from later programmers? One consequence is that the review attention gets concentrated on the areas of code that are read more often - which is mostly the areas that ought to get the attention. One concern is that code that's never read will never get reviewed - but mostly that's fine. A team with good testing practices can be confident that the code works, performance tests can identify performance issues. Given that, if the code never needs to be looked at again, we don't need to spend effort on making it comprehensible. I'd expect such cases to be vanishingly rare, but it's an informative thought experiment.

But most ≠ all. One obvious exception here is security issues. Code can work just fine for years until an attacker finds an exploit, at that point we'll lament its lack of review. This is an example of high-impact but rare safety concerns which deserve special scrutiny. However that doesn't mean we shouldn't make conscious use of refinement as a code review mechanism. Instead it means we should be aware of rare-high-impact concerns and adjust our workflow to watch for that kind of specific problem to the degree that it's needed in our circumstances. Threat analysis should alert us to the modules that need additional attention and the kinds of risks they face. Targeted code reviews might be scheduled for security concerns, these can run more effectively because they are focused on a specific kind of problem.

In order to do this perpetual code refinement we require other practices. If I'm going to change code I need to have confidence that it won't break existing functionality, so I need something like Self Testing Code. I need to know that it won't cause big merge conflicts for others, so I need Continuous Integration. We all need to be good at refactoring so we can change code effectively. Since this relies on many developers being expected to modify any part of the code base, we are best off with collective (or at least weak) code ownership. But given a team that has these skills, they can rely on using their regular refinement as a substantial part of their code review strategy.

If nothing else, I think it's important that we put more thought into the role of refinement as code review. One of the dangers of focusing solely on Pre-Integration Reviews is that it can lead teams to neglect how change works in a code base. If I have a pristine mainline, and ensure that every commit merged into that mainline is pristine - can I be sure that the codebase is still pristine after six months? I'd argue that I can't, because the changes mean a good decision about some code six months ago is no longer a good decision now. Refining the code allows us to evaluate old code against this changing usage, allowing us to sustain its health.

Acknowledgements

Ben Noble, Chris Ford, Evan Bottcher, Ian Cartwright, Jeremy Huiskamp, Ken Mugrage, Mario Giampietri, Martha Rohte, Omar Bashir, Peter Gillard-Moss, and Simon Brunning commented on drafts of this post on our internal mailing list.
Bliki:PullRequest 2021-01-28T10:37:00-05:00 //www.dawgtracker.com/bliki/pullrequest.html.

拉拉请求是GitHub推广的机制,用于帮助促进工作的合并,特别是在开源项目的背景下。贡献者在中央存储库的叉(克隆)中的贡献上。完成贡献后,他们创建一个拉请求,以通知中央存储库的所有者,他们的工作已准备好将合并到主线。工具支持并鼓励在接受请求之前对贡献进行代码审查。拉出请求已广泛用于软件开发,但批评者涉及添加集成摩擦,这可以防止持续集成。

拉出请求基本上为许多开源存在的开发工作流程提供方便的工具项目,特别是使用分布式源控制系统的项目(例如Git)。此工作流程从创建新逻辑分支的贡献者开始,通过在中央存储库中启动新分支,克隆到个人存储库或两者。然后,贡献者在该分支上工作,通常符合特征分支,从主线进入他们的分支机构。当他们完成时,它们与中央存储库的维护者通信,表明它们是完成的,以及对其提交的引用一起完成。此参考可以是需要集成的分支的URL,或电子邮件中的一组修补程序。

一旦维护者获取消息,就可以检查提交以确定它们是否已准备就绪 to go into mainline. If not, she can then suggest changes to the contributor, who then has opportunity to adjust their submission. Once all is ok, the maintainer can then merge, either with a regular merge/rebase or applying the patches from the final email.

Github's pull request mechanism makes this flow much easier. It keeps track of the clones through its fork mechanism, and automatically creates a message thread to discuss the pull request, together with behavior to handle the various steps in the review workflow. These conveniences were a major part of what made github successful and led to "pull request" becoming a fundamental part of the developer's lexicon.

So that's how pull requests work, but should we use them, and if so how? To answer that question, I like to step back from the mechanism and think about how it works in the context of a source code management workflow. To help me think about that, I wrote down a series of patterns for managing source code branching. I find understanding these (specifically the Base and Integration patterns) clarifies the role of pull requests.

In terms of these patterns, pull requests are a mechanism designed to implement a combination of Feature Branching and Pre-Integration Reviews. Thus to assess the usefulness of pull requests we first need to consider how applicable those patterns are to our situation. Like most patterns, they are sometimes valuable, and sometimes a pain in the neck - we have to examine them based on our specific context. Feature Branching is a good way of packaging together a logical contribution so that it can be assessed, accepted, or deferred as a single unit. This makes a lot of sense when contributors are not trusted to commit directly to mainline. But Feature Branching comes at a cost, which is that it usually limits the frequency of integration, leading to complicated merges and deterring refactoring. Pre-Integration Reviews provide a clear place to do code review at the cost of a significant increase in integration friction. [1]

That's a drastic summary of the situation (I need a lot more words to explain this further in the feature branching article), but it boils down to the fact that the value of these patterns, and thus the value of pull requests, rest mostly on the social structure of the team. Some teams work better with pull requests, some teams would find pull requests a severe drag on the effectiveness. I suspect that since pull requests are so popular, a lot of teams are using them by default when they would do better without them.

While pull requests are built for Feature Branches, teams can use them within a Continuous Integration environment. To do this they need to ensure that pull requests are small enough, and the team responsive enough, to follow the CI rule of thumb that everybody does Mainline Integration at least daily. (And I should remind everyone that Mainline Integration is more than just merging the current mainline into the feature branch).

The wide usage of pull requests has encouraged a wider use of code review, since pull requests provide a clear point for Pre-Integration Review, together with tooling that encourages it. Code review is a Good Thing, but we must remember that a pull request isn't the only mechanism we can use for it. Many teams find great value in the continuous review afforded by Pair Programming. To avoid reducing integration frquency we can carry out post-integration code review in several ways. A formal process can record a review for each commit, or a tech lead can examine risky commits every couple of days. Perhaps the most powerful form of code review is one that's frequently ignored. A team that takes the attitude that the codebase is a fluid system, one that can be steadily refined with repeated iteration carries out Refinement Code Review every time a developer looks at existing code. I often hear people say that pull requests are necessary because without them you can't do code reviews - that's rubbish. Pre-integration code review is just one way to do code reviews, and for many teams it isn't the best choice.

Acknowledgements

Chris Ford, Dan Mutton, Jeremy Huiskamp, Kief Morris, Pramod Sadalage, and Ryan Boucher commented on drafts of this post on our internal mailing list.

Notes

1: A colleague of mine recently calculated the time a client spent waiting for pull requests that had no comments (true of 91% of them). Total time waiting in 2020 for 7000 PRs was 130,000 hours. This figure included time elapsed over nights and weekends.

分布式系统模式:IDEMPOTENT接收器 2021-01-26T10:28:00-05:00 标签:Martinfowler.com,2021-01-26:分布式系统模式 - IDEMPotent-Receiver < div class = ' img ' > < a href = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/idempotent-receiver.html " > < img src = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/card.png "宽度= " > < / img > < / > < / div > < p >客户端发送请求到服务器,但可能不会得到回应。客户机不可能在处理请求之前知道响应是否丢失或服务器崩溃。为了确保请求得到处理,客户端必须重新发送请求。如果服务器已经处理了请求并在此之后崩溃,那么当客户端重试时,服务器将收到重复的请求。< / p >

more…

最大化开发人员的效率:组织的效率 2021 - 01 - 26 - t09:48:00凌晨 标签:www.dawgtracker.com, 2021-01-26: Maximizing-Developer-Effectiveness——组织有效性 < div class = ' img ' > < a href = ' //www.dawgtracker.com/articles/developer-effectiveness.html OrganizationalEffectiveness ' > < img src = " //www.dawgtracker.com/articles/developer-effectiveness/micro-feedback-loops.png "宽度= " > < / img > < / > < / div > < p >蒂姆完成他的文章通过观察如何高效组织设计工程组织优化效率和反馈循环。他以Etsy为例说明了这一点,Etsy积极地衡量他们快速、安全地将有价值的产品投入生产的能力,调整他们的技术投资以解决任何障碍或迟缓。

more…

分布式系统模式:状态监视 2021 - 01 - 19 - t10:28:00凌晨 标签:www.dawgtracker.com, 2021-01-19: Distributed-Systems-Pattern——State-Watch < div class = ' img ' > < a href = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/state-watch.html " > < img src = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/card.png "宽度= " > < / img > < / > < / div > < p >客户感兴趣的更改服务器上的特定的值。如果客户端需要不断轮询服务器以寻找更改,那么将很难构造其逻辑。如果客户端为了监视更改而打开了太多的服务器连接,就会使服务器不堪重负。< / p >

more…

分布式系统模式:租赁 2021 - 01 - 13 - t10:33:00凌晨 标签:www.dawgtracker.com, 2021-01-13: Distributed-Systems-Pattern——租赁 < div class = ' img ' > < a href = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/time-bound-lease.html " > < img src = " //www.dawgtracker.com/articles/patterns-of-distributed-systems/card.png "宽度= " > < / img > < / > < / div > < p >集群节点需要独占访问某些资源。但是节点可能崩溃;它们可以暂时断开连接或经历流程暂停。在这些错误场景下,他们不应该无限期地保持对资源的访问。< / p >

more…

可以破坏民主的谎言 2021 - 01 - 12 - t09:56:00凌晨 标签:www.dawgtracker.com, 2021-01-12: The-Lies-that-can-Undermine-Democracy 像许多美国人一样,我被最近在国会大厦袭击的侵犯了。这种愤怒的大部分源于不负责任的政治家犯下的谎言,并通过媒体机构传播。这样的谎言可以摧毁民主国家,而我们必须有自由言论我们不能摆脱这个演讲的后果

更多... 最大化开发者的效率:反馈循环 2021 - 01 - 06 - t10:05:00凌晨 标签:www.dawgtracker.com, 2021-01-06: Maximizing-Developer-Effectiveness——反馈循环 < div class = ' img ' > < a href = ' //www.dawgtracker.com/articles/developer-effectiveness.html HowToGetStarted ' > < img src = " //www.dawgtracker.com/articles/developer-effectiveness/micro-feedback-loops.png "宽度= " > < / img > < / > < / div > < p >蒂姆继续他比较高和低效率的组织通过比较关键的反馈循环。为了改善这些,组织需要了解微反馈循环的重要性,因为它们太小了,所以经常被忽视。

more…

更多的分布式系统模式 2021-01-05T09:43:00-05:00 标签:Martinfowler.com,2021-01-05:一些更多分布式系统模式

unmesh Joshi还有一些更多的分布式系统模式准备与世界分享。