High and generation companies battle SOA architecture project

Now the Internet Shopping electricity supplier platform basically use SOA as the system is mainly distributed architecture. Why are there so many electricity providers have chosen SOA project as the system architecture it? This is because the electricity supplier industry projects it has the following characteristics: a distributed, high concurrency, high availability, clustering, load balancing, huge amounts of data, system security, and other issues need to be addressed, and SOA distributed architecture just to good solve these problems.

Here's what I worked on the project electricity supplier before a brief share SOA architecture development process, hoping to help everyone, if wrong, please correct me.

A: First talk about the overall project framework technical points

1, the project uses a distributed SOA architecture, on this basis, we realized the idea of ​​a service-oriented middleware framework Dubbo use the core services produced Alibaba governance to manage the entire system of services, and as a registration center to choose zookeeper ;

2, we all know that a project can not be avoided electricity supplier how to deal with massive resources pictures, so here by the use of open source distributed file system with a C-language development FastDFS as image server, dedicated to all of the storage system product images, ad images and other resources, and to access resources on a reverse image server via Nginx server;

3, then talk about the architecture of this product search function, where we will build on the Linux system and realized the solr cluster cluster fragmentation, installed IKAnalyzer Chinese word, a series of deployment defined business domain, etc., set up a special the search subsystem, using solr technology to achieve product search function;

4, product details page piece, the use of static pages freemarker technology, will be able to achieve a generating HTML pages for details of all commodities, when users visit the site to find the product View Product Listings data, we have here is details of dynamically generated pages, rather than in advance good design, so that even if a little slow, it does not matter;

5, optimization of a project is the development of the electricity supplier essential work, which after analysis, the use of non-relational databases redis redis clusters set up as the protagonist, the mall home of advertising data, data, and will visit every day footer most timed advertisement data are stored in redis clusters, with space for time to improve the display speed of the site data;

6, different from the traditional Internet Project project, log on to the site's user security check there is a very high demand, this uses a single sign-on technology to achieve the user's login and registration functions, and here I was not involved in the development, but for a single sign-have a certain understanding, to share below.

Two: this business on nothing to say, all electricity supplier shopping platform, we may have to shop on a platform similar shopping experience, our main line of business is the project of the shopping process, as for back office management system that is on each maintenance management module; but we added a new mall countdown activities and commodity spike activity, the following specifically say maybe has a new feature it.

1, mall countdown activities to achieve probably step (as a reference):

(1), first determine a reference time, you can use the SQL statement SELECT NOW get a time from the database;

(2), the start time of the event is fixed, time-use activities initiated - a reference time can be calculated time value in units of seconds;

(3), then redis database using string data type to store a type (active start time value) key, the key must set the expiration time, use the command 'expire key 10' assumption is valid for 10 seconds;

(4), showing page when the mall, remove the memory of the event start time, using js countdown function;

(5), once the failure of the stored key, then the event (Note that, in the event the logic necessary to first determine whether the event has started).

2, probably step spike activity mall merchandise implemented (as a reference):

(1), the first number stored in the commodity spike activity in redis;

(2), at the beginning of spike activity, use the command decr quantity minus one, if not negative, then grab a gift;

(3) Once the number of items returned is 0, then the product has been sold out, end of the event.

Three: Project Chart

(Project product architecture diagram)

 

 

(Network topology)

 

Guess you like

Origin www.cnblogs.com/eess/p/11443970.html