• Guest
HabraHabr
  • Main
  • Users

  • Development
    • Programming
    • Information Security
    • Website development
    • JavaScript
    • Game development
    • Open source
    • Developed for Android
    • Machine learning
    • Abnormal programming
    • Java
    • Python
    • Development of mobile applications
    • Analysis and design of systems
    • .NET
    • Mathematics
    • Algorithms
    • C#
    • System Programming
    • C++
    • C
    • Go
    • PHP
    • Reverse engineering
    • Assembler
    • Development under Linux
    • Big Data
    • Rust
    • Cryptography
    • Entertaining problems
    • Testing of IT systems
    • Testing Web Services
    • HTML
    • Programming microcontrollers
    • API
    • High performance
    • Developed for iOS
    • CSS
    • Industrial Programming
    • Development under Windows
    • Image processing
    • Compilers
    • FPGA
    • Professional literature
    • OpenStreetMap
    • Google Chrome
    • Data Mining
    • PostgreSQL
    • Development of robotics
    • Visualization of data
    • Angular
    • ReactJS
    • Search technologies
    • Debugging
    • Test mobile applications
    • Browsers
    • Designing and refactoring
    • IT Standards
    • Solidity
    • Node.JS
    • Git
    • LaTeX
    • SQL
    • Haskell
    • Unreal Engine
    • Unity3D
    • Development for the Internet of things
    • Functional Programming
    • Amazon Web Services
    • Google Cloud Platform
    • Development under AR and VR
    • Assembly systems
    • Version control systems
    • Kotlin
    • R
    • CAD/CAM
    • Customer Optimization
    • Development of communication systems
    • Microsoft Azure
    • Perfect code
    • Atlassian
    • Visual Studio
    • NoSQL
    • Yii
    • Mono и Moonlight
    • Parallel Programming
    • Asterisk
    • Yandex API
    • WordPress
    • Sports programming
    • Lua
    • Microsoft SQL Server
    • Payment systems
    • TypeScript
    • Scala
    • Google API
    • Development of data transmission systems
    • XML
    • Regular expressions
    • Development under Tizen
    • Swift
    • MySQL
    • Geoinformation services
    • Global Positioning Systems
    • Qt
    • Dart
    • Django
    • Development for Office 365
    • Erlang/OTP
    • GPGPU
    • Eclipse
    • Maps API
    • Testing games
    • Browser Extensions
    • 1C-Bitrix
    • Development under e-commerce
    • Xamarin
    • Xcode
    • Development under Windows Phone
    • Semantics
    • CMS
    • VueJS
    • GitHub
    • Open data
    • Sphinx
    • Ruby on Rails
    • Ruby
    • Symfony
    • Drupal
    • Messaging Systems
    • CTF
    • SaaS / S+S
    • SharePoint
    • jQuery
    • Puppet
    • Firefox
    • Elm
    • MODX
    • Billing systems
    • Graphical shells
    • Kodobred
    • MongoDB
    • SCADA
    • Hadoop
    • Gradle
    • Clojure
    • F#
    • CoffeeScript
    • Matlab
    • Phalcon
    • Development under Sailfish OS
    • Magento
    • Elixir/Phoenix
    • Microsoft Edge
    • Layout of letters
    • Development for OS X
    • Forth
    • Smalltalk
    • Julia
    • Laravel
    • WebGL
    • Meteor.JS
    • Firebird/Interbase
    • SQLite
    • D
    • Mesh-networks
    • I2P
    • Derby.js
    • Emacs
    • Development under Bada
    • Mercurial
    • UML Design
    • Objective C
    • Fortran
    • Cocoa
    • Cobol
    • Apache Flex
    • Action Script
    • Joomla
    • IIS
    • Twitter API
    • Vkontakte API
    • Facebook API
    • Microsoft Access
    • PDF
    • Prolog
    • GTK+
    • LabVIEW
    • Brainfuck
    • Cubrid
    • Canvas
    • Doctrine ORM
    • Google App Engine
    • Twisted
    • XSLT
    • TDD
    • Small Basic
    • Kohana
    • Development for Java ME
    • LiveStreet
    • MooTools
    • Adobe Flash
    • GreaseMonkey
    • INFOLUST
    • Groovy & Grails
    • Lisp
    • Delphi
    • Zend Framework
    • ExtJS / Sencha Library
    • Internet Explorer
    • CodeIgniter
    • Silverlight
    • Google Web Toolkit
    • CakePHP
    • Safari
    • Opera
    • Microformats
    • Ajax
    • VIM
  • Administration
    • System administration
    • IT Infrastructure
    • *nix
    • Network technologies
    • DevOps
    • Server Administration
    • Cloud computing
    • Configuring Linux
    • Wireless technologies
    • Virtualization
    • Hosting
    • Data storage
    • Decentralized networks
    • Database Administration
    • Data Warehousing
    • Communication standards
    • PowerShell
    • Backup
    • Cisco
    • Nginx
    • Antivirus protection
    • DNS
    • Server Optimization
    • Data recovery
    • Apache
    • Spam and antispam
    • Data Compression
    • SAN
    • IPv6
    • Fidonet
    • IPTV
    • Shells
    • Administering domain names
  • Design
    • Interfaces
    • Web design
    • Working with sound
    • Usability
    • Graphic design
    • Design Games
    • Mobile App Design
    • Working with 3D-graphics
    • Typography
    • Working with video
    • Work with vector graphics
    • Accessibility
    • Prototyping
    • CGI (graphics)
    • Computer Animation
    • Working with icons
  • Control
    • Careers in the IT industry
    • Project management
    • Development Management
    • Personnel Management
    • Product Management
    • Start-up development
    • Managing the community
    • Service Desk
    • GTD
    • IT Terminology
    • Agile
    • Business Models
    • Legislation and IT-business
    • Sales management
    • CRM-systems
    • Product localization
    • ECM / EDS
    • Freelance
    • Venture investments
    • ERP-systems
    • Help Desk Software
    • Media management
    • Patenting
    • E-commerce management
    • Creative Commons
  • Marketing
    • Conferences
    • Promotion of games
    • Internet Marketing
    • Search Engine Optimization
    • Web Analytics
    • Monetize Web services
    • Content marketing
    • Monetization of IT systems
    • Monetize mobile apps
    • Mobile App Analytics
    • Growth Hacking
    • Branding
    • Monetize Games
    • Display ads
    • Contextual advertising
    • Increase Conversion Rate
  • Sundry
    • Reading room
    • Educational process in IT
    • Research and forecasts in IT
    • Finance in IT
    • Hakatonas
    • IT emigration
    • Education abroad
    • Lumber room
    • I'm on my way

