1. Trang chủ
  2. » Giáo Dục - Đào Tạo

(LUẬN văn THẠC sĩ) les abstractions de communication dans les jeux en réseaux mobiles

69 3 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Les Abstractions de Communication dans les Jeux en Réseaux Mobiles
Tác giả Le Van Tuan
Người hướng dẫn Antoine Beugnard
Trường học Ecole National Supérieur des Télécommunications de Bretagne
Chuyên ngành Informatique
Thể loại thesis
Năm xuất bản 2004
Thành phố France
Định dạng
Số trang 69
Dung lượng 1,57 MB

Cấu trúc

  • Introduction

    • Contexte du stage

    • L'objectif du stage

    • Le Médium et le processus de réification d'Abstractions de Communication

    • Organisation du document

  • État de l'Art

    • Les types des jeux en ligne

    • Architecture

      • Topologie de réseau

        • Client-Serveur

        • Pair-à-Pair

        • Hybride

      • Architecture logiciel

        • Intergiciel

        • Modèle Publish/Subscribe

    • Verrous techniques

      • La latence dans les jeux en ligne

      • Synchronisation et consistance

        • Dead reckoning - DR

        • Bucket Synchronization avec DR (BS) et Stop-and-wait Synchronization (SWS)

        • Time Warp Synchronization (TWS) et Trailing State Synchronization (TSS)

    • Les plates-formes existantes

      • Continuum

      • TerraPlay

      • ButterFly

    • Conclusion

  • Environnements mobiles et Modèle de Communication

    • Infrastructure Mobile

      • Réseau sans fils

      • Architecture des réseaux WLANs

      • Modèle de calculs mobiles

      • Caractéristiques des environnements mobiles

    • Le modèle Publish/Subscribe

      • Les éléments dans un système publish/subscribe

      • Modèle de souscription

        • Modèle basé sur sujet

        • Modèle basé sur contenu

        • Modèle basé sur type

      • Architecture du système

        • Topologie hiérarchique

        • Architecture pair-à-pair

        • Architecture hybride

    • Spécification abstrait du médium PublishSubscribeMedium

      • Description informelle et listes des services

      • Diagramme de collaboration du médium Publish/Subscribe

      • Spécification OCL

    • Conclusion

  • Processus de raffinement

    • Première étape : introduction des gestionnaires de rôle

    • Deuxième étape : Choix de conception

      • Gestion centralisée des souscriptions

        • Diagramme de collaboration

      • Gestion distribuée des souscription

        • Algorithme de routage

        • Diagramme de collaboration

        • Spécification OCL

  • Conclusion

  • Annexe 1 : Spécification OCL des services après la première étape

  • Annexe 2 : Spécification OCL des services du médium, version centralisée

  • Annexe 3 : Discussion supplémentaire sur la table de routage

  • Bibliographie

Nội dung

Contexte du stage

Today, mobile and wireless devices are ubiquitous, with numerous applications, and entertainment is poised to be a major feature of future mobile networks Currently, most mobile games are single-player, while online multiplayer games are limited to a few hundred players at most This article focuses on mobile massively multiplayer games that can support thousands or even tens of thousands of players To streamline the development of multiplayer games, there is a need for a software infrastructure (middleware) that addresses network communication, data management, and scalability issues, allowing game developers to concentrate on their core expertise—game design The Mega project, involving CEDRIC-CNAM, ENST, ENST Bretagne, France Telecom R&D, INT, and UBS, aims to define such an infrastructure As the project has just begun, a comprehensive review of existing middleware offerings (such as Butterfly, Continuum, and Terraplay) is essential, with the goal of establishing a standard for the concepts provided, which currently does not exist.

L’objectif du stage

Le travail sera, dans un premier temps, la r´ealisation d’un ´etat de l’art sur la commu- nication des plateformes intergiciels existantes.

The subsequent internship will highlight and specify the necessary communication abstractions for this type of application The specifications will reveal functional aspects, such as causality and equity, as well as non-functional aspects, including robustness and efficiency, described with precision.

Le M´ edium et le processus de r´ eification d’Abstractions de Communication 8

In a distributed system, components exchange or share necessary information through communication components, referred to as mediums by Antoine Beugnard and Eric Cariou A medium is defined as a software component that facilitates communication or interaction by implementing a communication abstraction, such as a consensus protocol This article will explore the verification of communication abstractions in mobile network games, following the process proposed by Beugnard and Cariou This process transforms communication abstractions from the most abstract design level into software components, ensuring the unity and coherence of the interaction abstraction throughout the entire application development cycle.

The first step in this process is to identify the services that a component offers to other components, as well as the services required by the medium to function This ensures that the communication between software entities is abstracted, keeping the details hidden rather than vague or poorly defined At this stage, the medium is viewed as a single entity within the system The subsequent refinement process involves transforming this abstract specification into various implementation variants based on the context of use, while continuously adhering to the usage contract established at the most abstract level This contract is referred to as the realization contract in UML Component terminology There are three key steps in the process of reifying abstractions.

The introduction of role managers marks the initial step in the refinement process, aiming to identify the various types of role managers that constitute the medium during deployment.

– Choix de conception : le r´esultat de cette ´etape est une sp´ecification d’impl´ementa- tion.

– Choix de d´eploiement : il s’agit de d´efinir l’architecture de d´eploiement des gestion- naires du m´edium.

