{"id":89303,"date":"2020-07-22T01:42:30","date_gmt":"2020-07-21T23:42:30","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency"},"modified":"2020-07-22T01:42:30","modified_gmt":"2020-07-21T23:42:30","slug":"oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency","title":{"rendered":"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/Voximplant\/blog\/511626\/\"><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/22dbf7665d7fded15671d98a2afe599b.png\" style=\"display:block;margin: 0 auto;\" \/><\/a><\/noindex><br \/>\nSh\u00ebrbimi Cloud, infrastruktura si sh\u00ebrbim, platforma si sh\u00ebrbim, platforma komunikimi si sh\u00ebrbim, videokonferencat si sh\u00ebrbim, por \u00e7far\u00eb \u00ebsht\u00eb p\u00ebr loj\u00ebrat n\u00eb re si sh\u00ebrbim? Jan\u00eb b\u00ebr\u00eb disa p\u00ebrpjekje p\u00ebr krijimin e loj\u00ebrave n\u00eb re, si p\u00ebr shembull, Stadia, e cila u lan\u00e7ua s\u00eb fundmi nga Google. Stadia <noindex><a rel=\"nofollow\" href=\"https:\/\/youtu.be\/avtlQeaxd_I?t=440\">nuk \u00ebsht\u00eb i ri n\u00eb WebRTC<\/a><\/noindex>, por a mund t\u00eb p\u00ebrdorin t\u00eb tjer\u00ebt WebRTC nj\u00ebsoj?<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Thanh Nguyen vendosi t\u00eb verifikoj\u00eb k\u00ebt\u00eb mund\u00ebsi n\u00eb projektin e tij open-source CloudRetro. CloudRetro bazohet n\u00eb Pion, <noindex><a rel=\"nofollow\" href=\"https:\/\/webrtchacks.com\/webrtc-open-source-most-popular\/\">nj\u00eb bibliotek\u00eb<\/a><\/noindex> popullore WebRTC e bazuar n\u00eb Go (faleminderit <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/Sean-Der\">Shonit<\/a><\/noindex> nga grupi i zhvilluesve Pion p\u00ebr ndihm\u00ebn n\u00eb p\u00ebrgatitjen e k\u00ebtij artikulli). N\u00eb k\u00ebt\u00eb artikull, Thanh b\u00ebn nj\u00eb pasqyr\u00eb t\u00eb arkitektur\u00ebs s\u00eb projektit t\u00eb tij dhe gjithashtu tregon se \u00e7far\u00eb ka m\u00ebsuar dhe me \u00e7far\u00eb sfidash \u00ebsht\u00eb p\u00ebrballur gjat\u00eb pun\u00ebs.<\/p>\n<h2>Hyrje<\/h2>\n<p>\nVitin e kaluar, kur Google njoftoi Stadia, m\u00eb goditi fort. Ideja \u00ebsht\u00eb kaq unike dhe inovative saq\u00eb vazhdimisht e pyesja veten se si \u00ebsht\u00eb e mundur nj\u00eb gj\u00eb e till\u00eb me teknologjit\u00eb aktuale. D\u00ebshira p\u00ebr t\u00eb kuptuar m\u00eb mir\u00eb k\u00ebt\u00eb tem\u00eb m\u00eb nxiti t\u00eb krijoja versionin tim open-source t\u00eb loj\u00ebs n\u00eb re. Rezultati ishte thjesht fantastik. M\u00eb posht\u00eb do doja t\u00eb ndaja procesin e pun\u00ebs mbi projektin tim nj\u00ebvje\u00e7ar <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/giongto35\/cloud-game\">projektin<\/a><\/noindex>.<\/p>\n<p><i>TLDR: nj\u00eb version i shkurt\u00ebr me pikat kryesore<\/i><\/p>\n<h3>Pse e ardhmja \u00ebsht\u00eb p\u00ebr loj\u00ebrat n\u00eb re<\/h3>\n<p>\nBesoj se Cloud Gaming shum\u00eb shpejt do t\u00eb b\u00ebhet brezi i ri jo vet\u00ebm i loj\u00ebrave, por edhe i fushave t\u00eb tjera t\u00eb informatik\u00ebs. Loj\u00ebrat n\u00eb re jan\u00eb maja e modelit klient\/server. Ky model maksimizon menaxhimin e backend-it dhe minimizon pun\u00ebn e frontend-it duke vendosur logjik\u00ebn e loj\u00ebs n\u00eb nj\u00eb server t\u00eb larg\u00ebt dhe duke transmetuar pamjet\/audiot tek klienti. Serveri b\u00ebn p\u00ebrpunimin e r\u00ebnd\u00eb, prandaj klienti nuk \u00ebsht\u00eb m\u00eb i varur nga kufizimet harduerike.<\/p>\n<p>Google Stadia, n\u00eb thelb, lejon t\u00eb luash n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/ru.wikipedia.org\/wiki\/AAA_(%D0%BA%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80%D0%BD%D1%8B%D0%B5_%D0%B8%D0%B3%D1%80%D1%8B)\">loj\u00ebrat AAA<\/a><\/noindex> (dmth. loj\u00ebrat e klasit m\u00eb t\u00eb lart\u00eb) n\u00eb nj\u00eb nd\u00ebrfaqe si YouTube. T\u00eb nj\u00ebjt\u00ebn metodologji mund t\u00eb aplikohet edhe p\u00ebr aplikacione t\u00eb tjera t\u00eb r\u00ebnda offline, si sistemi operativ ose dizajni grafik 2D\/3D etj. q\u00eb mund t'i ekzekutojm\u00eb n\u00eb m\u00ebnyr\u00eb t\u00eb q\u00ebndrueshme n\u00eb pajisje me karakteristika t\u00eb ulta n\u00eb platforma t\u00eb ndryshme.<\/p>\n<p><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/d6ca3e47db5c8e3d9880b304cc3be33b.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nE ardhmja e k\u00ebsaj teknologjie: imagjinoni n\u00ebse Microsoft Windows 10 do t\u00eb punonte n\u00eb shfletuesin Chrome?<\/p>\n<h3>Loj\u00ebrat n\u00eb re jan\u00eb teknikisht t\u00eb komplikuara<\/h3>\n<p>\nGaming is one of those rare areas where a constant fast response from the user is required. If we occasionally experience a delay of 2 seconds when clicking on a page, that's acceptable. Live video streams typically lag a few seconds, but still provide enough convenience for use. However, if a game frequently lags by 500 ms, it's simply unplayable. Our goal is to achieve extremely low latency so that the gap between input and media is as small as possible. Therefore, the traditional approach to streaming video is not applicable here.<\/p>\n<p><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/d73765a3c9277c026f407883e1091473.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nThe general template for cloud gaming<\/p>\n<h2>Open-source project CloudRetro<\/h2>\n<p>\nI decided to create a test sample of cloud gaming to check whether it's possible given such strict network limitations. For the proof of concept, I chose Golang, as it's the language I'm most familiar with and well-suited for this implementation for many other reasons, as it turned out later. Go is simple and develops very quickly; channels in Go are great for managing multithreading.<\/p>\n<p>Projekti <noindex><a rel=\"nofollow\" href=\"http:\/\/cloudretro.io\/\">CloudRetro.io<\/a><\/noindex> \u2013 a cloud gaming service with open source for retro gaming. The goal of the project is to bring the most comfortable gaming experience to traditional retro games and add multiplayer functionality.<br \/>\nYou can learn more about the project here: <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/giongto35\/cloud-game\">https:\/\/github.com\/giongto35\/cloud-game<\/a><\/noindex>.<\/p>\n<h3>CloudRetro functionality<\/h3>\n<p>\nTo showcase the full power of cloud gaming, retro games are used in CloudRetro. This allows for many unique gaming experiences.<\/p>\n<ul>\n<li>Game portability\n<ul>\n<li>Instant playback when opening the page; no download or installation required<\/li>\n<li>Works in mobile browsers, so no software installation is needed to launch<\/li>\n<\/ul>\n<p>\n<\/li>\n<li>Gaming sessions can be jointly used on multiple devices and stored in the cloud for the next login<\/li>\n<li>The game can be streamed, or multiple users can play it simultaneously:\n<ul>\n<li>Crowdplay like TwitchPlayPokemon, but more cross-platform and real-time<\/li>\n<li>Offline games online. Many users can play without network setup. In Samurai Shodown, 2 players can now play over the CloudRetro network<\/li>\n<\/ul>\n<p>\n<img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/bdc715971755d669a026f830ce888520.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nDemo version of multiplayer online games on different devices<\/p>\n<h2>Infrastruktura<\/h2>\n<p><\/p>\n<h3>Requirements and technology stack<\/h3>\n<p>\nBelow is a list of requirements that I set before starting the project.<\/p>\n<p><b>1. Nj\u00eb lojtar<\/b><br \/>\nKy k\u00ebrkes\u00eb mund t\u00eb duket e thjesht\u00eb dhe e qart\u00eb k\u00ebtu, por \u00ebsht\u00eb nj\u00eb nga p\u00ebrfundimet e mia kryesore; ajo lejon q\u00eb loj\u00ebrat n\u00eb re t\u00eb q\u00ebndrojn\u00eb sa m\u00eb larg nga sh\u00ebrbimet tradicionale t\u00eb transmetimit. N\u00ebse p\u00ebrqendrohemi te loja p\u00ebr nj\u00eb lojtar, mund t\u00eb heqim dor\u00eb nga nj\u00eb server i centralizuar ose nj\u00eb CDN, sepse nuk na nevojitet transmetimi p\u00ebr masat. N\u00eb vend q\u00eb t\u00eb ngarkojm\u00eb kanale n\u00eb nj\u00eb server t\u00eb gjer\u00eb ose t\u00eb transferojm\u00eb paketa n\u00eb nj\u00eb server t\u00eb centralizuar WebSocket, kanalet sh\u00ebrbyese d\u00ebrgohen drejtp\u00ebrdrejt te p\u00ebrdoruesi p\u00ebrmes nj\u00eb lidhjeje peer-to-peer WebRTC.<\/p>\n<p><b>2. T\u00eb dh\u00ebna mediatike me vones\u00eb t\u00eb ul\u00ebt<\/b><br \/>\nNd\u00ebrsa lexoj p\u00ebr Stadia, shpesh has n\u00eb disa artikuj p\u00ebr t\u00eb p\u00ebrmendur WebRTC. E kuptova q\u00eb WebRTC \u00ebsht\u00eb nj\u00eb teknologji e jasht\u00ebzakonshme, dhe ajo p\u00ebrshtatet shk\u00eblqyesh\u00ebm p\u00ebr p\u00ebrdorim n\u00eb loj\u00ebrat n\u00eb re. WebRTC \u00ebsht\u00eb nj\u00eb projekt q\u00eb ofron komunikim n\u00eb koh\u00eb reale p\u00ebr shfletuesit dhe aplikacionet mobile p\u00ebrmes nj\u00eb API t\u00eb thjesht\u00eb. Ajo siguron nj\u00eb lidhje peer-to-peer, t\u00eb optimizuar p\u00ebr media dhe ka kodek\u00ebt standard\u00eb t\u00eb integruar, si VP8 dhe H264.<\/p>\n<p>Kam dh\u00ebn\u00eb p\u00ebrpar\u00ebsi siguris\u00eb p\u00ebr nj\u00eb funksionim sa m\u00eb komod t\u00eb p\u00ebrdoruesve, sesa ruajtjes s\u00eb cil\u00ebsis\u00eb s\u00eb lart\u00eb t\u00eb grafik\u00ebs. N\u00eb algorit\u00ebm jan\u00eb t\u00eb lejuara disa humbje. N\u00eb Google Stadia ka nj\u00eb hap shtes\u00eb p\u00ebr t\u00eb zvog\u00ebluar madh\u00ebsin\u00eb e imazhit n\u00eb server dhe kadrot skalen n\u00eb cil\u00ebsi m\u00eb t\u00eb lart\u00eb para se t'i d\u00ebrgohen nyjeve t\u00eb peer-to-peer.<\/p>\n<p><b>3. Infrastruktur\u00eb e shp\u00ebrndar\u00eb me ruterim gjeografik<\/b><br \/>\nPavar\u00ebsisht nga sa i optimizuar \u00ebsht\u00eb algoritmi i kompresimit dhe kodi, rrjeti mbetet nj\u00eb faktor vendimtar q\u00eb kontribuon m\u00eb s\u00eb shumti n\u00eb vones\u00eb. Arkitektura duhet t\u00eb ket\u00eb nj\u00eb mekaniz\u00ebm bashk\u00eblidhjeje me serverin m\u00eb t\u00eb af\u00ebrt p\u00ebr p\u00ebrdoruesin p\u00ebr t\u00eb reduktuar koh\u00ebn e ndjeshm\u00ebris\u00eb (RTT). Arkitektura duhet t\u00eb ket\u00eb 1 koordinues dhe disa servera transmetimi t\u00eb shp\u00ebrndar\u00eb n\u00eb mbar\u00eb bot\u00ebn: Per\u00ebndimi i SHBA-s\u00eb, Lindja e SHBA-s\u00eb, Evropa, Singapori, Kina. T\u00eb gjitha serverat transmetues duhet t\u00eb jen\u00eb plot\u00ebsisht t\u00eb izoluar. Sistemi mund t\u00eb rregulloj\u00eb shp\u00ebrndarjen e tij kur serveri bashkohet me rrjetin ose largohet nga ai. K\u00ebshtu, n\u00eb koh\u00eb t\u00eb m\u00ebdha trafiku, shtimi i serverave shtes\u00eb lejon q\u00eb t\u00eb b\u00ebhet shkall\u00ebzim horizontal.<\/p>\n<p><b>4. P\u00ebrputhshm\u00ebri e shfletuesit<\/b><br \/>\nLojrat e bulimeve shfaqen n\u00eb m\u00ebnyr\u00ebn m\u00eb t\u00eb mir\u00eb kur k\u00ebrkojn\u00eb minimalin nga p\u00ebrdoruesit. Kjo do t\u00eb thot\u00eb se ka mund\u00ebsi p\u00ebr ta b\u00ebr\u00eb loj\u00ebn n\u00eb shfletues. Shfletuesit ndihmojn\u00eb n\u00eb krijimin e nj\u00eb p\u00ebrvoje loje sa m\u00eb t\u00eb rehatshme p\u00ebr p\u00ebrdoruesit, duke i lirosh ata nga instalimi i pajisjeve software dhe hardware. Shfletuesit gjithashtu ndihmojn\u00eb n\u00eb sigurimin e nd\u00ebrveprueshm\u00ebris\u00eb mes versioneve mobile dhe desktop. Me fat, WebRTC mb\u00ebshtetet mjaft mir\u00eb n\u00eb shfletues t\u00eb ndrysh\u00ebm.<\/p>\n<p><b>5. Ndarja e qart\u00eb e nd\u00ebrfaqes s\u00eb loj\u00ebs dhe sh\u00ebrbimit<\/b><br \/>\nUn\u00eb e shoh sh\u00ebrbimin e loj\u00ebrave n\u00eb cloud si nj\u00eb platform\u00eb. \u00c7do kush duhet t\u00eb ket\u00eb mund\u00ebsin\u00eb p\u00ebr t'u lidhur me platform\u00ebn p\u00ebr qualquer gj\u00eb. Aktualisht kam integruar <noindex><a rel=\"nofollow\" href=\"http:\/\/LibRetro\">LibRetro<\/a><\/noindex> me sh\u00ebrbimin e loj\u00ebrave n\u00eb cloud, sepse LibRetro ofron nj\u00eb nd\u00ebrfaqe t\u00eb bukur p\u00ebr emulator\u00ebt e loj\u00ebrave retro si SNES, GBA, PS.<\/p>\n<p><b>6. Dhomat p\u00ebr multiplayer, crowd play dhe lidhjen e jashtme (deep-link) me loj\u00ebn<\/b><br \/>\nCloudRetro mb\u00ebshtet shum\u00eb lloje t\u00eb reja gameplay, si CrowdPlay dhe Online MultiPlayer p\u00ebr loj\u00ebrat retro. N\u00ebse disa p\u00ebrdorues hapin t\u00eb nj\u00ebjtin deep-link n\u00eb kompjuter\u00eb t\u00eb ndrysh\u00ebm, ata do t\u00eb shohin t\u00eb nj\u00ebjt\u00ebn loj\u00eb t\u00eb nisur dhe madje mund t\u00eb bashkohen me t\u00eb.<\/p>\n<p>P\u00ebr m\u00eb tep\u00ebr, gjendjet e loj\u00ebs ruhen n\u00eb magazin\u00ebn cloud. Kjo lejon p\u00ebrdoruesit t\u00eb vazhdojn\u00eb loj\u00ebn n\u00eb \u00e7do koh\u00eb n\u00eb \u00e7do pajisje tjet\u00ebr.<\/p>\n<p><b>7. Shkall\u00ebzimi horizontal<\/b><br \/>\nSi \u00e7do SAAS, loj\u00ebrat n\u00eb cloud duhet t\u00eb projektohen q\u00eb t\u00eb jen\u00eb horizontalisht t\u00eb shkall\u00ebzueshme. Konstrukti \"koordinator-pun\u00ebtor\" lejon shtimin e m\u00eb shum\u00eb pun\u00ebtor\u00ebve p\u00ebr t\u00eb sh\u00ebrbyer nj\u00eb trafik m\u00eb t\u00eb madh.<\/p>\n<p><b>8. Asnj\u00eb var\u00ebsi nga nj\u00eb cloud i vet\u00ebm<\/b><br \/>\nInfrastruktura CloudRetro \u00ebsht\u00eb e vendosur n\u00eb ofrues t\u00eb ndrysh\u00ebm cloud (Digital Ocean, Alibaba, ofrues i personalizuar) p\u00ebr rajone t\u00eb ndryshme. Un\u00eb aktivizoj nisjen n\u00eb kontejnerin Docker p\u00ebr infrastruktur\u00ebn dhe konfiguroj parametrat e rrjetit me nj\u00eb skript\u00eb bash p\u00ebr t\u00eb evituar var\u00ebsin\u00eb nga nj\u00eb ofrues i vet\u00ebm cloud. Duke e kombinuar k\u00ebt\u00eb me NAT Traversal n\u00eb WebRTC, ne mund t\u00eb arrijm\u00eb fleksibilitetin p\u00ebr t\u00eb shp\u00ebrndar\u00eb CloudRetro n\u00eb \u00e7do platform\u00eb cloud dhe madje edhe n\u00eb makinat e \u00e7do p\u00ebrdoruesi.<\/p>\n<h3>Dizajni arkitektonik<\/h3>\n<p>\n<b>Pune:<\/b> (ose server streaming, p\u00ebrmendur m\u00eb lart) shum\u00ebfishon loj\u00ebrat, nis linj\u00ebn e kodimit dhe transmeton median e koduar te p\u00ebrdoruesit. Instancat e punonj\u00ebsve jan\u00eb t\u00eb shp\u00ebrndara n\u00eb mbar\u00eb bot\u00ebn, dhe \u00e7do punonj\u00ebs mund t\u00eb p\u00ebrballoj\u00eb disa seanca p\u00ebrdoruesish n\u00eb t\u00eb nj\u00ebjt\u00ebn koh\u00eb.<\/p>\n<p><b>Koordinatori:<\/b> \u00ebsht\u00eb p\u00ebrgjegj\u00ebs p\u00ebr lidhjen e p\u00ebrdoruesit t\u00eb ri me punonj\u00ebsin m\u00eb t\u00eb p\u00ebrshtatsh\u00ebm p\u00ebr transmetim. Koordinatori nd\u00ebrvepron me punonj\u00ebsit p\u00ebrmes WebSocket.<\/p>\n<p><b>Magazina e gjendjeve t\u00eb loj\u00ebs:<\/b> nj\u00eb magazin\u00eb centrale e larg\u00ebt p\u00ebr t\u00eb gjitha gjendjet e loj\u00ebs. Kjo magazin\u00eb ofron funksione t\u00eb r\u00ebnd\u00ebsishme, si p.sh. ruajtje\/ngarkim t\u00eb larg\u00ebt.<\/p>\n<p><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/985447b81350a640b0bd1344b5705113.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nArkitektura e nivelit t\u00eb lart\u00eb CloudRetro<\/p>\n<h3>Skema e p\u00ebrdoruesit<\/h3>\n<p>\nKur nj\u00eb p\u00ebrdorues i ri hap CloudRetro n\u00eb hapat 1 dhe 2, q\u00eb shihen n\u00eb figur\u00ebn m\u00eb posht\u00eb, k\u00ebrkohet koordinatori me list\u00ebn e punonj\u00ebsve t\u00eb disponuesh\u00ebm n\u00eb faqen e par\u00eb. M\u00eb pas, n\u00eb hapin 3, klienti llogarit vonesat p\u00ebr t\u00eb gjith\u00eb kandidat\u00ebt me nj\u00eb k\u00ebrkes\u00eb ping n\u00eb HTTP. Kjo list\u00eb vonesash pastaj d\u00ebrgohet p\u00ebrs\u00ebri te koordinatori, n\u00eb m\u00ebnyr\u00eb q\u00eb ai t\u00eb mund t\u00eb p\u00ebrcaktoj\u00eb punonj\u00ebsin m\u00eb t\u00eb p\u00ebrshtatsh\u00ebm p\u00ebr t\u00eb sh\u00ebrbyer p\u00ebrdoruesin. N\u00eb hapin 4 m\u00eb posht\u00eb krijohet loja. Nj\u00eb lidhje transmetimi WebRTC vendoset mes p\u00ebrdoruesit dhe punonj\u00ebsit t\u00eb caktuar.<br \/>\n<img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/00199b5942e3e4314609ec0e70ea7162.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nSkema e p\u00ebrdoruesit pas marrjes s\u00eb qasjes<\/p>\n<h3>\u00c7far\u00eb ndodhet brenda punonj\u00ebsit<\/h3>\n<p>\nPipelines e loj\u00ebrave dhe transmetimit ruhet brenda punonj\u00ebsit n\u00eb m\u00ebnyr\u00eb t\u00eb izoluar dhe shk\u00ebmbejn\u00eb informacion p\u00ebrmes nj\u00eb interface. Aktualisht, kjo lidhje realizohet p\u00ebrmes transmetimit t\u00eb t\u00eb dh\u00ebnave n\u00eb memorje p\u00ebrmes <noindex><a rel=\"nofollow\" href=\"https:\/\/tour.golang.org\/concurrency\/2\">kanaleve Golang<\/a><\/noindex> n\u00eb t\u00eb nj\u00ebtin proces. Q\u00ebllimi tjet\u00ebr \u00ebsht\u00eb segregaimi, pra ekzekutimi i pavarur i loj\u00ebs n\u00eb nj\u00eb proces tjet\u00ebr.<\/p>\n<p><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/7a90ec2638344467a34604cd4322165c.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nInteraksioni i komponent\u00ebve t\u00eb punonj\u00ebsit<\/p>\n<p>Komponent\u00ebt kryesor\u00eb:<\/p>\n<ul>\n<li><b>WebRTC:<\/b> komponenti i klientit, q\u00eb pranon hyrjen e p\u00ebrdoruesit dhe del median e koduar nga serveri.\n<\/li>\n<li><b>Emulatori i loj\u00ebs:<\/b> komponenti i loj\u00ebs. P\u00ebrmes bibliotek\u00ebs Libretro, sistemi \u00ebsht\u00eb i aft\u00eb t\u00eb ekzekutoj\u00eb loj\u00ebn brenda t\u00eb nj\u00ebjtit proces dhe t\u00eb kap\u00eb brend\u00ebsisht median dhe fluksin e hyrjes.\n<\/li>\n<li>Kadrin e brendsh\u00ebm t\u00eb loj\u00ebs kapet dhe d\u00ebrgohet n\u00eb kodues.\n<\/li>\n<li><b>Koduesi i imazhit\/audios:<\/b> linja e kodimit q\u00eb merr kadrin e median, i kodon ata n\u00eb sfond dhe del imazhe\/audio t\u00eb koduara.\n<\/li>\n<\/ul>\n<p><\/p>\n<h2>Implementimi<\/h2>\n<p>\nCloudRetro mb\u00ebshtetet n\u00eb WebRTC si teknologjin\u00eb kryesore, prandaj para se t\u00eb thellohem n\u00eb detajet e zbatimit n\u00eb Golang, vendosa t\u00eb flas p\u00ebr vet\u00eb WebRTC. Kjo \u00ebsht\u00eb nj\u00eb teknologji fantastike q\u00eb m\u00eb ka ndihmuar shum\u00eb n\u00eb arritjen e vones\u00ebs s\u00eb transmetimit t\u00eb t\u00eb dh\u00ebnave prej vet\u00ebm disa qindarken.<\/p>\n<h3>WebRTC<\/h3>\n<p>\nWebRTC \u00ebsht\u00eb projektuar p\u00ebr t\u00eb siguruar lidhje peer-to-peer me cil\u00ebsi t\u00eb lart\u00eb n\u00eb aplikacione mobile native dhe n\u00eb shfletues me an\u00eb t\u00eb API-ve t\u00eb thjeshta.<\/p>\n<h4>Shkalla e NAT Traversal <\/h4>\n<p>\nWebRTC \u00ebsht\u00eb i njohur p\u00ebr funksionalitetin e tij NAT Traversal. WebRTC \u00ebsht\u00eb projektuar p\u00ebr komunikim mes p\u00ebrdoruesve. Q\u00ebllimi i tij \u00ebsht\u00eb t\u00eb gjej\u00eb rrug\u00ebn m\u00eb t\u00eb p\u00ebrshtatshme direkte, duke shmangur NAT-t\u00eb dhe Firewall-et p\u00ebr lidhje peer-to-peer n\u00ebp\u00ebrmjet nj\u00eb procesi t\u00eb quajtur <noindex><a rel=\"nofollow\" href=\"https:\/\/webrtchacks.com\/trickle-ice\/\">ICE<\/a><\/noindex>. N\u00eb kuad\u00ebr t\u00eb k\u00ebtij procesi, API-t\u00eb WebRTC gjejn\u00eb adres\u00ebn tuaj IP publike me an\u00eb t\u00eb server\u00ebve STUN dhe e drejtojn\u00eb at\u00eb n\u00eb nj\u00eb server retranslacioni (<noindex><a rel=\"nofollow\" href=\"https:\/\/webrtchacks.com\/?s=turn\">TURN<\/a><\/noindex>), kur nj\u00eb lidhje direkte nuk mund t\u00eb vendoset.<\/p>\n<p>Megjithat\u00eb, CloudRetro nuk e p\u00ebrdor plot\u00ebsisht k\u00ebt\u00eb mund\u00ebsi. Lidhjet e tij peer-to-peer nuk ekzistojn\u00eb mes p\u00ebrdoruesve, por mes p\u00ebrdoruesve dhe server\u00ebve cloud. Pjesa serverike e modelit ka m\u00eb pak kufizime p\u00ebr lidhjen direkte sesa nj\u00eb pajisje zakonshme p\u00ebrdoruesi. Kjo lejon hapjen paraprake t\u00eb porteve hyr\u00ebse ose p\u00ebrdorimin e adresave IP publike drejtp\u00ebrdrejt, pasi serveri nuk ndodhet pas NAT-it.<\/p>\n<p>P\u00ebrpara, doja t\u00eb ktheja projektin n\u00eb nj\u00eb platform\u00eb shp\u00ebrndarjeje loj\u00ebrash p\u00ebr Cloud Gaming. Ideja ishte q\u00eb t'u lejoja krijuesve t\u00eb loj\u00ebrave t\u00eb ofronin loj\u00ebra dhe burime transmetimi. P\u00ebrdoruesit do t\u00eb interagonin direkt me ofruesit. N\u00eb nj\u00eb m\u00ebnyr\u00eb t\u00eb till\u00eb decentralizimi, CloudRetro \u00ebsht\u00eb thjesht nj\u00eb mjedis p\u00ebr lidhjen e burimeve t\u00eb transmetimit nga pal\u00eb t\u00eb treta me p\u00ebrdoruesit, duke e b\u00ebr\u00eb at\u00eb m\u00eb t\u00eb shkall\u00ebzuesh\u00ebm, kur nuk ka m\u00eb ngarkes\u00eb prit\u00ebse. Roli i NAT Traversal t\u00eb WebRTC \u00ebsht\u00eb shum\u00eb i r\u00ebnd\u00ebsish\u00ebm p\u00ebr leht\u00ebsimin e nism\u00ebs s\u00eb lidhjeve peer-to-peer n\u00eb burime transmetimi nga pal\u00eb t\u00eb treta, duke e b\u00ebr\u00eb m\u00eb t\u00eb thjesht\u00eb lidhjen e krijuesit me rrjetin.<\/p>\n<h4>Kompresimi i videos<\/h4>\n<p>\nKompresimi i videos \u00ebsht\u00eb nj\u00eb pjes\u00eb e pandar\u00eb e pipeline-it q\u00eb kontribuon n\u00eb mas\u00eb t\u00eb madhe n\u00eb rritjen e rrafsh\u00ebsis\u00eb s\u00eb transmetimit. Edhe pse nuk \u00ebsht\u00eb e nevojshme t\u00eb dihen t\u00eb gjitha detajet e kodimit t\u00eb videos n\u00eb VP8\/H264, kuptimi i konceptit ndihmon n\u00eb t\u00eb kuptuarit e parametrave t\u00eb shpejt\u00ebsis\u00eb s\u00eb videos n\u00eb transmetim, n\u00eb zgjidhjen e sjelljeve t\u00eb papritura, dhe n\u00eb konfigurimin e vonesave.<\/p>\n<p>Kompresimi i videos p\u00ebr sh\u00ebrbimin e transmetimit \u00ebsht\u00eb nj\u00eb detyr\u00eb e nd\u00ebrlikuar, sepse algoritmi duhet t\u00eb garantoj\u00eb q\u00eb koha totale e kodimit + koha e transmetimit n\u00eb rrjet + koha e dekodimit t\u00eb jet\u00eb sa m\u00eb e vog\u00ebl t\u00eb jet\u00eb e mundur. P\u00ebr m\u00eb tep\u00ebr, procesi i kodimit duhet t\u00eb jet\u00eb i radhitur dhe i vazhduesh\u00ebm. Disa kompromis t\u00eb nd\u00ebrsjell\u00eb gjat\u00eb kodimit nuk jan\u00eb t\u00eb aplikuesh\u00ebm \u2013 p\u00ebr shembull, nuk mund t\u00eb preferojm\u00eb nj\u00eb koh\u00eb m\u00eb t\u00eb gjat\u00eb kodimi p\u00ebr nj\u00eb madh\u00ebsi m\u00eb t\u00eb vog\u00ebl skedari dhe koh\u00eb dekodimi, ose t\u00eb p\u00ebrdorim kompresim t\u00eb pashtjellohet.<\/p>\n<p>Ideja e kompresimit t\u00eb videos \u00ebsht\u00eb t\u00eb p\u00ebrjashtoj\u00eb bitet e panevojshme t\u00eb informacionit, duke ruajtur nj\u00eb nivel t\u00eb pranuesh\u00ebm sakt\u00ebsie p\u00ebr p\u00ebrdoruesit. P\u00ebrve\u00e7 kodimit t\u00eb fotove statike individuale, algoritmi nxjerr p\u00ebr foton aktuale nga fotografia e m\u00ebparshme dhe ajo q\u00eb vjen pas saj, k\u00ebshtu q\u00eb d\u00ebrgohet vet\u00ebm diferenca midis tyre. Si\u00e7 shihet nga shembulli me Pacman, d\u00ebrgohen vet\u00ebm piketat diferenciale.<\/p>\n<p><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/e452c54c53ab7797b610620aefbba8d2.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nKrahasimi i videokadrove me shembullin Pacman<\/p>\n<h4>Kompresimi i audios<\/h4>\n<p>\nN\u00eb m\u00ebnyr\u00eb t\u00eb ngjashme, algoritmi i kompresimit t\u00eb audios heq t\u00eb dh\u00ebnat q\u00eb nuk mund t\u00eb perceptohen nga njeriu. Opus aktualisht \u00ebsht\u00eb kodeku audio me performanc\u00ebn m\u00eb t\u00eb mir\u00eb. Ai \u00ebsht\u00eb zhvilluar p\u00ebr t\u00eb transmetuar val\u00ebt audio p\u00ebrmes nj\u00eb protokolli t\u00eb d\u00ebrguesh\u00ebm, si RTP (Protokolli i Transportit n\u00eb Koh\u00eb Reale). Vonesa e tij \u00ebsht\u00eb m\u00eb e ul\u00ebt se ajo e mp3 dhe aac, dhe cil\u00ebsia \u00ebsht\u00eb m\u00eb e lart\u00eb. Vonesa zakonisht \u00ebsht\u00eb rreth 5~66.5 ms.<\/p>\n<h4>Pion, WebRTC n\u00eb Golang<\/h4>\n<p>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/pion\/webrtc\">Pion<\/a><\/noindex> \u00ebsht\u00eb nj\u00eb projekt me kod t\u00eb hapur q\u00eb sjell WebRTC n\u00eb Golang. N\u00eb vend t\u00eb mb\u00ebshtjelljes standarde t\u00eb bibliotekave native C++ t\u00eb WebRTC, Pion \u00ebsht\u00eb nj\u00eb implementim native i WebRTC n\u00eb Golang me performanc\u00eb m\u00eb t\u00eb mir\u00eb, integrim me Go, si dhe kontrollin e versioneve n\u00eb protokollet WebRTC.<\/p>\n<p>Biblioteka gjithashtu ofron transmetim t\u00eb dh\u00ebnash me shum\u00eb module t\u00eb shk\u00eblqyera t\u00eb integruara me vones\u00eb m\u00eb pak se nj\u00eb sekond\u00eb. Ajo ka zbatimin e saj t\u00eb STUN, DTLS, SCTP etj. dhe disa eksperimente me QUIC dhe WebAssembly. Kjo bibliotek\u00eb open-source \u00ebsht\u00eb n\u00eb t\u00eb v\u00ebrtet\u00eb nj\u00eb burim shum\u00eb i mir\u00eb p\u00ebr m\u00ebsim me dokumentacion t\u00eb shk\u00eblqyer, zbatim t\u00eb protokolleve rrjet dhe shembuj t\u00eb shk\u00eblqyer.<\/p>\n<p>Komuniteti Pion, i udh\u00ebhequr nga nj\u00eb krijues shum\u00eb pasionant, \u00ebsht\u00eb mjaft i gjall\u00eb, aty zhvillohen shum\u00eb diskutime cil\u00ebsore p\u00ebr WebRTC. N\u00ebse jeni t\u00eb interesuar p\u00ebr k\u00ebt\u00eb teknologji, bashkohuni me <noindex><a rel=\"nofollow\" href=\"http:\/\/pion.ly\/slack\">http:\/\/pion.ly\/slack<\/a><\/noindex> \u2013 do t\u00eb m\u00ebsoni shum\u00eb gj\u00ebra t\u00eb reja.<\/p>\n<h3>Shkrimi i CloudRetro n\u00eb Golang<\/h3>\n<p>\n<img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/f85f7b8ea579fab964d870aad698c7e7.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nZbatimi i punonj\u00ebsit n\u00eb Go<\/p>\n<h4>Kanalet Go n\u00eb veprim<\/h4>\n<p>\nFal\u00eb dizajnit t\u00eb bukur t\u00eb kanaleve Go, problemet e transmetimit t\u00eb ngjarjeve dhe paralelizmit thjeshtohen ndjesh\u00ebm. Ashtu si n\u00eb diagram, disa komponent\u00eb punojn\u00eb paralelisht n\u00eb GoRoutines t\u00eb ndryshme. \u00c7do komponent menaxhon gjendjen e tij dhe komunikon p\u00ebrmes kanaleve. Deklarata selektive n\u00eb Golang b\u00ebn q\u00eb t\u00eb p\u00ebrpunoj\u00eb nj\u00eb ngjarje atomike n\u00eb \u00e7do moment n\u00eb loj\u00eb (game tick). Kjo do t\u00eb thot\u00eb se p\u00ebr nj\u00eb dizajn t\u00eb till\u00eb nuk nevojitet bllokim. P\u00ebr shembull, kur p\u00ebrdoruesi ruhet, nevojitet nj\u00eb snapshot i plot\u00eb i gjendjes s\u00eb loj\u00ebs. Kjo gjendje duhet t\u00eb mbetet e vazhdueshme, duke kryer hyrjen deri sa ruajtja t\u00eb p\u00ebrfundoj\u00eb. Gjat\u00eb \u00e7do game tick, backend mund t\u00eb p\u00ebrpunoj\u00eb vet\u00ebm operacionin e ruajtjes ose hyrjes, duke e b\u00ebr\u00eb procesin t\u00eb sigurt p\u00ebr rrjedh\u00ebn.<\/p>\n<pre><code class=\"go\">func (e *gameEmulator) gameUpdate() {\nfor {\n\tselect {\n\t\tcase &lt;-e.saveOperation:\n\t\t\te.saveGameState()\n\t\tcase key := &lt;-e.input:\n\t\t\te.updateGameState(key)\n\t\tcase &lt;-e.done:\n\t\t\te.close()\n\t\t\treturn\n\t}\n    }\n}<\/code><\/pre>\n<p><\/p>\n<h4>Fan-in \/ Fan-out<\/h4>\n<p>\nKy model i Golang \u00ebsht\u00eb shum\u00eb i p\u00ebrshtatsh\u00ebm p\u00ebr skenarin tim t\u00eb p\u00ebrdorimit CrowdPlay dhe Many Player. Duke ndjekur k\u00ebt\u00eb model, t\u00eb gjith\u00eb hyrjet e p\u00ebrdoruesve n\u00eb nj\u00eb dhom\u00eb p\u00ebrfshihen n\u00eb nj\u00eb kanal hyr\u00ebs qendror. Media e loj\u00ebs m\u00eb pas shp\u00ebrndahet te t\u00eb gjith\u00eb p\u00ebrdoruesit n\u00eb nj\u00eb dhom\u00eb. K\u00ebshtu, ne arrijm\u00eb ndarjen e gjendjes s\u00eb loj\u00ebs mes disa sesioneve t\u00eb loj\u00ebs t\u00eb p\u00ebrdoruesve t\u00eb ndrysh\u00ebm.<\/p>\n<p><img decoding=\"async\" alt=\"Gaming n\u00eb \u043e\u0431\u043b\u0430\u043a me kod t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency\" src=\"\/wp-content\/uploads\/2020\/07\/000a495d7f214246a8a396aab11a3ac5.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nSinkronizimi mes seancave t\u00eb ndryshme<\/p>\n<h4>Disavantazhet e Golang<\/h4>\n<p>\nGolang nuk \u00ebsht\u00eb i p\u00ebrsosur. Kanali \u00ebsht\u00eb i ngadalsh\u00ebm. N\u00eb krahasim me bllokimin, kanali Go \u00ebsht\u00eb thjesht nj\u00eb m\u00ebnyr\u00eb m\u00eb e leht\u00eb p\u00ebr t\u00eb trajtuar ngjarjet paralele dhe rrjedh\u00ebse, por kanali nuk ofron performanc\u00ebn m\u00eb t\u00eb mir\u00eb. N\u00ebn kanal ka nj\u00eb logjik\u00eb t\u00eb komplikuar t\u00eb bllokimit. Prandaj, un\u00eb b\u00ebra disa ndryshime n\u00eb implementimin, duke rikuperuar bllokimet dhe vlerat atomike n\u00eb z\u00ebvend\u00ebsimin e kanaleve p\u00ebr optimizimin e performanc\u00ebs.<\/p>\n<p>P\u00ebr m\u00eb tep\u00ebr, garbage collector n\u00eb Golang \u00ebsht\u00eb i pap\u00ebrdorur, \u00e7ka shkakton ndonj\u00ebher\u00eb ndalese t\u00eb dyshimta t\u00eb gjata. Kjo e pengon shum\u00eb funksionimin e aplikacioneve rrjedh\u00ebse n\u00eb koh\u00eb reale.<\/p>\n<h4>CGO<\/h4>\n<p>\nN\u00eb projekt p\u00ebrdoret nj\u00eb bibliotek\u00eb ekzistuese VP8\/H264 Golang me burim t\u00eb hapur p\u00ebr kompresimin e mediave dhe Libretro p\u00ebr emulator\u00ebt e loj\u00ebrave. T\u00eb gjitha k\u00ebto biblioteka jan\u00eb thjesht mb\u00ebshtjellese t\u00eb bibliotek\u00ebs C n\u00eb Go duke p\u00ebrdorur <noindex><a rel=\"nofollow\" href=\"https:\/\/golang.org\/cmd\/cgo\/\">CGO<\/a><\/noindex>. Disa nga disavantazhet jan\u00eb renditur n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/dave.cheney.net\/2019\/10\/06\/use-internal-packages-to-reduce-your-public-api-surface\">at\u00eb postim t\u00eb Dave Cheney<\/a><\/noindex>. Problemet me t\u00eb cilat u p\u00ebrballa:<\/p>\n<ul>\n<li>pamund\u00ebsia p\u00ebr t\u00eb kapur crash n\u00eb CGO, madje edhe me ndihm\u00ebn e Golang RecoveryCrash;<\/li>\n<li>pamund\u00ebsia p\u00ebr t\u00eb identifikuar ngushtic\u00ebn n\u00eb performanc\u00eb, kur nuk mund t\u00eb zbulojm\u00eb probleme t\u00eb detajuara n\u00eb CGO.<\/li>\n<\/ul>\n<p><\/p>\n<h2>P\u00ebrfundim<\/h2>\n<p>\nArrita q\u00ebllimin tim \u2013 kuptova sh\u00ebrbimet e loj\u00ebrave n\u00eb re dhe krijova nj\u00eb platform\u00eb q\u00eb ndihmon n\u00eb loj\u00ebn e loj\u00ebrave retro nostalgjike me miqt\u00eb e mi online. Krijimi i k\u00ebtij projekti do t\u00eb ishte e pamundur pa bibliotek\u00ebn Pion dhe mb\u00ebshtetjen e komunitetit Pion. Jam shum\u00eb mir\u00ebnjoh\u00ebs p\u00ebr zhvillimin e tij t\u00eb intensifikuar. API-t\u00eb e thjeshta q\u00eb ofrojn\u00eb WebRTC dhe Pion siguruan nj\u00eb integrim t\u00eb qet\u00eb. Prova ime e par\u00eb konceptuale u l\u00ebshua n\u00eb t\u00eb nj\u00ebjt\u00ebn jav\u00eb, pavar\u00ebsisht se nuk e dija paraprakisht p\u00ebr lidhjen nj\u00eb-p\u00eb- nj\u00eb (P2P).<\/p>\n<p>Megjithat\u00eb, p\u00ebrve\u00e7 thjesht\u00ebsis\u00eb s\u00eb integrimit, transmetimi P2P \u00ebsht\u00eb nj\u00eb fush\u00eb shum\u00eb e komplikuar n\u00eb shkenc\u00ebn kompjuterike. Kjo i duhet t\u00eb merret me kompleksitetin e arkitekturave t\u00eb rrjetit p\u00ebr shum\u00eb vite, si IP dhe NAT p\u00ebr t\u00eb krijuar nj\u00eb sesion peer-to-peer. Gjat\u00eb pun\u00ebs n\u00eb k\u00ebt\u00eb projekt kam akumuluar shum\u00eb njohuri t\u00eb \u00e7muara rreth rrjetit dhe optimizimit t\u00eb performanc\u00ebs, prandaj rekomandoj t\u00eb gjith\u00ebve t\u00eb provojn\u00eb t\u00eb nd\u00ebrtuar produkte P2P duke p\u00ebrdorur WebRTC.<\/p>\n<p>CloudRetro mbulon t\u00eb gjitha skenar\u00ebt e p\u00ebrdorimit q\u00eb prisja, nga pik\u00ebpamja ime, si nj\u00eb lojtar retro. Megjithat\u00eb, besoj se ka shum\u00eb fusha n\u00eb projekt q\u00eb mund t'i p\u00ebrmir\u00ebsoj, si\u00e7 \u00ebsht\u00eb t\u00eb b\u00ebj rrjetin m\u00eb t\u00eb besuesh\u00ebm dhe performues, t\u00eb ofroj cil\u00ebsi m\u00eb t\u00eb lart\u00eb grafike t\u00eb loj\u00ebrave, ose mund\u00ebsin\u00eb p\u00ebr t\u00eb ndar\u00eb loj\u00ebrat midis p\u00ebrdoruesve. Po punoj shum\u00eb p\u00ebr k\u00ebt\u00eb. Ju lutem, mbani syt\u00eb nga <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/giongto35\/cloud-game\">projektin<\/a><\/noindex> dhe mb\u00ebshteteni n\u00ebse ju p\u00eblqen.<\/li>\n<\/ul>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/Voximplant\/blog\/511626\/\">habr.com<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041f\u041e \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0430, \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0430, \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0430, \u043a\u043e\u043c\u043c\u0443\u043d\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0430, \u0432\u0438\u0434\u0435\u043e\u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0430, \u0430 \u0447\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0438\u0433\u0440 \u043a\u0430\u043a \u0443\u0441\u043b\u0443\u0433\u0438? \u0423\u0436\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043f\u0440\u0438\u043d\u044f\u0442\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0445 \u0438\u0433\u0440 (Cloud Gaming), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Stadia, \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043d\u0430\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 Google. Stadia \u043d\u0435 \u043d\u043e\u0432\u0438\u0447\u043e\u043a \u0432 WebRTC, \u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c WebRTC \u0442\u0430\u043a \u0436\u0435? \u0422\u0445\u0430\u043d\u044c \u041d\u0433\u0443\u0435\u043d (Thanh [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":89304,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-89303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0433\u0435\u0439\u043c\u0438\u043d\u0433 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 WebRTC: p2p, \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440, zero latency | ProHoster\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-21T23:42:30+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-21T23:42:30+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Loj\u00ebrat n\u00eb cloud me burim t\u00eb hapur n\u00eb WebRTC: p2p, multiplayer, zero latency | ProHoster","description":"","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u0433\u0435\u0439\u043c\u0438\u043d\u0433 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u043d\u0430 WebRTC: p2p, \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u0435\u0440, zero latency | ProHoster","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/oblachnyj-gejming-s-otkrytym-ishodnym-kodom-na-webrtc-p2p-multipleer-zero-latency","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-21T23:42:30+00:00","article:modified_time":"2020-07-21T23:42:30+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"89303","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:12:27","updated":"2022-09-29 13:03:06","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/89303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=89303"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/89303\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/89304"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=89303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=89303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=89303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}