Practice using the actor model in the backend platform of the Quake Champions

 3r33410. 3r3-31. I continue to lay out reports with Pixonic DevGAMM Talks - our September mitap for developers of highly loaded systems. They shared a lot of experience and cases, and today I am publishing a transcript of a speech by backend developer from Saber Interactive Roman Rogozin. He talked about the practice of using the actor model on the example of controlling players and their states (other reports can be found in the end of the article, the list is supplemented). 3r33385.  3r33410. 3r33385.  3r33410.
3r3406. 3r3406. 3r3406. 3r314.
3r33385.  3r33410. Our team is working on a backend for Quake Champions, and I’ll talk about what the actor model is and how it is used in the project. 3r33385.  3r33410. 3r33385.  3r33410. A little about the stack of technology. We write code in C #, respectively, all technologies are tied to it. I want to note that there will be some specific things that I will show in the example of this language, but the general principles will remain unchanged. 3r33385.  3r33410. 3r33385.  3r33410. Practice using the actor model in the backend platform of the Quake Champions 3r33385.  3r33410. 3r33385.  3r33410. Actor is a parallel computing model, which states that there is some isolated object that has its own internal state and exclusive access to change this state. Actor can read messages, and consistently, perform some kind of business logic, change the internal state if desired, and send messages to external services, including other actors. And he can create other actors. 3r33385.  3r33410. 3r33385.  3r33410. Actors communicate among themselves with asynchronous messages, which allows you to create highly loaded distributed cloud systems. In this regard, the actor model and received widespread recently. 3r33385.  3r33410. 3r33385.  3r33410. Summarizing what has been said, let us imagine that we have cloud, where there is a cluster of servers, and our actors are spinning on this cluster. 3r33385.  3r33410. 3r33385.  3r33410. 3r33385.  3r33410. 3r33385.  3r33410. We can add servers to our cloud and, using the actor model, stuff individual users - assign each actor to each individual and allocate space for memory and processor time for that actor in the cloud. 3r33385.  3r33410. 3r33385.  3r33410. Thus, the actor, firstly, plays the role of a cache, and secondly, it is a la “smart cache”, which is able to process some messages, to execute business logic. Again, if you need to do a downscale (for example, the players are out) - there is also no problem to remove these actors from the system. 3r33385.  3r33410. 3r33385.  3r33410. We in the backend’e use not the classical actor model, but on the basis of the Orleans framework. What is the difference - I will try to tell you now. 3r33385.  3r33410. 3r33385.  3r33410. 3r3386. 3r33385.  3r33410. 3r33385.  3r33410. Firstly, Orleans introduces the concept of a virtual-actor or, as it is also called, grain (grain). Unlike the classical actor model, where a service is responsible for creating this actor and placing it on one of the servers, Orleans takes over the work. Those. if a certain user service requests a certain grein, Orleans will understand which server is now less loaded, will locate the actor there and return the result to the user service. 3r33385.  3r33410. 3r33385.  3r33410. Example. For a grein, it is important to know only the type of the actor, say user states, and ID. Suppose user ID 77? we get the grains of this user and do not think about how to store this grain, we do not manage the grain's life cycle. Orleans inside of itself keeps the paths of all actors in a very tricky way. If there is no actor, it creates them, if the actor is alive, it returns it, and for user services it looks like all actors are always alive. 3r33385.  3r33410. 3r33385.  3r33410. 3r399. 3r33385.  3r33410. 3r33385.  3r33410. What advantages does this give us? First, transparent load balancing due to the fact that the programmer does not need to control the location of the actor himself. He simply says Orleans, which is deployed on several servers: give me such and such actor from your servers. 3r33385.  3r33410. 3r33385.  3r33410. 3r3108. 3r33385.  3r33410. 3r33385.  3r33410. If desired, you can make downscale, if the load on the processor and memory is small. Again, you can do in the opposite direction upscale. But the service does not know anything about it, he asks for a grain, and Orleans gives him this grain. Thus, Orleans takes on infrastructural care for the life cycle of the grains. 3r33385.  3r33410. 3r33385.  3r33410. Secondly, Orleans handles server crashes. 3r33385.  3r33410. 3r33385.  3r33410. 3r33385.  3r33410. 3r33385.  3r33410. The first is too big grain. Since all the calls in the greyne are thread-safe, one after the other, and if we have some kind of greasy logic on the greyne, we will have to wait too long. Again, too much memory is allocated to one such grain. There is no exact algorithm for what the size of the grain should be, because too small a grain is also bad. Here, rather, it is necessary to proceed from the optimal value. I will not say exactly what it is that the programmer himself decides. 3r33385.  3r33410. 3r33385.  3r33410. The second problem is not so obvious - this is the so-called chain reaction. When a user picks up some kind of grain, he in turn may implicitly raise other greyna in the system. How it happens: the user gets his fortunes, and the user has friends and he gets the fortunes of his friends. Thus, the whole system keeps all its grains in memory, and if we have 1000 users and each have 100 friends, then 10?000 grains can be active just like that. Such a case also needs to be avoided - somehow, you can store your friends' steams in some kind of shared memory. 3r33385.  3r33410. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - How do you solve classical problems, like CICD, updating these actors, do Docker use and do you need it at all? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - We do not use docker yet. In general, DevOps is engaged in development, they deploy our services in the Azure cloud service. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Continuous update, no downtime, how is it going? Orleans decides for itself which server the grain will go to, which server the query will go to and how to update this service. Those. A new business logic has appeared, an update of the same actor has appeared - how are these updates rolling? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - If it is about updating the entire service, and if we have updated some of the actor’s business logic, we can roll out the new Orleans service for it. Usually we have this solved through our primitives called topology. We rolled out some new Orleans service, which, for the time being, let's say, is empty, and without an actor, we derive the old service and replace it with a new one. There will be no actors in the system at all, but the next time the user is prompted, these actors will already be created. There might be some spike in the beginning. In such cases, the update usually takes place in the morning, since in the morning we have the smallest number of players. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - How does Orleans understand that the server fell? Here you told that he quickly throws the actors to another server
[/b] 3r33385.  3r33410. 3r33385.  3r33410. - He has a pingor who periodically understands which of the servers are live. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Does he ping an actor or a server specifically? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - Specifically server. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Such a question: an error occurred inside the actor, you say it goes step by step, each instruction. But there was an error and what happens to the actor? Suppose such an error that is not processed. Is the actor just dying? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - No, Orleans throws exception in the standard .NET schema. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Look, we did not handle the exception, the actor apparently died. I don’t know what the player will look like, but what happens next? Are you trying to restart this actor or something else in this spirit? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - It depends on what case, it depends on what behavior. For example retriable or not retriable. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Ie Is it all configurable? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - Rather, it is programmed. Any exceptions we handle. Those. we clearly see that such an error code, and some, as unprocessedThese exceptions are already prokidyvayutsya further. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Do you have several Persistence’s like a database? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - Persistence, yes, a database with permanent storage. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Suppose, went to the database, in which (conditionally) game money. What happens if the actor cannot reach it? How do you handle it? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - First, it is Storage. At the moment, we use Azure Table Storage and such problems actually happen - Storage drops. Usually in this case it is necessary to reconfigure it. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - If the actor could not get something in Storage, what does the player look like? Does he simply not have this money or does he have the game immediately closed [/b] 3r33385.  3r33410. 3r33385.  3r33410. - These are critical changes for the user. Since each service has its own severity, in this case, the user service is a terminal state, and the client simply crashes. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - It seemed to me that the messages of the actors occur through asynchronous queues. How optimized is this solution? Does it not swell, does it not cause the player to hang up? Wouldn't it be better to use a reactive approach? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - The problem of queues in the actors is quite well-known, because we so clearly cannot control the size of the queue, you are right. But Orleans, firstly, undertakes some work on management and, secondly, I think that just by timeout access to the actor will fall, i.e. we can not reach the actor, for example. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - How does it affect the player? [/b] 3r33385.  3r33410. 3r33385.  3r33410. “Since the user service calls the actor, an exception timeout exception will be thrown to him and, if this is a“ critical ”service, the client will throw out the error and close. And if it is less critical, then it will wait. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Ie Do you have the threat of DDoS? A large number of petty action can put a player? Suppose someone quickly starts inviting friends, etc. [/b] 3r33385.  3r33410. 3r33385.  3r33410. - No, there is a request limiter, which will not allow too often to access services. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - How do you handle data consistency? Suppose we have two users, we need to pick something from one and charge something to another, and for it to be transactional. [/b] 3r33385.  3r33410. 3r33385.  3r33410. - Good question. First, Orleans 2.0 supports Distributed Actor Transaction - this is the first way out. More precisely, you need to talk about the economy. And as the easiest way - in the last Orleans transactions between actors are implemented without any problems. 3r33385.  3r33410. 3r33385.  3r33410. 3r33333. - Ie Is it already able to guarantee that the data will go holistically into persistence? [/b] 3r33385.  3r33410. 3r33385.  3r33410. - Yes. 3r33385.  3r33410. 3r33385.  3r33410. 3r33383. More reports from Pixonic DevGAMM Talks
3r33385.  3r33410.
 3r33410. 3r33394. 3r33333. Use Consul to scale stateful services