Throughout this process, UML collaboration diagrams are utilized to illustrate the structural aspects of the medium, highlighting its semantics and the dynamic behavior of each service at the specification level In the final stage, deployment diagrams are employed for each defined deployment type Additionally, OCL constraints and state diagrams are also used to enhance the overall representation.

Reification is the process of transforming abstract concepts into tangible forms This approach aims to provide a clearer specification of the medium During the internship, we will focus solely on the initial two stages of this transformation.

Organisation du document

Chapter 2 provides an overview of the current state of multiplayer games, discussing the technical challenges involved in implementing massively multiplayer online games From this discussion, we have identified the Publish/Subscribe communication model as the most suitable for mobile multiplayer gaming Chapter 3 describes this communication model with an abstract specification, while Chapter 4 details the process of realizing the communication abstractions of the Publish/Subscribe model The final chapter concludes the document.

Video games play a significant role in the industrial computing sector, generating millions of dollars annually in Japan and even more in the United States With the rapid growth of the Internet, online gaming is expected to become a fast-growing segment of the video game industry in the coming years However, for future online games to accurately simulate reality, they must support real-time interactions among competitors This chapter first outlines the current state of online gaming and the challenges developers face in creating such applications It also discusses the architectures on which these games are built Finally, as the Mega project aims to develop a platform for massively multiplayer online games, it touches on platforms like TerraPlay, Continuum, and Butterfly, while noting that communication security is not covered in this chapter.

Les types des jeux en ligne

With more powerful processors and new 3D accelerators, video games are becoming increasingly sophisticated and realistic, captivating players not only through multimedia aspects but also by immersing them in virtual worlds where they can compete against opponents from around the globe This evolution significantly alters player habits, as they now prefer vast virtual battlegrounds with numerous participants worldwide However, current online games are limited to a few hundred players at most, and the challenge of scaling up to accommodate larger numbers remains a major hurdle for this type of application.

The adaptability to an increasing number of participants in online games largely depends on the game's nature For instance, real-time action games with a pure client-server architecture currently cannot support more than a few hundred players due to Internet limitations According to Wikipedia, there are four main classes of online games: First-person shooters (FPS), Massive Multiplayer Online Role-Playing Games (MMORPG), turn-based games, and real-time strategy (RTS) games.

First-person shooter (FPS) games are a genre that merges video game action with a perspective that simulates the character's viewpoint Notable titles in this category include Doom, Quake, and Half-Life These online games create a real-time virtual world where players' actions must be instantly reflected for all competitors, regardless of their geographical location Currently, FPS games typically accommodate a limited number of players, usually up to a few dozen.

MMORPGs, or Massively Multiplayer Online Role-Playing Games, are persistent virtual worlds accessible via the Internet, allowing players to interact through avatars, which are graphical representations of their characters Unlike earlier games, MMORPGs do not require strict interactivity; however, they typically support a player base of only a few hundred at most Notable examples of MMORPGs include Dragon Empires, EverQuest, EverQuest II, Warring Factions, World of Warcraft, and World War II Online.

Turn-based : Sid Meier’s Civilization, Heroes of Might and Magic, Chess,

Go, Othello, Risk, and Diplomacy are turn-based strategy (TBS) games where players take turns making decisions or controlling characters Each round concludes once all players have completed their turns In online versions of these games, the number of participants is not restricted by network communication, as a delay in the transmission of new states is acceptable for competitors.

Real-Time Strategy (RTS) games differ from traditional turn-based games by allowing gameplay to progress in real-time, creating a continuous experience Notable examples of RTS games include Microsoft's Age of Empires and Empires: Rise of the Modern World, with The Ancient Art of War by Evryware being the first RTS title Popular RTS games such as Warcraft, Empire Earth, Command and Conquer, Total Annihilation, and StarCraft involve players following three main steps: building a base infrastructure, collecting resources, and attacking enemies to destroy their strongholds and seize their resources As the game progresses, network communication demands increase significantly, similar to first-person shooters, but players can engage multiple enemies while simultaneously defending against attacks Massively Multiplayer Online Real-Time Strategy (MMORTS) games, like Shattered Galaxy and Mankind, merge the elements of MMO gaming with RTS mechanics.

The challenge of scaling in online gaming arises from the inherently heterogeneous nature of the Internet, which often fails to ensure low latency This inconsistency can disrupt gameplay, particularly when players are competing in real-time scenarios.

In a game scenario, it is impossible for Player A to believe they have eliminated Player B while Player B simultaneously thinks they have defeated Player A Such contradictions during gameplay indicate a lack of proper synchronization within the game.

High latency and the resulting incoherence are significant barriers that must be overcome for the next generation of massively multiplayer online games to transition to realistic virtual worlds Recent studies emphasize the importance of network communication and synchronization An effective mechanism is sought that intelligently minimizes network traffic by only sending necessary information to interested parties Additionally, research on synchronization techniques such as bucket synchronization, stop-and-wait, and dead reckoning is conducted to prevent game inconsistencies caused by lost or delayed messages over the Internet This chapter will present current techniques for implementing multiplayer games while considering the abstraction level we aim to achieve.

Architecture

Topologie de r´ eseau

The two most common network topologies for building games are client-server and peer-to-peer The client-server model is conceptually simpler and easier to implement compared to the peer-to-peer architecture.

In client-server games, players connect to a central machine known as the server, which is responsible for maintaining the overall state of the game The server periodically collects local information from each client, calculates the new global state, and distributes updates back to the clients This requires a specialized machine for the server, which can be costly Clients are essentially considered as end terminals The client-server model is inherently decoupled; in some cases, the server may reside on the player's machine, referred to as a local server or listening server.

