What is ace? Why is it a powerful tool for developing game servers?

Source: Internet
Author: User

Text/Jiang Tao

 

The full name of ACE isTHeADaptive CommunicationENvironment, which means "adaptive communication environment" in Chinese. It is an open-source object-oriented framework ). ACE provides a set of C ++ packaging classes and a powerful application framework, which facilitates the development of servers for various network applications. Of course, Ace is also very suitable for the development of game servers.

To better understand the definition of ACE, Let's first look at what framework is ):

If the framework is used to explain what it is, it may be confusing and difficult to understand. from another perspective, this is the process of People's cognition of "code reuse. First, we need to have a consensus with you,The higher the code reusability, the greater the value it has..

What is the most primitive code reuse? This is simple, that is, copy and paste it in the source code.

The limitations of this reuse are too great. Next we will have sub-processes and functions, and then we will have a function library. library functions are a major feature of C language.

With the increasing strength of hardware, people have higher and higher expectations for software products, while the process of software development is stagnant. In this conflict, a software crisis occurs, so people begin to think about it. Object-oriented is the best product of people's thoughts. As a result, software reuse enters a new level, that is, class library-based functions.

Object-oriented has always been high hopes. However, in this world, there is no panacea (Magic Bullet), So when developers think of reusable components and think they want construction workers to pile different bricks into high-rise buildings, they find the glue code between different objects (Glue code) Is more difficult to write than the component itself, making it more error-prone. What should I do? Framework )! This requires a framework. The code reuse process is still being promoted (I will introduce it later ).

Ace is the framework. She is not only a bunch of class libraries, but also better than class libraries for code reuse.

The development of code reuse is as follows:

Copy and paste --> library function-> class library-> framework-> (???) -> (???) ->

Therefore, whether or not you write a network program, Ace is also a good learning example. In other words, Ace source code can be supplemented!

 

Let's look at network service applications. Why does ace be a powerful tool for game server development?

Whether you have written a network program or not, there are some facts that need to be agreed:

1. The network environment is complex. The same system is usually composed of different network devices, the services of different periods (the best at the time), and sometimes different operating systems.

2. Different types of services require different features. For example, a game's online user management service requires a single machine to provide more user access data. For example, a monitoring and control service requires that the system's response time and latency be small; for example, the file download and update service requires the maximum throughput. These features conflict with each other. Therefore, there is no single solution that can solve all problems.

3. networked applications are more complex than stand-alone applications. Writing network programs faces two challenges. One is the inherent challenge, that is, no matter how small the service is, it will face

A) how to select appropriate communication mechanisms and protocols and apply them effectively;

B) how to design network services to use computer resources and reduce future maintenance costs;

C) how to design an effective concurrency mechanism to make the system predictable, reliable, and high-performance;

D) how to deploy and configure the service to maximize service availability and flexibility.

The other is occasional challenges:

E) Operating System native APIs are often lack of type security, unportable, and poor scalability;

F) non-directed objects use the idea of algorithm decomposition (algorithmic decomposition), which often makes the service difficult to maintain and expand;

H) Some people say we develop our own web development kit. However, this repetitive discovery and discovery makes the development cycle and cost a great waste.

 

You may ask, as you have said so much, what functions and advantages does ace provide? Well asked, ACE provides a solution to all problems encountered when writing network programs, so that you do not have to start over. These functions include:

1. Separate network events and dispatch them to the event processor;

2. Signal processing;

3. Service initialization;

4. inter-process communication;

5. Shared Memory Management;

6. Message Processing

7. Dynamic (re) configuration of distributed services

8. Concurrent Service Execution and Synchronization

Use ace to enable your network service:

1) Better portability;

2) Better Software Quality

3) more efficient and predictable

4) easier transfer to higher-level standard Middleware

Where can I download ace?

The official website of ACE is

Http://www.cs.wustl.edu /~ Schmidt/ace.html

Ace is open-source and its source code can be freely downloaded. The current version is 5.7.2, which is

HTTP FTP

After downloading the SDK, You need to compile it yourself. For how to compile, see building and installing.

 

Many netizens have responded that Ace is too big to learn.

Oh, yes. Ace is not a joke. Ace has experienced more than a decade of development and has a long history than windows. She includes many development network applications and supports almost all mainstream operating systems and compilers. Ace contains the wisdom of a few contributors. Learning ace requires a certain degree of foundation, and the learners need to cultivate their meditation.

 

If you want to learn ace, please contact me.

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.