(Ivan Bubnov, DevOps in the company BIT.GAMES);
 3r33410. 3r33394. 3r33395. CICD: Seamless Deploy on Distributed Cluster Systems without Downtime
(Egor Panov, Pixonic system administrator).
 3r33410. 3r33399. 3r3406. 3r33410. 3r33410. 3r3403. ! function (e) {function t (t, n) {if (! (n in e)) {for (var r, a = e.document, i = a.scripts, o = i.length; o-- ;) if (-1! == i[o].src.indexOf (t)) {r = i[o]; break} if (! r) {r = a.createElement ("script"), r.type = "text /jаvascript", r.async =! ? r.defer =! ? r.src = t, r.charset = "UTF-8"; var d = function () {var e = a.getElementsByTagName ("script")[0]; e.parentNode.insertBefore (r, e)}; "[object Opera]" == e.opera? a.addEventListener? a.addEventListener ("DOMContentLoaded", d,! 1): e.attachEvent ("onload", d ): d ()}}} t ("//mediator.mail.ru/script/2820404/"""_mediator") () (); 3r3404. 3r33410. 3r3406. 3r33410. 3r33410. 3r33410. 3r33410.

It may be interesting

  • Comments
  • About article
  • Similar news
hopyou12 19 December 2019 12:06
This particular  papers fabulous, and My spouse and i enjoy each of the perform that you have  placed into this. I’m sure that you will be making a really useful place. I  has been additionally pleased. Good perform!  Black  Actors

weber

Author

12-10-2018, 12:39

Publication Date

Game development / Conferences

Category
  • Comments: 1
  • Views: 361
Donald Knut: “Our elders played tennis,
"Warm lamp" sound with your own hands.
Lithium Ion UPS: Which type of battery
Deep neural networks for automatic call
Report of the Club of Rome 201? Chapter
Dialects of English: how to understand
Write a comment
Name:*
E-Mail:


Comments
You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! kissanime 
Today, 13:24

Legend SEO

Call girls are available from Chennai Escort Agency. Meet sexy escorts in Chennai for incalls and outcalls throughout the city,  Visit us www.chennai-escort.com/
Today, 13:21

Chennai Escorts

Particular interviews furnish firsthand message on mart size, industry trends, ontogeny trends, capitalist landscape and outlook, etc.먹튀검증사이트

Today, 11:33

raymond weber

This was a shocking post. It has some look at here fundamental data on this subject.먹튀

Today, 11:00

raymond weber

I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading. I had to go show it to my friend and he ejoyed it as well!먹튀검증

Today, 09:13

raymond weber

Adv
Website for web developers. New scripts, best ideas, programming tips. How to write a script for you here, we have a lot of information about various programming languages. You are a webmaster or a beginner programmer, it does not matter, useful articles will help to make your favorite business faster.

Login

Registration Forgot password