The advantages of this architecture for online gaming lie in its ability to effectively prevent cheating by centralizing game state calculations on the server This ensures complete game consistency, allowing clients to focus solely on rendering the graphics of the simulated worlds provided by the server However, as the number of participants increases, the server can quickly become a system bottleneck for two main reasons.

At scale, all data converges on the server, leading to increased latency since the data must pass through the server before reaching other destinations.

Fragile aux fautes : dans tel syst`eme centralis´e, le serveur est un point sensible aux fautes Si tout `a coup, le serveur tombe en panne, le syst`eme est inutilisable.

In this type of game, players communicate directly with each other to gather information and assess the current state of play Their machines are programmed to calculate game outcomes, make decisions, and access databases Consequently, this setup presents opportunities for cheaters to interfere with the game and alter results.

Direct communication between clients eliminates the need for a server, significantly reducing latency However, similar to client-server architecture games, scalability remains an issue Each client must send local information to others and gather their states for updates, resulting in the same volume of data transmission as in client-server models Additionally, addressing game inconsistencies becomes more challenging, as administrative control is no longer centralized as it is in client-server systems.

In practice, a pure client-server or peer-to-peer system is rarely implemented; instead, a hybrid system is adopted This system utilizes a client-server architecture for network topology, distributing the load among clients rather than centralizing it on the server Clients can control their own movements and report their positions to the server, which moderates these movements as necessary Essentially, the server acts as an arbitrator, assessing the overall game state and intervening with a synchronization algorithm in case of contradictions While this approach significantly reduces the server's workload, it still presents security challenges.

A Mirrored Server system involves multiple servers that collectively function as a single entity from an external perspective This configuration eliminates the single point of failure, allowing clients to interact seamlessly as if there were only one server Internally, servers communicate directly in a peer-to-peer manner, enhancing network latency while maintaining centralized administration However, implementing such a system is complex, requiring sophisticated protocols for communication between servers and clients to ensure game consistency.

Architecture logiciel

Middleware, often referred to as intergiciel in French, is a type of software that acts as an intermediary between different components that may not operate on the same operating systems or be written in the same programming languages In the gaming industry, middleware aims to streamline the development process for game developers by providing a robust suite of software tools, including graphics models, textures, animations, and network communication By utilizing middleware, game developers can focus on their core competencies without getting sidetracked by technical challenges As noted in Middleware FAQs, "Middleware is the intersection of the stuff that network engineers don’t want to do with the stuff that applications developers don’t want to do." Notable examples of middleware platforms that support massively multiplayer online games include TerraPlay, Continuum, and Quazal.

The Publish/Subscribe model is a recently implemented communication framework in multiplayer games In this model, recipients only receive messages of interest, while senders, known as publishers, broadcast messages without needing to know the specific recipients To facilitate this, publishers transmit messages to a communication component, where recipients, referred to as subscribers, register to receive relevant messages Message delivery can occur in a push-based manner, enhancing the efficiency of communication in gaming environments.

In push-based mode, messages are automatically sent to all subscribers, ensuring immediate delivery In contrast, pull-based mode requires subscribers to actively retrieve messages, allowing for more control over the information they receive.

Implementations of the publisher/subscriber model in real systems can vary, but they generally fall into two main categories: (1) subject-based and (2) content-based.

The first category organizes communication channels, also known as communication networks, through which a set of messages is transmitted under predefined conditions Publishers disseminate messages by selecting appropriate channels, ensuring that only messages relevant to a channel's topic are placed within it Meanwhile, subscribers register for channels that interest them and subsequently receive all messages transmitted through those channels.

In a content-based model, the concept of channels is eliminated, allowing subscribers to express their preferences for the type of messages they wish to receive, typically through a request This communication method offers greater flexibility, as subscribers are not limited to pre-existing channels However, implementing this model is more complex, requiring the development of a matching function to accurately pair messages from publishers with the appropriate subscribers Consequently, topic-based algorithms are easier to implement compared to content-based ones.

Verrous techniques

La latence dans les jeux en ligne

In a client-server system, players' machines are allowed to simulate the game world in a synchronized manner Ideally, all simulations across client machines should be nearly identical at any given moment However, latency can cause a player's action, known as an event, to not be represented in real-time on other machines This results in inter-coherence being disrupted For instance, in a multiplayer game, when Player A begins to move at time t1, the message is sent to the server but arrives later at time t2 At this moment, the server updates Player A's state, but this state is already behind A's actual position Consequently, when the server notifies all clients that A has started to move, each participant, including A, receives this message at time t3, leaving all clients still lagging behind the server due to latency.

Fig 2.2 – L’effet de la latence

Le dictionnaire Webop´edia [10] donne une d´efinition de la latence :

Latency refers to the time a component in a system waits for another component, essentially representing wasted time For instance, in data access on a disk, latency is defined as the duration required to position the correct sector under the read/write head.

In networking, latency refers to the time it takes for a packet to travel from the source to its destination Together, latency and bandwidth determine the speed and capacity of a network.

In multiplayer games, latency refers to the time delay between a player's action and its representation on another player's device, encompassing the time taken for data to be sent and received Reducing latency is essential for enhancing game coherence There are three potential sources of latency in online games related to network infrastructure.

Network protocol latency refers to the time it takes for a system to place data onto the physical network and retrieve it This includes any additional time required for encrypting and decrypting the data, which can further increase latency.

Transmission latency refers to the time taken to send data across a network to the receiver As mentioned earlier, games utilizing a client-server topology experience higher latencies compared to those with a peer-to-peer architecture This is because messages must route through the server rather than being sent directly from senders to recipients.

Latence de traitement : c’est le temps que l’application met elle-mˆeme `a manipuler les donn´ees lors de l’envoi et lors de la r´eception.

