Upgrade from journeyman status to the architect's basic skills and techniques

6-2-3.jpg

Point of attention, do not get lost; continually updated Java-related technologies and information architecture thermal paper! ! !

Sharp-eyed friend may also see this blog page upper left corner there are surprises yo

I think already advanced development, since that is fairly hard, with a lot of time to read the information architect aspects, but also have the opportunity to engage in a year or so activities related to architecture. I still self-knowledge, but also talk less than the standard technical architecture, but in my current work environment, to get guidance cattle were witnessed, I also continue to study with a teacher through, since that is the right way to go on the upgrade, that as long as efforts continue in the near future to get the architect's salary.

Looking back I was at an advanced stage of development, can be considered a journeyman, every day are doing the physical work, it means constantly replicate the familiar mode of operation. Since the work can not practice the knowledge high concurrency and other components necessary for architects, there were only can only rely on the accumulation of data to look at, to feel the actual requirements by interviewing the company's architect, he felt also take a lot of detour.

In order to continue to upgrade the road back, I wrote this article summarizes the stage, but also on the one hand by summarizing, let me be more specific follow-up plans and objectives, on the other hand, also we hope to make a modest personal give you a fellow traveler detours. This article can be considered before my two blog posts more architects are working with people, I saw and heard to talk about the upgrade steps and architects usually work content, as well as senior architects usually look to be solved problem, compared to how much distance you from senior architects as well - and then the subsequent series of text on the upgrading of the road technical architecture of.

First, there is the risk of skilled regress, so first of all have to continue to make progress on subjective

Each company do have limitations in fact alive, if you stay in this stage of the company's skilled workers, then we can not keep up with the pace of technological progress, long, long time will be left behind.

Then again, not every journeyman able to withstand the temptation of the comfort zone, I took I experienced the comfort zone and challenge the current district situation compare.

Before going to work in foreign companies, because of daily living can handle dry, so not the slightest pressure, and because flexible working time, so 10:00 to count the norm, there are always other week before to 10:30, the way to work, but also to look at the scenery with relaxed mood. In the current Internet companies, before going to work you have to plan the day's work, sometimes doing live today think technically I am not familiar, or have to urge other groups to the interface, I often have the feeling uneasy, sometimes along the way We have to trot, while also flexible working, but always before 9 am, early morning you can start doing things.

上班时,在外企的时候,对进度的压力不大,而且干的活都会,所以可以优哉地干,平时有空可以逛个网站,而且出去逛一圈是常事,加班到8点就会埋怨,到了周五下午,大多数人都没心思干活了,基本都是坐等下班。而在互联网公司,每天都有干不完的活,干好活,就得不断反思,看如何才能干更好,否则就压力很大。晚上加班到9点是常事,而且最头痛的是,不少事情不是能用时间都能解决,比如出个技术方案,里面涉及到的技术不熟,就得拼命学。

周末以及下班后,在外企的时候,由于无需积累,所以很轻松,也能享受生活,像我当时写书写博客,还出了两本书,Java Web轻量级开发面试教程和Java核心技术及面试指南,还算比较勤奋的,而在互联网公司,对不起了,平时一定得看资料,而且绝对不能装模作样地看,如果一个阶段里不进步,那么就坐等被说。

由奢入俭难,而且舒适区用的技术要比挑战区落后很多,而高级开发到架构师的升级任务未必是容易达成的,所以在舒适区的时候,只能平时多上进,要怎么上进?其实拿出当年高考四分之一的努力程度即可。

二、从会用分布式组件开始,而且不能光看资料

架构师的重要工作任务是解决分布式高并发的问题,所以升级可以从会用一些分布式框架开始。

比如nginx怎么配置,dubbo和zookeeper怎么整合,kafka消息中间件怎么配置,redis怎么配置,或者ETL该怎么配置。看了各种教程后,一定得自己找个环境配置一下,比如我通过nginx配置,确实能把请求发送到不同的服务器上,或者通过设置dubbo配置,确实能做到超时重发。

这个步骤的难点是,在自己的机器上未必能模拟出分布式环境,所以如果可以,就找公司测试环境实践,或者自己机器上装个虚拟机。如果实在没有办法,安装个环境,然后自己设置一遍配置,哪怕没法调试,自己设置一遍总比光看教程要好。

三、思考两个问题,从中能归纳出升级所必须的基本功

不少高级开发摸不到升级架构师的方法,其实很多技巧平时工作时就能接触到。可能这里一时无法列全升级到架构师所需要的基本功,但大家可以思考如下两方面的问题。

  1. 当前系统的运维方面,为了让你的系统能平稳地运行平稳地升级版本,你需要掌握哪些技能?当系统在线上表现出有问题时,你该如何通过查日志等方面来排查问题点?

  2. 再进一步,可以考虑系统高并发方面的问题。你的系统当前能应付多少并发量?当前系统的瓶颈在哪?任何系统都有瓶颈,比如SQL压力大,非常容易导致OOM异常。如何通过看日志等方式确认当前系统的瓶颈所在?

为了得到上述两个问题的答案,我们需要掌握各类技能,比如通过jenkins打包发布版本,通过linux日志查看问题,通过MAT查看OOM异常时的Dump文件,诸如此类,这就是升级到架构师所必须的基本功。

