编程知识 cdmana.com

Looking at the improvement of software efficiency from the perspective of serverless

The following is from 「 cloud + Community Technology Salon - Cloud original special session :《 from Serverless Look at the transformation of software R & D efficiency 》」, The depth of the piece , It is expected that reading will take 35 minute .


Sharing guests

Yang Zhengzheng , Tencent cloud Serverless Center expert architect , Previous appointment ThoughtWorks Technical director of China North America Division , He has successively served as the R & D leader of a large team 、 Technical director and enterprise architect role , As the customer's main technical interface , Lead and participate in the development of customer's technology strategy 、 In the process of technology strategy implementation and enterprise architecture governance , And actively participate in DevOps、 Domain-driven design 、Serverless And software quality governance .


01. 

The goal and resistance of R & D efficiency improvement

1.1 The goal of R & D effectiveness governance

First, let's take a look at the typical SaaS Software business model , Whether it's SaaS Software startups are also a new business within the enterprise , It's a hypothetical question that we all face at the beginning : If this problem is solved , Can bring growth to the business 、 Bring business revenue , But the important thing is : This may not be the real pain point of the customer , This is just an open question based on our current cognition 「 hypothesis 」. After that, enterprises will provide solutions to this problem , Then deliver the solution to the customer , After some success , We will try to push to a larger market and users . If this solution can be replicated in a company , We will seek to identify more opportunities for growth among customers in the same or cross industry , You can also use landing before expansion (Land-and-Expand) Strategy , Tap more growth opportunities in stock customers .

In the above process , Enterprises are at different stages , Their concerns are also different :

  • From problem to solution : I What we are thinking about is how well the problem matches the solution (Problem-Solution-Fit), From the perspective of evaluation, it mainly depends on whether the solution can really solve the corresponding customer problems .

  • Reach the market and users from the solution : Enterprises will pay more attention to product market fit (Product-Market-Fit,PMF), This is often the main reason why many start-ups fail , We have powerful products , But users are not willing to pay for our solution . The root cause is that our solution is based on a hypothesis to be tested , This assumption may have been wrong from the beginning .

  • branching : When a certain market scale is formed , Companies will try to scale up , At this stage , We think more about the flexibility of the software , Whether it can meet the customized needs of potential customers . The current software may be able to solve 80% The demands of our customers , But from 80% To 90% The promotion of , It may cost more , In addition, we need to consider the long-term maintenance cost of these customized functions .

If we take a family with us SaaS Start-ups CTO The hat of , Think about how to improve the R & D efficiency of the whole team ? There may be a lot of answers , such as : Improve the ability of R & D personnel 、 Recruit more R & D personnel 、 Buy advanced development tools , Improve R & D efficiency 、 Code and architecture governance, etc , This list can be very long . In order to systematize the development of R & D efficiency promotion strategy , Invest in R & D effectiveness in a targeted way , We can use community or industry frameworks to help us think , But I think there are two big problems in many R & D effectiveness frameworks :

1. Focus too much on the stage from problem to solution

I think R & D effectiveness governance cannot be separated from the final product value , An end-to-end perspective needs to be established , It's not just about the problem to the solution phase , We also need to think about whether the solution can really meet the demands of customers ? Whether it can support the solution to scale up in a larger group ? Our focus on R & D effectiveness needs to continue to extend to users and markets .

2. We don't pay enough attention to the feedback cycle in the R & D process

At present, in many R & D effectiveness governance frameworks , We can see a lot of indicators , Like the number of releases 、 Number of builds 、 Automated build speed and so on , These indicators focus on the speed of value flow from left to right , But it ignores the value feedback from right to left , And this feedback can deepen our understanding of the problem , Otherwise, our cognition of the original hypothetical problem will still stay in 「 Low cognition 」 level . For example, after the product function is rapidly promoted to the market , How often is it used 、 How about user feedback , Through the collection of feedback , We may realize that : It turned out that this was a wrong assumption in the beginning , So as to adjust the product direction in time .
So back to R & D effectiveness governance itself , I think R & D effectiveness governance has only one goal , That's it :「 Accelerate the flow of value , Shorten the feedback cycle , Test the hypothesis of the problem with low cost 」, Accelerating the flow of value and shortening the feedback cycle are the means , Low cost test questions assume that the results are expected . 