The question arises: what measures can be taken to reduce latency when it is impossible to transmit information through networks at speeds equal to or greater than the speed of light?

Synchronisation et consistance

The previous example illustrates that due to latency, Player A's screen displays different information than what other players see, highlighting the critical importance of synchronization in a distributed gaming context This synchronization is essential to maintain game coherence Continuing with the same example, after receiving a message from the server indicating their new position, Player A will attempt to reconcile the discrepancy between the server's message and their current state by adjusting their character accordingly.

In multiplayer gaming, players often experience choppy movements due to a synchronization technique known as Local Presentation Delay, which is one of the simplest synchronization methods This effect can be mitigated by combining it with another technique that delays the player's screen display However, these methods are inadequate for more advanced applications that require complex synchronization techniques This section will discuss several widely implemented mechanisms in games such as MiMaze and Quake.

Dead reckoning is a technique used in aerial systems to estimate an aircraft's current position based on its past location and trajectory This method is also applied in multiplayer games to reduce latency for players, enhancing their overall experience.

Jitter, a variant of latency, causes screen flickering and can be triggered by various hardware issues, including a low refresh rate, monitor malfunctions, or poor synchronization of transmitted signals To mitigate message loss, it is essential to pre-select a set of algorithms that all player nodes can use to predict entity behavior in the game, determining the optimal moments for the application to execute these algorithms In gaming, two common categories of dead reckoning (DR) are utilized: (1) position prediction, which forecasts the new position based on the current location and trajectory of an object, and (2) event prediction based on player inputs, where the expected input is used to calculate the object's new position.

To utilize Distributed Virtual Environments (DVE), entities such as a person, car, airplane, or ball are isolated and partitioned Each entity is managed by a single application within the DVE framework These applications are designed to predict how the state of their respective entities will evolve over time.

Applying Dead Reckoning (DR) as a synchronization mechanism can enhance gameplay fluidity by allowing player A's controller to predict their new position at time t2 and inform the server accordingly This proactive communication reduces latency when the server relays player A's updated position to others, resulting in smoother movements However, player actions are not always predictable, leading to potential issues if a player suddenly changes direction or speed Martin Mauve illustrates this unpredictability with two examples: "A Dead Man that Shoots" and others, highlighting the limitations of DR in dynamic gaming scenarios.

A Flying Tank (un tank volant).

The DR (Disaster Recovery) system is widely implemented in distributed systems for two main reasons: first, it allows for self-preparation, meaning that if a transmission is lost, it can be compensated by another state transmission for the same entity Second, it eliminates the need for centralized state management, as each application can locally manage its states through prediction and receipt of state updates.

2.3.2.2 Bucket Synchronization avec DR (BS) et Stop-and-wait Synchronization (SWS)

The fundamental concept of these techniques is to differentiate between real-time and game time, effectively discretizing time In gaming, time is perceived as a series of intervals, with the new state calculated only at the end of each interval Therefore, shorter intervals result in smoother movements within the game.

BS divides game time into series of constant intervals, during which a client gathers updates from others The collected messages, or events, are stored in a synchronization bucket All clients must wait until the end of the interval to compute the new game state, applying extrapolation algorithms for any lost or delayed messages (DR technique) This mechanism is utilized in the game MiMaze, which does not attempt to detect contradictions or recover from them, and may contain multiple events within a single bucket.

Only the most recent event is executed In the absence of any new event, the previous event is interpolated with the designated reference (DR) This describes the second technique utilized.

- SWS, les intervalles de temps peuvent ˆetre de taille variable selon le temps d’attente du client le plus lent.

In such systems, inconsistencies are eliminated as the order of generated events is effectively preserved However, synchronization techniques do not address latency issues for latency-sensitive games, such as first-person shooters (FPS) There is no way to ensure that the game progresses at a steady and consistent pace, or quickly enough for interactive gameplay Consequently, these mechanisms are unsuitable for games that require frequent updates, high consistency, and are highly sensitive to latency.

2.3.2.3 Time Warp Synchronization (TWS) et Trailing State Synchronization (TSS)

These mechanisms execute events as they occur, even if a prior event could have taken place They perform backward adjustments to rectify necessary inconsistencies.

In TWS, the state of all objects is saved at fixed time intervals before an event execution In the event of a rollback due to a detected contradiction, all events between the last save and the execution moment are re-executed However, this synchronization technique requires a significant amount of memory, as a checkpoint is necessary for each message, making it impractical.

Fig 2.3 – L’ex´ ecution du remorquage d’´ etat de synchronisation dans TSS (Quake)

The TSS algorithm is implemented in Quake, as illustrated in Figure 2.3 The game's global state is executed in parallel through trailing states with varying delays For instance, at time t, aside from the current state being executed, there is a trailing state simulating the game at time t - d1, and another at time t - d2, and so on In the event of detected inconsistencies, the algorithm copies one of the trailing states for re-execution.

Les plates-formes existantes

Continuum

Continuum is a crucial component of the European project Ping, aimed at establishing a dedicated infrastructure for online video games Its goal is to enable real-time interaction among thousands of players scattered across the globe.