所以当我们在一个公司成为熟练工,达到“舒适区”以后,一定不能局限于自己所被分配的活。如果再达到高级开发的水平后,一定有机会接触架构配置调优等方面的活,这时候,有条件的最好能亲身参与,如果没条件,哪怕看配置看流程看代码也行。

四、架构师得从底层代码角度,进一步查看实现细节

java语法谁都会,但从初级开发,高级开发和架构师等不同的视角,关注的点一定不同。

初级开发会专注于“如何调用”和“如何才能保证没有语法和逻辑上的问题”,高级开发会根据当前需求选择一些合适的语法点,比如遇到高并发会选择“线程池”,遇到NIO类需求时则选用netty,而架构师则需要在使用各种组件时,进一步了解各种坑。

比如在使用netty时,则需要了解如何解决半包粘包问题,在使用堆外内存时如何保证能正确回收内存。这就要求高级开发在升级到架构师的路上,更得关注必要的底层代码,比如netty里LengthFieldBasedFrameDecoder解决半包的实现代码,以及DirectBuffer部分的相关代码。

推而广之,除了netty之外,高级开发在“会用分布式组件”的基础上,更得从高可用(一台down了能自动切换)高并发(这不用说了)集群上下功夫,这只能一个个组件自己看了,网上这类资料不少,比如我前几天看到篇阿里架构师面试指南,里面针对各组件提了不少问题,大家可以逐一对比,根据问题查看底层实现细节。

对高级开发而言,组件可能就是一个个jar包,但对架构师而言绝不是这样,比如某个基于netty的系统一直出现OOM异常,那么架构师首先得熟悉netty jar包里的底层代码,而且必要时,得debug进这些底层代码,或者通过dump文件发现现有系统在使用堆外内存时未释放内存的点。

看底层代码,说起来容易做起来很难,要看到什么程度?如何才能不拘泥于细节?我目前的体会是,第一看流程,从流程里看这个组件的关键模块和重要方法,第二还是结合阿里架构师面试题里的问题,比如提到dubbo底层通讯协议,那么就把对应的模块和对应的方法看一下。

五、架构师的思维:更得让架构切合业务,还得控制风险

记得我在入门架构师的开始阶段,总是很理想话,总是会画出一个解决高并发的框图,里面包含了各种组件,这不算错,但只是第一步。

在大多数场景里,架构师不是从零起点设计,而是需要结合现有系统的各种痛点改造系统。举个例子,当前数据库性能很慢,如果有钱的话,比较直接的办法是升级到oracle,但往往不现实,所以架构师可以搭建多个mysql实例,然后用mycat做分库分表。而且,从单库切换成分库分表时,得考虑到,万一切换失败,我该如何回退,由此可以设计出开关和汇总表等方案。

那么高级开发如何在这方面提升自己的能力呢?只能跟在架构师后面,仔细分析具体的设计方案。俗话说,熟读唐诗三百首,不会作诗也会吟,而各公司多少会有些线上的组件,大家可以通过看配置文件以及架构的工作流程,而且,在上线一个新架构方案时,可以多了解下避规风险和回退的方案。

六、实践才能提升,那如何没实践机会怎么提升?

今年我在加入到一个互联网公司后,由于有机会接触到各种架构,所以感觉有所提升。相比之下,我之前在一家外企,在架构方面更多的是“看视频看组件”,然后在组内分享架构的内部代码(总之就是实践的机会很少),所以在那段时间里,我自己感觉进度速度不快。

To Position architect, first of all we have relevant experience, but no chance to practice some of my friends, how to do? Before my approach is, look at the information, and then pretending he was architect to the interview, but it is difficult, because the architect level experienced interviewer, a look will be able to see done is real and theoretical experience. Some say the following real and effective approach.

  1. Can be an existing company, multi-application system on-line system dry some maintenance work in foreign companies, such positions called Support, domestic company called "system operation and maintenance," the specific job is responsible for deploying the system to the production line, in the production line and various components such as building oracle, mysql, nginx, mq, these companies have in the positions, if given the opportunity, it is best to dry for some time in such positions, if no chance, can acquainted with the relevant staff, and then look at some configuration to learn some ways to build infrastructure.

  2. Encounter program architecture review, as much as possible to participate. If the group of live architecture, try to do more, not necessarily just the beginning, not the time do not be afraid to lose face, along with more than familiar with the architecture behind colleagues ask, people look at is how to troubleshoot and debug living architecture, one to two opinions familiar.

I have seen some students, where the company's more traditional use of technology throughout the company did not have any use for distributed component architecture, so no way, or look up information on their own practice (in fact, this effect is not good) or find yourself the opportunity to jump to Internet companies.

Seven summary

After all, the upgrade can only trick is to observe try to figure out more practice, and upgrade the road hardship, really people drinking water, Lengnuanzizhi.

It is still hard, so although the talent in general, the road is tortuous step by step upgrade of hardships, but under the insistence, since that can be considered some progress, it still dares to write some ideas for your reference.

If you feel this article helpful, please help recommend this article, if you feel there are deficiencies in the article, please comment also help a lot personally, I appreciate it.

Guess you like

Origin blog.csdn.net/Java_No01/article/details/90743940