What middleware should an NB programmer master~


        A NB project does not say at least high availability and high concurrency. To achieve high availability and high concurrency; a variety of middleware is needed to support it. What middleware should an NB programmer master? ?

1、Tomcat和Jetty

         Tomcat and Jetty are both widely used Servlet engines, but compared to Jetty, Tomcat is more stable and mature, and its market dominance is still difficult to shake. But both have their pros and cons. At present, many companies use maven to manage projects during the development process. Because Jetty is relatively small and supports maven well, many programmers like to use Jetty startup programs for development and debugging during the development process; Tomcat is stable, mature, and open source. , So whether small companies or large companies use Tomcat to deploy the completed projects for production use. JAVA programmers must not master these two application servers.


2. Nginx, Apache and LVS

       When the number of website visits reaches 10,000, a single service can no longer meet the demand, and cluster deployment is required at this time. When it comes to cluster deployment, load balancing will be associated. At this time, LVS+Nginx or LVS+Apache to achieve load balancing comes in handy. However, in the JAVA field, LVS+Nginx is the best combination. Among them, Nginx is a middleware that must be mastered. Simply use Nginx or use routing and forwarding to achieve load balancing.


3、Redis和MongoDB

        Redis and MongoDB are both NoSQL databases. Although both are NoSQL databases, the application directions are still very different.

       Redis is a key-value storage system (distributed internal cache, high-performance key-value database). It supports relatively more value types for storage, including string (string), list (linked list), set (collection), zset (sorted set) and hash (hash type). These data types all support push/pop, add/remove, intersection, union and difference, and richer operations, and these operations are all atomic. On this basis, redis supports a variety of different ways of sorting. In order to ensure efficiency, data is cached in memory. Redis periodically writes updated data to disk or writes modification operations to additional record files, and on this basis, it realizes master-slave (master-slave) synchronization. It is suitable for systems that have high requirements for read and write efficiency, complex data processing services and high security requirements (such as Sina Weibo's counting and Weibo publishing systems, which have high data security and read and write requirements) .

        MongoDB is a product between relational databases and non-relational databases (databases based on distributed file storage). It is the most versatile and most like relational database among non-relational databases. The data structure he supports is very loose, it is a bson format similar to json, so it can store more complex data types. The biggest feature of MongoDB is that the query language it supports is very powerful. Its syntax is somewhat similar to an object-oriented query language. It can almost achieve most of the functions similar to single-table queries in relational databases, and it also supports indexing of data. Mainly solve the problem of access efficiency of massive data.


4. ActiveMQ and RocketMQ

        ActiveMQ is an open source project under Apache, which fully supports the implementation of JMS Provider of JMS1.1 and J2EE1.4 specifications. RcoketMQ, a project incubated by Ali, has also been donated to the Apache Foundation.

        ActiveMQ and RocketMQ are collectively referred to as message service systems: to solve the coupling between services, increase the concurrent processing capacity of the system, and are also often used in distributed transactions. The standard producer and consumer model is used, and there are two data structures: Queue (queue model) and Topic (publish-subscribe model):

       Queue: The producer produces a message, which can only be consumed by one consumer

       Topic: A message produced by a producer can be consumed by multiple consumers.


5、Zookeeper

        Zookeeper is not necessary, but Dubbo, a domestic microservice framework open sourced by Ali, uses Zookpeer as the recommended registry, so it seems necessary to learn about Zookeeper. Dubbo was open sourced by Ali on GitHub in the past few years. After the open source, Ali did not effectively maintain Dubbo. However, after a few years of discovery that many small companies and even large companies are using it, Ali began to pay more attention to it. Last year, Ali made a major version upgrade to Dubbo, and then Ali contributed to the Apache Foundation.


      As a NB and qualified programmer, you must master these middlewares. Mixing in a large company may not need to be fully mastered; but if you are mixing these in a small company, you need to master it, because you are not only a developer, but also an operation and maintenance personnel.


Guess you like

Origin blog.51cto.com/15127574/2667890