Continuumvise involves the creation of a virtual world on the Internet, which consists of virtual objects known as entities A replica is essentially a reproduction of a unique entity The simulation of this virtual world may be partially or fully represented on a client machine, referred to as the simulation space, through the replicas of the entities involved An entity will be replicated in the simulation space if it affects other objects within that space Among the replicas of an entity, the master replica is understood as the original object, while the others are copies The master replica communicates with the others by adhering to a predetermined consistency policy, which serves as the communication mechanism.

Simulation spaces within the system are interconnected through synchronized communication channels, enabling each space to compute interactions between entities effectively.

The continuum is structured in distinct layers, with clear boundaries separating them Each layer is characterized by its own policies and mechanisms, which can be extended to meet the specific needs of applications The core describes a set of abstract components, each of which is only visible to others through its interfaces.

Communication between replicas representing an object occurs through events Once an event is generated, it is timestamped, which can later be utilized by synchronization mechanisms implemented within the application Synchronization algorithms can be easily integrated into the platform based on the application's specific characteristics.

The application encompasses simulated objects that hold specific information, including graphical models, behaviors, and interaction rules between entities.

Object management oversees the correction of manipulations within replica entities, including bookkeeping, lifecycle management, and garbage collection Event management provides synchronization services, ensuring causal order, buffering, and timestamping Aura management is responsible for filtering events based on the replication model, serving as the layer that routes events across the network.

Groupe de communication fournit divers services de communication

Supporte de r´eseau int´egration des protocoles r´eseau

Fig 2.4 – L’architecture en couche de Continuum

TerraPlay

TerraPlay is a high-quality platform designed to support real-time game developers across both fixed and mobile networks It operates through a network of servers responsible for managing and synchronizing games, rather than serving as a real-time data distribution center The TerraPlay system handles all game data copies and multicast operations Developers aiming to create games on this platform to utilize its communication services must develop two types of applications: a lobby server and a user application.

Fig 2.5 – Les composants dans un jeu construit sur TerraPlay

The lobby server is utilized by players to set up game session parameters, manage authentication, search for online competitors, and initiate gameplay.

Application d’utilisateur une instance de jeu sur la machine de joueur.

Les applications de jeu interagissent avec les APIs r´eseau de TerraPlay, qui font partie du syst`eme TerraPlay mais r´esident sur les machines des clients.

A gaming session typically begins in the server lobby, where players gather to obtain essential information needed to join the game.

– l’adresse de r´eseau de GAS (Game Access Server)

– le num´ero de port sur le serveur GAS

Fig 2.6 – Une architecture typique d’un jeu sur TerraPlay

Fig 2.7 –La communication dans syst` eme TerraPlay

TerraPlay offers three distinct mechanisms for client communication: stream object, basic object, and message for sending updates The first two mechanisms, stream object and basic object, closely align with the publisher/subscriber model, with the former based on topics and the latter on content.

Updates are only sent to clients who explicitly opt-in to receive them These messages are used to communicate information to a specific player or group of players, with clearly indicated recipient addresses The information shared is private and confidential Updates sent via stream objects can be timestamped using the system's time service However, in both stream and basic object modes, only the most recent update is considered.

ButterFly

ButterFly is a client-server virtual environment featuring multiple servers that utilize grid technology This platform supports massively multiplayer online games in real-time and offers a comprehensive suite of software tools to assist game developers in the development, testing, operation, and management of their games.

In ButterFly, the virtual space is divided into multiple regions, each assigned to a dedicated server These servers are fully meshed, meaning they are all interconnected through high-speed fiber optics This setup allows for over one million participants to play simultaneously.

Il y a deux faisceau de serveurs dans ButterFlycompos´es de 50 eServer xSeries de IBM plac´es `a IBM Sterling, VA et Los Angeles, avec quatre cat´egories (bas´e sur leur rˆole

` a l’int´erieur de la grille)

Game servers are predominantly found in each cluster and are primarily responsible for executing games within the grid Their key functions include mediating gameplay, enforcing rules stored on database servers, and facilitating interactions with other game servers These servers operate on Linux-based xSeries x330 hardware.

Gateway servers, also known as access servers, operate on xSeries x330 systems and play a crucial role in connecting players, or clients, to game servers They are responsible for protocol translation and facilitate player connections to the game servers.

Daemon controllers are AI servers operating on xSeries x330 hardware, designed to manage non-player characters and other game elements that are not directly influenced by player actions.

– Les serveurs de bases de donn´ees (Database servers) - sont responsables de stocker

A grid is a parallel and distributed system composed of hardware and software that facilitates the dynamic sharing, selection, and aggregation of autonomous resources These resources are geographically dispersed and are utilized based on their availability, capabilities, performance, cost, and the quality-of-service requirements of users during execution.

The ButterFly architecture integrates essential information, including physics, geometry, and game rules, to ensure persistence in the virtual world Databases hosted on xSeries x232 servers also manage accounting and authentication data while providing an interface for billing support functions.

Conclusion

Before a game is released, extensive work is required, particularly for massively multiplayer online games To succeed in the market, development time must be minimized Consequently, platforms have emerged to assist in the development of these applications By utilizing robust software suites for game construction, development times are shortened, allowing developers to focus on gameplay rather than network communication or physics modeling This internship is part of the Mega project, which aims to create a platform for massively multiplayer and mobile network games.

