FAQ: What is the model?

  The term model, originally a good understanding of the term, is probably a miniature version of the meaning of the actual product.

  Of course, you can go to look up Wikipedia, in fact, not only can describe the physical model can also describe a virtual object. We mainly look at the latter. (Wikipedia: https://baike.baidu.com/item/ model / 1741186 fr = aladdin? )

  When using this model in the software industry, it seems to change the flavor. For example: the development model, java memory model, threading model, io model, reactor model, the model of production and consumption model, message-passing model ...

  It makes me a very long period of time, has been do not understand, what is the model. With age, finally we have a little understanding of their own, the right to tell their own stories when to listen to it.

 

  Interaction model: constituted by one or more elements, including use cases, sequence diagrams, state diagrams, and other user-interface prototype, which describes the use of a kind of interaction between the user and the system; Although many content, does not look like saying something called a model, however, does its description and "interaction" is very relevant, so understanding it is pretty comfortable. And our next few examples, you can not necessarily!

  

  java memory model? You say memory is the memory of it, not a rectangle is a square, but also loud noise. Wrong, java memory model content may include memory and memory layout interactively, such as the layout of the main memory plus working memory mode, the main memory is shared together all the threads of memory area, working memory as a private area of ​​the current thread. Interactive way, when a thread runs, it will copy the contents of a need from main memory into the working memory, arithmetic processing on this basis, the operation is completed, the results will be written back to main memory. And this model there is a very important job is to solve the problem of working memory and main memory interaction, it produces a variety of barriers, which is its key. This is the java memory model, you have to say it did not have any inappropriate, but when people ask me this thing, I wonder what the problem model, always imagine a scaled-down version of what is physical? Not answer are not at all because I do not know how they work, embarrassed.

 

  netty threading model? What thread can model, at most, thread pools can chant loud noise? But if another question is asked may be close to the people, how netty io thread in the works? The correct answer is reactor model, the Chinese translation for reactor nuclear reactor, is probably a fuse, causing such a way a big explosion. Specifically, that is, an acceptor thread dedicated to receiving the client request, and upon receiving a request to distribute the rear end of the thread pool request, read the message, and transmitting codec is completed by the thread pool. Of course, this is just one of the modes of the reactor, it there are other better ways, such as the main mode from the reactor thread pool. In short, the purpose is to allow the system to handle more concurrent requests, by way of multiple threads pool. So, this is not called threading model like the way the other is not good.

 

  Parents entrust load model? This is the basis of java class loading, concept seen is seen, not seen is not seen. This is also nothing, that is, when loading classes give priority to the parent class to load, and then not by their own load of such a process. But I think a very simple sentence after being extracted from a parent delegation model to load, forcing the grid instantly improved a lot. Moreover, the model here seems to have become a verb wood. If you do not refine such a term out, how do you describe this thing to do?

 

  Messaging model? This is easier to understand, how a message is passed from one point to another is described. Basically now in the MQ product described more clearly describe the direction is also different, such as point to point messaging models, publish-subscribe messaging model. Simply put this model is generally a producer, queue, consumer so few elements, from the producer to send a message to the queue, and then get the data from such a process queue by the consumer, which may be the focus of attention is to confirm ack mechanism the model also pull and push message message mode, it does have to be careful to understand the specific product. But on the whole, to know the nature of the direction of such a problem is more important, after all, who does not write a few bug? But the bug can put sensual taste is not much.

 

  Data model? In fact, we appear this concept is also the largest, such as when doing development, design of the table, is not a process data model to establish it? (Modeling). The description is accurate Wikipedia: data model (Data Model) abstract data characteristics. Data (Data) is a descriptor record things, the model (Model) is an abstraction of the real world. Abstract level from the data model describes static characteristics of the system, dynamic behavior and constraints, the information represents the operation of the database system provides an abstract framework. Content data model described in three parts: a data structure, data manipulation and data constraints. Say this concept, it seems very clear, but when a high force grid interviewer questions, your data model is kind of how? Your answer may not necessarily have to come up, in fact, is to ask how your data is abstracted from, how they are between the association and have their own characteristics. As if saying plainly, it seemed forced low grid, embarrassed.

 

  java object model? According to routine data model, you can also describe this issue. 1. What constitutes? There is the general direction of the object instance data + header + aligned filling composition, more we need to describe the object header contents, such _mark, _metadata, runtime data associated with the lock object is stored in _mark head, and the contents _mark is not fixed, it will be different according to different storage lock status information, mainly contains GC generational age, lock status flag, hash code, epoch and other information; 2. What do the operation? Examples of information data are stored in the stack, indicated by the pointer of the object header in which it is.

 

  Development model? It is accurate to say that a management class model, the very image: waterfall model; rapid prototyping model; incremental model; spiral model; evolution model. . . This model may be more in line with the concept of white in the eyes of it!

 

  There are other interesting models, let us wait and see!

 

Nag: depth-first.

  

Guess you like

Origin www.cnblogs.com/yougewe/p/11442381.html