Universal SMEs architecture design ideas

       In a previous blog post ( On the Core micro-service architecture and .Net ) We talked about micro-service architecture and .Net Core, generally under analysis some of the advantages of micro-services architecture, here in the blog, will talk about the architecture design some ideas.

       First, the code to be clear, structured, the degree of coupling between modules to minimize, to the more complex the code is not possible, some people may think, the more complex the code is written, the more advanced algorithms, to let others see of you do not understand the more cattle X, I think on the contrary, the more simple the code will be able to achieve as far as possible on simple, use a few lines of code to solve the problem of why to write a cattle X algorithm to achieve it?

       Secondly, to achieve universal module need to refine it alone, do not mix business logic implemented in the other, is not conducive to portable code, the following simple talk about some common logic modules or require special attention;

               1, access to the underlying data need to write a separate, when in our database changes, such as our project using a SqlServer, the next project is to use MySQL, to do very easily switch;

               2, cache management needs independent, generally, we have developed will be used caching, the cache can make good use of the system performance will be greatly improved, simple example, we have developed such a system, using a MemoryCache, but on-line system after running for some time, concurrent increases, the native cache has been unable to meet demand, we need to be clustered system, relieve pressure on the server, this time need to use Redis to manage the cache, then this time, we need to do is easy the switch from MemoryCache to do Redis cache management, we only need to change it will be able to achieve the desired effect profile in place without having to use a cache of a change to recompile the line.

              3, the log module requires independent, whether it is an error log or operation log, which will be used basically for each system, we can borrow some third-party open source log system to achieve, such ELK open log management system (back then how integration)

             4, rights management, which are essential for each system, but many companies and their own rights are some of the relevant administrative system, there are some not common rights management capabilities, such as data related to the rights of management, this time we can be independent of management authority, which can reach a common problem, the functional competence independence, we do not have to be concerned about functional competence in the development of new systems, but do not even need to migrate to this new module project, open interfaces directly to the authority out of the new system can be called directly;

       Third, cross-platform support, of course, can be a good support for .Net Core cross-platform migration;

       Fourth, easy to expand, with the development of different services, systems architecture necessary to support the expansion of some of the features;

       These are my views on some simple system architecture design, of course, there are other modules or functions did not speak, because there may be many small teams did not use, such as analyzing system performance, monitoring, if that's wrong place welcome exhibitions!

Guess you like

Origin www.cnblogs.com/minghon/p/11768662.html