The internship project on "Communication Abstractions in Mobile Network Games" commenced two months ago, focusing on network communication aspects such as efficiency, robustness, low latency, and scalability within mobile networks This chapter aims to highlight the challenges that hinder online games from achieving the same success as those on a single machine or local network, with latency being a major recognized challenge The effects of latency can be effectively mitigated through synchronization mechanisms implemented in the aforementioned systems and through an intelligent communication strategy, which is the primary focus of this internship work.

An intelligent and efficient communication mechanism avoids unnecessary information transmission over the network For instance, sending an event to an object that is unaffected by it is redundant Network bandwidth can be conserved by communicating data only to the objects influenced by the event The responsibility of selecting the information to be sent lies with the game designers The middleware provides effective synchronization and communication mechanisms, ensuring low latency and fault tolerance The publish/subscribe communication model has been extensively studied in recent years and has been implemented in several platforms In this project, we will further explore this communication model, which appears to be the most suitable for these types of applications.

The influence zone of an object is defined as a circle centered at the object's position, with the radius representing the distance over which the object can exert its influence on others.

Environnements mobiles et Mod`ele de

In many massive multiplayer online games, communication often consumes significant network resources, primarily following a client/server paradigm In this model, clients share a single instance of the virtual world through a server, which processes and distributes events from all clients However, each participant only requires relevant events, specifically those that may influence them or be influenced by their actions This necessity for filtering increases network latency and highlights the inadequacies of the traditional client/server approach for large-scale distributed systems, particularly in mobile gaming Recently, the publish/subscribe system has gained attention in both literature and industry, as it dynamically routes and delivers events from sources to interested users without prior knowledge of their information needs This flexibility helps overcome the limitations of conventional client/server systems Initial implementations of the publish/subscribe model in multiplayer games have been limited to wired networks, leaving room for further exploration in mobile environments.

Dans ce chapitre, nous pr´esentons d’abord des caract´eristiques des environnements mobiles Ensuite nous nous concentrons sur les concepts de publish/subscribe.

Infrastructure Mobile

R´ eseau sans fils

A wireless network is a telecommunications or computer network that utilizes radio waves and infrared signals to transmit data, instead of traditional wired connections This technology enables users to remain connected while moving within a geographical area known as the coverage zone, which is why the term "mobility" is often associated with wireless telecommunications.

Wireless networks offer a significant advantage over traditional wired networks by easily connecting devices over distances ranging from a few meters to several kilometers The installation of wireless networks is notably simpler due to the absence of cable connections There are several categories of wireless networks based on coverage area, with Wireless Local Area Networks (WLAN) being the most recognized WLANs utilize radio waves to transmit signals, providing wireless connectivity to users within a building or campus Typically, these networks rely on high-speed wired connections for the backbone, and various competing technologies, such as Wi-Fi (IEEE 802.11x) and HomeRF (Home Radio Frequency), are currently available in the market.

A Wireless Personal Area Network (WPAN) is a type of short-range wireless network, typically operating within a range of a few dozen meters Common technologies used in WPANs include Bluetooth, IEEE 802.15, and ZigBee (also known as IEEE 802.15.4), as well as infrared connections These technologies facilitate seamless communication between devices in close proximity, making WPANs ideal for personal and localized networking applications.

– WWAN (Wireless Wide Area Network), le r´eseau ´etendu sans fils WWAN est un r´eseau t´el´ephonique mobile, ´egalement connu sous le nom der´eseau cellulaire mobile.

Wireless networks are the most widespread, as all mobile phones connect to an extensive wireless network The key technologies include GSM (Global System for Mobile Communication), GPRS (General Packet Radio Service), and UMTS (Universal Mobile Telecommunications System).

Architecture des r´ eseaux WLANs

The IEEE 802.11 standard (ISO/IEC 8802-11) defines the lower layers (physical and data link) of the OSI model for wireless communication using electromagnetic waves Initially, the term WiFi, short for Wireless Fidelity, was introduced by the Wireless Ethernet Compatibility Alliance (WECA) for certification purposes However, due to marketing practices, the term has become synonymous with the standard itself Therefore, a WiFi network is essentially one that complies with the 802.11 standard.

Le standard 802.11 d´efinit deux modes op´eratoires : (1) le mode `a point d’acc`es et (2) le mode ad hoc.

The access point mode allows wireless clients, known as mobile units or hosts, to connect to a base station (BS) to form a Basic Service Set (BSS) within a cell Multiple access points can be interconnected through a reliable, high-speed wired or wireless network to create an Extended Service Set (ESS) While overlapping between adjacent cells is possible, mobile units can only connect to one base station at a time The Handoff protocol enables these mobile units to maintain connectivity while moving seamlessly from one base station to another within the ESS, a feature known as roaming.

In ad-hoc mode, client machines connect directly to each other to form a point-to-point network without a central access point Each mobile unit functions both as a client and as an access point simultaneously To facilitate this, every node is equipped with a wireless communication adapter, enabling them to route incoming packets effectively.

Mod` ele de calculs mobiles

La figure 3.1 montre l’architecture g´en´erale d’une plate-forme mobile largement admise

The model features both mobile and stationary components, structured in a distributed architecture Reliable, high-speed wired networks connect computers, fixed hosts, and base stations, while only the mobile units serve as the mobile components.

In this model, fixed hosts are computers that are not initially equipped to connect with mobile units but can be configured to do so Base stations (BSs) facilitate communication with mobile units within a cell to support data access The mobile discipline necessitates unrestricted movement of mobile units within the geographical mobility domain, allowing for inter-cell movement.