Think about the improvement of R & D efficiency from this goal , We will also have a deeper understanding of some common practices , For example, the unified code specification 、 Introducing automated testing and so on . Because we think that code conforming to the specification can improve the maintainability of software , Can reduce the cost of the problem to the solution , So we have to insist that the code is up to standard ; Due to the low efficiency of manual testing , As software grows , We believe that by introducing automated testing, we can more efficiently verify the matching degree between the solution and the problem , Thus accelerating the flow of value from left to right , So we have to stick to test automation .

At the same time, starting from this goal , In practice, there will be more room for imagination :

  • How to accelerate end-to-end value flow ?

In product design, we can advocate MVP The concept of , It wasn't meant to start with a big, comprehensive solution , It's about finding MVP -   Minimize viable products , Quickly validate ideas , Verify whether the product meets the market customer expectations , And then instead of manually deploying applications , Do automatic operation and maintenance 、 Automated application deployment , Quickly bring solutions to market with customers . Maybe we can get involved in architecture governance and product design , Develop indicators to quantitatively analyze the flexibility of software architecture , Make the product more flexible , It can adapt to the needs of customers at low cost ; Maybe we can also try automated infrastructure management , Shorten infrastructure preparation time .
  • How to shorten the feedback cycle ?

Whether the functions we deliver really create value ? according to Standish Research shows that :20% Software features of are often used , and 30% The features of are occasionally used , The remaining 50% Features that are rarely used or not used at all . Maybe we can take the initiative to try something similar A/B Testing、NPS(Net Promoter Score, Net recommended value ) Other methods , Let the user's feedback quickly pass to the product team . This goal can also drive R & D efficiency managers to participate more in product design 、 Architecture design 、 Infrastructure management, etc .
In addition, unreasonable division of labor will also prolong the feedback cycle , The organizational structure of the team should be divided from the perspective of business or from the perspective of personnel role ? In agile software development, full function team is advocated , In a small team (Scrum Team) The interior includes products 、 Research and development 、 Testing, even operation and maintenance 、UX, The whole R & D process covering a certain product or business , Close the business loop within a team , More responsive to change ; The role-based division of labor sometimes leads to the fragmentation of the delivery process , Every time a new role is introduced in the whole R & D process, a context transfer will be added , We also need to deal with the problem of terminology conversion and information loss .


1.2 Resistance to R & D efficiency improvement

Around the above goals , We still have a lot of challenges and obstacles in the whole R & D process , This sharing session focuses on infrastructure management 、 Software architecture design and team cooperation :
  • Infrastructure management

This is a project I've been through , The client's server is mainly deployed by virtual machine , Use load balancing for traffic distribution , This is also a very typical deployment structure . By adding virtual machines , Realize the scalability of the application . However, due to insufficient estimated capacity , Leading to peak business , A large number of users request timeout , This means that the brand reputation is damaged for customers 、 User churn . Although it can be expanded by creating virtual machine instances , But there's still a lot of extra configuration to do . There are many dependent frameworks or languages at the bottom of the application that need to be installed at runtime , After the installation, you need to configure and deploy the application , This cycle needs at least 1-2 Hours . Cumbersome infrastructure operation and maintenance limits the expansion of business scale , Limits solution replication to a larger population .

The traditional mode of operation and maintenance also needs capacity prediction , But it's hard to balance cost and efficiency : When the manually planned capacity is lower than the actual flow , Traffic overflow 、 Slow expansion , Infrastructure can't support real business needs ; When the planned capacity is greater than the actual flow , Low resource utilization , The increase in business costs .
  • Software architecture design

