After years of architecture sentiment

Long time did not write a blog, a dazzling look at the most recent one is actually 2013. No mood to sleep tonight, combine all these years some of his insights on application architecture, to talk about a few experience.

A. Architecture is needed resources to achieve

Personally I think that this is the most core, but some white architects most likely to ignore it.

I have seen several scenes, to see whether my colleagues encountered:

Architects from manufacturers, experienced, load balancing / high availability / write separation / cache / queue, meal operate fierce as a tiger, and finally scolded his teammates two hundred and fifty.

Finally, any architecture implementations are people to do, the premise architecture to build, not just look at the scene and scalability of the application, but also consider the capacity and technology stack background team resources. Architects usually encountered two ways of matching resources and infrastructure.

1) external teams admission Development

This is called outsourcing projects. Benefits of outsourcing is that before admission, architect / project manager at the time of bidding can do filtering based on technical background and practical application scenarios from multiple vendors, as far as possible match to a more suitable technology stack and rack up.

2) internal independent research and development team

I have a team there, a lot of development resources even just write code, no experience full deployment of production machines ... probably many years of experience in technical point of view is unimaginable, but that is the reality. This time to put on airs according to the ability of members to determine whether the development of the members have relevant experience:

  • You take micro hard service, team members with relevant experience?
  • You engage in Redis, team members understand the internal mechanisms?
  • You get hold of the front mvc, team members will not only use jQuery operating elements on the page?

These are the need to think about. (Of course, this does not mean that members must be completely in accordance with the ability to put on airs, after all, the technique can be learned growing up. If there is bar fine friend, please do not here for Paizhuan)

Like cooking, prepare our food when we must consider whether the chef cooking ability, abalone, crabs of course delicious, but not everyone will get. If you did not have to eat the last diners had starved to death, chefs have to get out.

II. Architecture is continuous improvement

I also have some way to take over the project, the beginning of the architecture of these systems are not perfect, there are many points that can be optimized, are getting better and better through continuous improvement.

C-terminal to a door post system example.

When took over, this is a very simple system of B / S architecture: the back-end .Net Webservice (1 server), the front end of H5 (1 server) embedded in the door post inside the machine to access back-end database SqlServer made a brief reading write separation (2 servers), at the time of the release of their own to write a queuing mechanism.

Behind the actual scene encountered a number of problems:

1. When the owners work in the morning and evening commute, door post release tend to be the peak of Taiwan interface server when the pressure is very large, after discussion, the improvement is more than one.

2. the interface between the two servers need to read the owner's identity and room information, information is often high frequency access (for example, the same owner, and out in a very close time period; door post players multiple queries owner to verify the information;) . And past some of the information architecture caches, when the application interface is split into multiple servers can not share the data in memory. ok, improvement.

3. When data is written release himself developed a queuing mechanism, but later they found it difficult to ensure the continued stability of the bug, the maintenance cost is also very high. ok, improvement.

4. There is some data, than the larger, it must be stored in a database access (for example cumulative release data, often the door post view). Although the existing infrastructure made separate read and write, but existing data frequently accessed data and some of the core rub together, save the data must ensure the stability of the core, it may be required in addition to other applications. ok, improvement. Splitting the main data, a plurality of read libraries increases, real-time synchronization and reads the library.

 

Behind the improvement does not stop, will not be repeated, but the core of this process: the architecture is the need to combine the scene of continuous improvement, do not eat a big fat man, there is no reason evolution.

III. To combine architecture scene, avoid over-design

Here are some interesting experiences to share.

I once took a number of micro-channel end enterprise development teams, the Enterprise modules split is doing fine, all applications can be split independently design alone, only need to inherit Auth micro end of the letter. The past inside the Enterprise application integration and classification of more source, so the use of technology stacks are more complex, the team has also been trying to do. Useful jQuery front-end common, useful react, useful vue of; .net backend helpful, useful java-; database oracle, mysql, sqlserver, is simply a hodgepodge.

One of which release, a new on-line editing a bank card information, a team member is responsible for iteration, since the member used java micro service in other projects, so they take a direct copy the code and rack up development. (I also oversight, playing their own two ears, :)). This is just great, a simple read & write application bank card information bank card information, service micro fuse / load / Gateway / size split mechanisms have been. And then found the project a production environment, and not so much server resources support, then the developers did not take long straight running, rush to take over the technical architecture is not familiar with this set, the last simple application module had to be postponed, the development of new who also was tortured and his head had to rewrite the package is deployed.

So, not the more complex the more popular the better architecture, sometimes a simple three-tier enough to cope with, no need to match a set of shelves tasteless, and finally found eat no meat.

IV. Architecture to combine the development process

Here again mention again, the architect built this set of applications shelf / development system, according to an iterative manner and the ability of team members, because due to the person drawn. Initially article I mentioned, some team members will even write code, or from xx giant, his ability to encode / understanding of the framework / design patterns and so are impeccable, but because of the work breakdown manufacturers, for continuous integration, overall production of products such as high availability and no strong understanding. This time not only to architect the system based on usage scenarios, but also defined the development process, it is often said of engineering.

  • Behind the application is not designed to distinguish develop, qa, pre-product, product sets the environment;
  • The integrated continuous manner using CI jenkins other tools;
  • Using common unit testing framework, developers avoid the problem of lack of self-test codes;
  • Using automated coding standards checking tools, continuous integration and release submitted to check the quality of the current version (Do not rely on lengthy written their own coding specification, and it will only be the basis for your team members Review code followed by debate);

Architects not only to circle in one direction, to lead the technical team forward, but also to provide ongoing support to help the team overcome the existing shortcomings and difficulties. Architecture provides a way to help in the process is white, we are not superior leader, we bow our heads to do things for developers along the way.

 

Above is a summary of the full stack combined with years of practice, we hope to inspire primary architecture lion, lion resonate with the old architecture.

Guess you like

Origin www.cnblogs.com/MyBigBird/p/11824082.html