Fig 3.1 – Mod` ele de calcul mobile

Caract´ eristiques des environnements mobiles

Designers of applications must consider the specific characteristics of wireless networks Applications should be flexible and capable of adapting to current execution conditions.

Mobile devices currently face resource limitations, including processor power, RAM size, storage capacity, and battery life The availability and quality of these resources fluctuate during use, necessitating that applications adapt their behavior accordingly For instance, an application might switch from a graphical mode to a text-based mode to conserve battery power.

Due to mobility and interference, wireless network bandwidth is highly variable and generally lower than that of wired networks To ensure a good quality of service, applications must dynamically adapt to the characteristics of wireless networks One example of this dynamic adaptation is reducing data volume, which can involve degrading quality, adjusting compression rates, or modifying video frame rates to align with network capabilities.

Frequent connections and disconnections are common in mobile devices as they aim to conserve battery life These devices may turn off or disconnect from the network for extended periods It is important for applications to recognize these frequent disconnections as a normal operating mode.

Le mod` ele Publish/Subscribe

Les ´ el´ ements dans un syst` eme publish/subscribe

Un syst`eme publish/subscribe se compose : (1) d’un service de notification (NS pour notification service en anglais) qui consiste en un ou plusieurs serveurs d’´ev´enement 1 , et

In a notification service, clients are categorized into two roles: publishers and subscribers Publishers generate and publish events to the notification service (NS), while subscribers provide a filter pattern upon subscribing This filter determines the criteria for the notifications they receive As long as they remain subscribed, they will receive notifications for new events that meet their specified filter conditions Notably, a client can simultaneously act as both a producer and a consumer of events.

The algorithm that determines whether an event matches a filter is implemented within the matching function The notification service manages and delivers received events using this matching function alongside a routing algorithm This process is commonly referred to in literature as the notification selection mechanism.

The application of the matching function and routing algorithm is crucial for dynamically routing events When an event is published by a producer, it triggers the selection mechanism.

Fig 3.2 –Mod` ele Publish/Subscribe de base

Figure 3.2 illustrates the fundamental model of a publish/subscribe system The event service is responsible for managing subscriber subscriptions and ensuring that events are accurately delivered only to those consumers who genuinely wish to receive them Regardless of the specific implementation of a publish/subscribe variant, the core functionality remains focused on efficient event distribution.

In literature and this report, various terms are used interchangeably, with the most common being event service, event brokers, and event dispatchers These systems must provide at least three key functions: subscribe(), unsubscribe(), and publish() The subscribe() operation is called by subscribers to register their interests, while the publish() operation is invoked by publishers when a new event occurs Subscribers must also implement the notify() operation to enable the event service to inform them of any new relevant events.

Ce mod`ele de communication et de coordination entre les participants repr´esente des caract´eristiques tr`es int´eressantes :

Firstly, the two interacting parties do not need to know each other, as the interaction space is decoupled by an event service that acts as an intermediary It is sufficient to specify the interests of the subscribers to this event service This arrangement enhances the system's flexibility and scalability, allowing new event consumers or producers to be easily added or removed without impacting others.

Fig 3.3 – d´ ecoupage de l’espace d’interaction dans un syst` eme Publish/Subscribe

Secondly, the communication within the system is asynchronous, which eliminates the drawbacks associated with synchronous communication systems In synchronous setups, such as client-server models, the client must remain blocked until the server's response is received, leading to inefficiencies.

Thirdly, it is not necessary for producers and consumers to be available at the same time After specifying their interests regarding events with the event service, a subscriber will receive all new corresponding events from publishers, including those publishers who join the system after the subscription.

Ultimately, the publish/subscribe model directly reflects the intrinsic behavior of event-driven applications, as communication is initiated by event producers This key characteristic makes the model an excellent choice for event-based systems.

By eliminating dependencies among participants in the interaction system, the publish/subscribe model becomes highly suitable and is often the preferred choice for large-scale event notification systems Implementing this model in a real-world system presents intriguing challenges, particularly in the area of notification preferences, which refers to how consumers express their subscriptions Selecting the appropriate subscription mechanism is arguably the most critical decision when developing a notification service.

Mod` ele de souscription

The expression of notification choice is vital for the flexibility of notification services, especially in large-scale systems where careful selection is essential due to the interdependence of expression and scalability Insufficient expression can lead to unnecessary subscriptions, overwhelming the network and necessitating additional filters In the worst-case scenario, if the notification selection mechanism fails to analyze an expression, all notifications may be delivered, imposing choices on the consumer Conversely, scalable implementations of more expressive filter models require more complex delivery strategies This article describes three common notification choice mechanisms: subject-based, content-based, and type-based.

3.2.2.1 Mod`ele bas´e sur sujet

At an abstract level, events from publishers are transmitted to subscribers through virtual channels, each represented by a keyword (topic) Publishers publish events associated with a channel, while subscribers register to receive notifications about new events In literature, the concepts of channel, topic, and group are often mixed The term "group" is used in the context of a communication group By joining a group, a subscriber becomes a member, and publishing an event to a group disseminates that event to all its members Therefore, the matching algorithm simply manages these groups.

The advantage of this subscription model is its simpler implementation compared to content-based models However, the expression of subscriptions is restricted by the selection of pre-existing channels, which limits the classification of events to these channels alone The fewer the channels available, the more challenging it becomes to express subscriptions Additionally, channels lack flexibility; if the subject assigned to a channel changes, both the publisher and subscriber must also adapt accordingly.