Maybe some students will question :「 Infrastructure issues , It doesn't seem to have anything to do with R & D 」. But for solution replication , The perspective of thinking should not just stay at the infrastructure level , The design of software architecture is equally important . Split from single architecture into micro Services , Even finer grained functions (FaaS), It is a very popular software architecture design trend in recent years , Greatly reduces the cost of solution replication .
Based on traditional virtual machine deployment , Each component of an application may be deployed on multiple virtual machines , For new customers, copy the solution by copying virtual machine . This way is not only costly to maintain , And only by copying the virtual machine to support a larger number of users , To meet the demands of flexibility , And by further splitting the architecture , After splitting the single architecture into micro Services , Replication of solutions can be controlled at a more granular level . Take an e-commerce application as an example , Order 、 Storage 、 The requirements for flexibility of various business modules such as goods and vehicles are different , Whatever technology we choose to implement , None of these elastic properties change , It's essentially part of the business requirements .
besides , The heavy workload of the R & D team is also one of the important reasons for the lack of R & D effectiveness , Repeat within the enterprise 「 To build the wheels 」 It's a common phenomenon , Maybe this is also in recent years 、 One of the reasons for the popularity of platforms and other concepts .
  • Teamwork

Front end separation is a typical way of R & D team cooperation , Back end provides API, But sometimes API Unable to provide in time , And the front-end developers don't know the server 、 Database, etc , I don't know the back-end programming language , Have a certain learning threshold , No integration in time , Lead to online time delay , The speed of flow that affects value , These work in process (WIP) There is no complete solution , It can't be delivered to customers , Potential integration problems can also lead to increased development effort .

The above is my understanding of the goals and challenges of R & D effectiveness governance , Let's share Severless How to improve R & D efficiency .


02. 

from Serverless How to improve R & D efficiency from the perspective of science and technology ?

Serverless The concept of

It's probably the first time that you've come into contact with Serverless The concept ,Serverless What is it? ? What is the value of ? It can be understood by this example Serverless The concept of : For example, there is a simple travel demand , From where we started A Destination B, You can choose different solutions , Private car / Car Rental / online car-hailing , Different schemes have their own characteristics :

  • Private car : One-Time Fee Option , Exclusive resources , Maintenance costs are high , similar IDC The physical machine in the computer room ;

  • Car Rental : Pay for the lease term , There is a certain maintenance cost , But you still need to drive your own car , It's like a virtual machine ;

  • online car-hailing : Charge according to actual consumption , Just take out your cell phone App, Put forward travel demand , This is also Serverless Idea ;

Serverless Compared with the traditional general computing platform , We can really pay for what we use , Can greatly save server overhead and operation and maintenance costs .

Cloud functions SCF Tencent cloud Serverless product , Without the need to buy a virtual machine , Executable code , At present, it supports all the mainstream programming languages , Include Node.js、Python、Java wait , It mainly has the following characteristics :

1. Saving on server overhead , According to historical experience, we can probably save 10%-20%, The specific revenue should be combined with the business scenario 、 Use cases to judge .

2. Save labor operation and maintenance costs , And Serverless Save server costs compared to , To bring greater value is to reduce the cost of manual operation and maintenance . Before a lot of support availability 、 Scalable operation and maintenance work can be directly hosted by cloud vendors to handle .


Move one : Hosting infrastructure capabilities , Reduce infrastructure operation and maintenance costs

Serverless How to solve the R & D efficiency challenge mentioned before ? When trying to push a solution to a wider audience , First of all, there will be infrastructure problems , Especially for many businesses that are in high-speed expansion , For example, a large retail enterprise , Hundreds of stores a month , When copying the same business model in more cities or sinking markets , Infrastructure stability is the cornerstone of business growth ,Serverless By putting usability 、 disaster 、 Traditional operations such as backup and monitoring are hosted in the cloud , It can greatly save the cost of infrastructure replication of enterprises , By executing a command , Then cross region replication of environment can be realized .
In addition, there is no service architecture through automatic scaling , It can basically keep the resource consumption consistent with the actual flow line , Significantly reduce the cost of enterprise capacity planning , So that enterprises can focus on the business value itself .


Move two : Divide and rule , Allocate investment in a targeted way

「 Domain-driven design 」 It's one of the most important methodologies of microservice design , It is divided into strategic design and tactical design . The core value of strategic design is to help enterprises look at their business capabilities from a more macro perspective , Instead of going to the two extremes of complete procurement or complete self research . From the perspective of business capability, this paper analyzes which are the core domains of an enterprise , Which are the support domains , Which are common domains , For core domain investment 80% The R & D power of , Bring differentiated competitiveness to enterprises ; For the general domain , For example, content management system 、 Sign in 、 Certification, etc , It has nothing to do with the core competitiveness of enterprises , It can be handed over to cloud vendors or third-party enterprises , Use standardized out of the box features :
Compared with microservices ,Serverless With the help of FaaS( Functions are services )+ BaaS( Back end as a service ) Idea , Reuse capabilities in finer granularity and scenarios , The focus on R & D efficiency has been raised from service level to application level ( Such as Google Firebase etc. ), By integrating out of the box Standardization BaaS Services and programmable functions further simplify the complexity of application development .

Move three : Lower maintenance cost , Optimize the division of labor within the organization

With the help of server-side rendering technology (Server Side Rendering,SSR), Front end developers can directly use JavaScript Write back end API. For infrastructure management ,Serverless There are also mature development tools in this field , such as Serverless Framework, Through basic YAML The configuration file , You can put the complete development environment 、 The test environment is built .

SSR For enterprises, the biggest value lies in the realization of business cycle , For front-end developers , No need to wait for the back end to provide API , The end-to-end development and testing of the whole business can be completed , Accelerating the flow of value from left to right ; Second, based on the same infrastructure description file , Just modify the simple configuration , You can copy it , Further avoid developing 、 Inconsistency between test and production environments .



03. 

Serverless Development trend prediction

Finally, from a personal point of view , Share it. Yes Serverless Prospects for the next stage of development :

The first trend is :「Serverless + X」

Can see a lot of convergence Serverless The idea of the product is constantly born , For example, the major cloud vendors recently released Serverless DB、Serverless middleware 、Serverless Container platform and other products . From the perspective of application , In addition to calculation , Also consider the file system 、 Object storage 、 Databases, etc , So I think the future dynamic scaling 、 Pay as you go Serverless The product matrix will become richer and richer .

Another trend is :「Serverless As the execution engine of the application 」

In this form Serverless It's not perceptual to users , because Serverless The cost of providing 、 Maintainability 、 Scalability and so on ,Serverless It can be used as a support SaaS And so on , Further enhance the competitiveness of the product itself .

Besides, based on Serverless The concept of products or solutions and edge computing will have a better integration , Make full use of the computing power of each node at the edge of the cloud , Unleash the edge potential , In the network bandwidth delay 、 Energy consumption is limited 、 There will be more landing cases in complex scenarios such as data sensitivity .

Finally, in developing tools 、 Development experience and methodology guidance , and Serverless The relevant tools and ecology will also be more mature .

The above is my main content to share , thank you .

The author of this article : Yang Zhengzheng , edit : Feng Huaiyu .


Recommended reading


One More Thing

Experience Tencent cloud immediately Serverless Demo, obtain Serverless New user gift pack , Please be there. PC End access :
serverless.cloud.tencent.com/start?c=wx20210414
Welcome to thousands of people QQ Group (871445853) communication Serverless!
  • GitHub: github.com/serverless
  • Official website : cloud.tencent.com/product/serverless-catalog
Click on 「 Read the original 」 , Relaxed experience Serverless Application deployment !

版权声明
本文为[TencentServerless]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/04/20210422013059224h.html

Scroll to Top