Object-oriented + distributed computing = direction of software architecture

Source: Internet
Author: User
Keywords And that is distributed computing
Tags application application server application servers business business computing business objects cache caching

"Cloud" is not only a metaphor for those networked computers, but also a computational process of data that is hidden from the server as you need it, carving out the one you need from the big cloud. It's a very romantic metaphor.

Cloud computing is an emerging business computing model. Using high-speed Internet transmission capabilities, data processing is moved from personal computers or servers to computer clusters on the Internet. These computers are common industrial standard servers, managed by a large data processing center, and data Centers allocate computing resources to the needs of customers to achieve the same results as supercomputers.

So, conceptually, cloud computing is a kind of distributed computing, which has great potential and superiority in comparison with traditional database center computing model.

The computational model of the so-called Database center, is the software system processing capacity and load mainly concentrated in one or two database servers, if you want to improve computing processing capacity, can only continuously improve the database server hardware level, from ordinary dual-core multi-core pc to minicomputer, until the medium and super computers, with the processing capacity, The construction cost of the system is also more and more high, finally, enjoy the supercomputing ability no longer become the rights of ordinary people, and become the nobility and special defense domain patent, and become a national display computer power a symbol.

In fact, perhaps we have embarked on a wrong direction, if Google chose this centralized supercomputing mode, then perhaps there is no ordinary people can enjoy the convenient and inexpensive search service, using search has become my 8-year-old son basic tools, he learned Chinese characters, They will use these characters to find the games that they want to play in Google, and the search and Chinese characters have been incorporated into the blood of our next generation, thanks to the shift in computational thinking: Distributed computing cloud computing.

In the Java realm, since the day EJB was born, the beginning of the distributed computing revolution has been announced, and the most important value of EJB is that it is no longer difficult and complicated to develop a software system with distributed computing patterns. Now that the cloud computing model is more SOA and we services, look at the following IBM Blue Cloud architecture, a base core is Ejb/soa server WebSphere.

With so many distributed computations, what does it matter with object-oriented oo design thinking? The two are in the same vein, I've been talking about this in the Jdon.com forum for years: Just imagine: distributed computing processes data, only data is wrapped in object objects, and objects are running in the application server's memory, so that the entire compute load will be concentrated on these application servers, and then we can set up multiple application servers for distribution calculation; If the data is is packaged in the datasheet, is only run in the database server, that can only take the development of centralized host.

A journey, a start, a fashion Revolution cloud computing seems to have nothing to do with us, in fact its direction began in our most basic programming design, only we set up OO programming ideas, our business data use object this container encapsulation, in the future can enjoy the benefits of distributed cloud computing, Otherwise can only be overturned to redesign, this also shows: the pursuit of software scalability and scalability of the modern software is the soul.

When you use Evans DDD to refine your requirements, you get a lot of the business objects of your system, so how do you make these business objects run in a distributed way on your computer: There are two routes in the Java World for Cluster distributed cluster Computing:

1. EJB or SOA route. IBM's Blue Cloud product is trying to take this path, you choose IBM as a product provider, like buying a Japanese car, comfort, control and space interiors, and the appearance of the medium, the various indicators are very moderate, oo is a little bit but almost; distributed performance is a little bit but almost ; it's a little bit of a distributed transaction, but it's almost, so if you're just a general business application project, Ejb/soa may be a choice, and that's one reason Japanese cars sell well.

The Ejb/soa premise is that you must first separate your business objects and business services from the SQL statements of the database, otherwise, you provide the SOA service is the SQL statement services, the actual database storage services, there is a view that cloud computing is the extension of cloud storage, I disagree, People with this view are actually the extension of the central thinking of the database, do they think that distributed processing is to run separate SQL statements containing business content?

This ignores an important concept: objects, you must separate business logic from your SQL statements, to form business pairs, and then through the distribution of object caching or services to truly implement distributed computing or cloud computing. So we have to start with the internal mechanisms that ejb/soa these off-the-shelf solutions, and that's the second route.

2. Distributed computing custom DIY route: Google goes this way, the German-American car Fox is very popular, because of its maneuverability and 5-Star security (interior is almost poor), which means we also began to choose some personalized products, like Sichuan is so spicy, but in the country are very popular, so, With the distributed cloud computing route, we can also personalize our own architectural route: if you are only looking for high computing performance, and do not care about the security and stability of the calculation (this is also very important, otherwise it will be easy to happen ATM vomit the event: The malicious money case is Chinese software sorrow), then I choose the distributed caching.

Now that ORM persistence schemes such as Hibernate are popular, it not only makes our software more natural, it overcomes the contradictions between objects and relational databases, it also provides caching support for these persistent objects, including tier one and level two caching, These two features almost become the essential features of ORM or other persistence layer frameworks such as hibernate. It also verifies that only oo+ object caching is a perfect architecture. Hibernate can support a variety of caching products, including JBoss cache, Ehcache, and terracotta, which can be seamlessly extended to the distributed cache run mode.

In this way, the data is wrapped in the object, objects are stored in cache caches because they are not simple data wrappers, they are business model objects, have important business implications, such as order objects, product objects, and so on, these objects are the data cores of your business system and are often accessed, And these business objects are cached in the object cache, it is no doubt that the object cache hit rate is very high, which is equivalent to the optimized cache, certainly than the database itself is not optimized for the specific project cache. More importantly, because the object cache is in the application server, we block the entire system's running load on the application server through the object cache and various service and business calculations, then we take these business objects to other computer memory through distributed caching, This is the nature of distributed cloud computing.

To sum up: if the distributed cloud computing is a common people to the bright future of the broad road, then how to enter this way? And what kind of driving tools to choose? is undoubtedly related to each of our programmer's professional quality and level. It is clear that OO analysis design programming is a fundamental requirement, (OO + distributed computing) = The direction of the software architecture.

Related Article

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.