In practice, the term "subscription" is expanded by providing a hierarchical organization instead of a simple set of topics A topic B can be defined as a subtopic of an existing topic A, allowing for the construction of a topic tree Consequently, a notification that aligns with A naturally satisfies B The flexibility of subscription can be enhanced if the system also offers additional operations in its implementation, such as wildcard characters, enabling subscribers to register for multiple topics within the topic tree However, a limitation still exists as events can only be classified in one-dimensional spaces, since using multiple dimensions can quickly lead to complexity.

The size of the tree is influenced by the repetition of subtrees Ultimately, the producer and consumer are not entirely decoupled, as it is the producer who determines the channels through which events are published.

3.2.2.2 Mod`ele bas´e sur contenu

The second subscription model addresses the drawbacks of the first by implementing a subscription scheme based on the properties of the considered notifications Events are classified not by predefined external criteria, such as subject names, but according to the inherent properties of the events themselves These properties may include internal attributes or metadata associated with an event.

On voit que le mod`ele pr´ec´edemment pr´esent´e est un cas particulier de ce mod`ele de souscription.

In content-based publish/subscribe systems, consumers express their interests by specifying conditions related to the content of the events they wish to receive Typically, a subscription takes the form of a request consisting of key-value pairs representing event properties, which may also include logical operators (such as AND, OR, NOT) to create more complex subscriptions Consequently, the input argument for the subscribe() operation is usually of type string Additionally, P.Th Eugster and P Felber identify two other methods for representing a filter pattern.

2 La question se pose alors c’est qui est responsable de d´ efinir l’arbre ?

In the context of subscription services, a template object serves as a key element where the subscriber provides a specific object, denoted as t This indicates the subscriber's interest in receiving notifications that conform to the type of t, ensuring that all attributes of the notifications match the corresponding attributes of the provided object.

– Code ex´ecutable (Executable code) : les subscribers fournissent un objet ´etant capable de filtrer au moment d’ex´ecution L’impl´ementation de tel objet est pass´ee aux d´eveloppeurs d’application.

An intelligent filter effectively reduces unnecessary notification receptions for subscribers, which is particularly significant in mobile environments where devices have limited energy resources and bandwidth Furthermore, this subscription model fully couples participants, enhancing the system's extensibility and adaptability, making it more flexible in the face of ongoing changes.

Implementing a large-scale content-based publish/subscribe system is significantly more complex than it may seem Notable examples of such systems include Siena and Rebeca In the industry, publish/subscribe mechanisms are already commercialized through standards like the CORBA Notification Service Specification and the Java Message Service Specification.

3.2.2.3 Mod`ele bas´e sur type

The third model proposed in the literature is the type-based model This concept arises from the observation that subjects encompassing events share common characteristics not only in content but also in structure Instead of classifying events based on the subject name schema, they are now categorized using filters according to their type.

Les syst`emes publish/subscribe bas´es sur le type augmentent le concept d´eriv´e de la programmation orient´e objet : les notifications sont d´eclar´ees comme objets appartenant

A specific type of filter is designed to encapsulate both the attributes and methods of an object This enhancement leads to improved integration of the programming language, the application, and the middleware.

Architecture du syst` eme

The notification service and event producers are essential software components of an event notification system The system architecture outlines the deployment of these components over a physical network infrastructure Furthermore, the deployment topology of these components influences variations in the design of the communication protocol.

This section presents fundamental architectures including hierarchical client-server, acyclic peer-to-peer, and general peer-to-peer models Due to its limitations, the centralized client-server architecture is no longer implemented in practice, and therefore, it will not be discussed here.

In the server event topology illustrated in Figure 3.6, connected server pairs interact in an asymmetric client/server relationship Each server connects to a parent server and serves specific clients, acting as either publishers or subscribers The root server, which has no parent, is a key component of this structure The same protocol governs communication between server-to-server and server-to-client interactions, meaning that a server does not differentiate between other servers and its clients A parent server receives published events and client subscriptions, but only forwards events to the appropriate subtrees designated for those clients.

This topology is an extension of the client-server architecture, which introduces the well-known issue of a single point of failure within the system If one server fails, the servers in its subtrees become disconnected Additionally, there is a possibility that a server higher up in the hierarchy may become overloaded.

In this topology, servers communicate with each other using a symmetric communication protocol that enables bidirectional communication for exchanging subscriptions and notifications The protocol used for server-to-server communication differs from that employed for client-server interactions in terms of the type and volume of information exchanged In server-to-server communication, each node retains information for the other, whereas in client-server communication, a client can generate a subscription and serve as the final recipient of a notification Additionally, a server within this topology can function as an access point to the system.

In this category, there are two variants: (1) acyclic clique peer-to-peer architecture and (2) general peer-to-peer architecture The first variant requires that the server topology forms a connected and acyclic graph, while the second variant removes the acyclic restriction.

Fig 3.7 – Architecture pair-` a-paire acyclique et pair-` a-pair g´ en´ erale

Similar to hierarchical client-server architecture, acyclic peer-to-peer topology presents a single point of failure for each server due to interdependencies among them By implementing redundant connections within the system, the general peer-to-peer topology eliminates these failure points However, the routing algorithm of the protocol must account for this feature to avoid potential cycles and to select the optimal path.

For systems where scalability and persistence are crucial, a hybrid deployment topology is selected, combining elements from previously mentioned configurations.

Sp´ ecification abstrait du m´ edium PublishSubscribeMedium

Deuxi` eme ´ etape : Choix de conception

Ngày đăng: 03/07/2022, 08:40

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN