Remember a conversation with Ali a director of the thought: Talk about your frame design ideas and advantages of the bright spot!

Source: Internet
Author: User
Tags website performance

Background:

Shortly before, with a technical director of Ali, he asked the question: "What are the design ideas and advantages of your framework?"

In other words, this problem, 5 years ago, has always appeared in front of the eyes, but I have never seriously found the answer to it!

So, deep in the night, I lay on the bed, with a notebook, while thinking, while typing, try to find!

Over the years, my frame or work has nearly reached 12, each of which can be said to be a few days apart.

But if the time is only half an hour, how can I introduce it? What do you introduce?

There are three frames that appear in your mind: Cyq.data, ASP. Aries, Taurus.mvc.

Probably because the recent energy is above it (if I spent my energy on qblog).

Tell me about your frame design idea?

Design ideas for the framework? Which frame? I'll pick one myself?

If you want to speak Aries or Taurus, you must speak Cyq.data, because they are based on the existence of Cyq.data.

So the question becomes the answer: Tell me about your cyq.data frame design idea?

I feel very difficult to answer this question, I can feel a trace of resistance to this problem of the idea?

The framework is a long period of evolutionary refactoring, and the earliest ideas are this:

Constructs a simple mdatatable system, passes in a table name, gets the table structure according to the database link, then constructs the SQL statement execution according to the row column, the data reads to the mdatatable returns.

The above sentence summarizes the earliest ideas, but no design, simple and not bright.

If you want to talk about the latest version of the design ideas, I can not think how to express, because the number of refactoring too many, hundreds of thousands of times, too much detail, each detail is independent with its own design thinking.

Just like Tencent the earliest also only QQ sends a message, now develops to the ecology circle, you say how people design the present empire?

maybe, just doing it, that's the answer. Well, the design idea can not answer, then tell me about the framework of the bright spot?

I took a go, again this question, a deep inside my heart left scars.

I once wrote an article in the power of the primitive, to introduce the advantages of the framework, but I do not remember now!

Can only forget the article, re-ponder:

1: The framework supports multiple databases. (Narrator: Frameworks that support multiple databases are everywhere.)

2: Well, the focus framework can move data from one database to any database (narrator: There are too few scenes in the project that need to mix the databases, this function doesn't feel much)

Think again:

1: The framework's cache integrates Memcache, Redis (narrator: Isn't it easy to integrate?) )

2: Well, but the client does not refer to the third party, are written by themselves, JSON parsing is written by themselves (narrator: can only say that the technology is good, but the function is not a bright spot)

Think again:

1: The framework implements automatic caching. (Narrator: What's special about caching, Hibernate has a level two cache, what's the difference?) )

2: Well, Hibernate's level two cache does not automatically fail because its invalidation policy is not able to handle custom SQL statements (Narrator: How do you control it?) )

3: Well, I did it by parsing the executed SQL statement, getting the table associated with the statement, controlled by the dimension of the table (Narrator: That doesn't create a lot of cache invalidation issues?). Table changes everywhere, can control the line? )

4: No, but you can control the column, well, so I also designed to specify which fields are ignored for updates that do not trigger cache invalidation, or you can specify which tables do not require caching (narrator: How do you control cache invalidation at the application level, if not at the SQL level?). )

5: In the business code control it? or unified control through AOP? (Narrator: Not the answer I wanted)

6: The database can also trigger cache invalidation, MSSQL has to provide cache dependency (narrator: How to implement it?) )

7: Microsoft's direct tune is good, the specific principle is to use the trigger to write the modified data to the specified table, and then through the Timer sweep table. (Narrator: It's not the answer I want, is there any other answer?) )

8: No, you say (narrator: It seems to have said before, now can't remember, tell me about the bright spot of your Aries frame)

Half an hour is almost there, and the highlights are still not felt.

Aries's highlights? I haven't recovered the power of the primitive. And then write a framework of the advantages of it, how to introduce?

1: Well, the framework is to pass a table name, you can automatically generate additions and deletions to import and export, but also customize a set of simple front-end syntax, combined with the backend is easy to develop (narrator: Do not know what you say, or chat about the other bar ...)

-------------------re-think, if only half an hour, how to introduce the framework-----------------

Description: Highlights of Cyq.data

Think for 1 days and discover the highlights feature too: Metadata caching, AOP, UI interaction, debugging, template engine, JSON tools, DB tools, distributed cache, batch, memory table, text database, anti-SQL injection, multi-database conversion, and more.

If an introduction and talk about its technical details, ten years of results, say three days and three nights is not finished!

But if time is limited and only three can be spoken, then I have to summarize it in an abstract.

After repeated thinking, ignoring people have my excellent, only choose people without my angle, summed up three core:

1: Auto cache: Anti-concurrency.

For small to medium-sized projects, automatically solve anti-concurrency problems, improve website performance, simplify code, and streamline the architecture!

For complex businesses with large, high-concurrency large data volumes, the cache still needs to refine the control hit ratio further.

2: Horizontal expansion: 0 encoding.

A: A single kind of database is extended to multiple kinds of databases.

B: The single-machine cache is extended to the distributed cache.

C: Single database extended to the cluster database (read/write separation).

All you need is a simple append configuration.

3: Data structure: Free turn.

A:json, XML, entity classes: can be mutually transferred.

B: Generics, dictionaries, collections, and Class A: Can be turned on each other.

C: Database tables and Class A, Class B: can be mutually transferred.

Feel this abstract summary, it should be half an hour to introduce the focus, ha

As for the constellation 12 Palace Frame: ASP. Aries (Aries), Taurus.mvc (Taurus), and the third constellation Gemini in the rewrite. Workflow (Gemini).

How to abstract its introduction, need a few more nights to think about me

Summarize:

Through this thought, I realized two problems:

1: Once thought good works, does not need to tell the user how good, uses the nature to know fortunately where.

First naïve assumption of the user first will use, and then assume that the user will be word of mouth.

2: Once thought experienced can hold everything, free to play.

For frequently occurring problems or scenarios, instead of randomly generating answers each time, it is better to summarize a better fixed answer than deep thinking.

Finally, what does it feel like to have little friends who have used frames?

Remember a conversation with Ali a director of the thought: Talk about your frame design ideas and advantages of the bright spot!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.