{"id":13482818,"url":"https://github.com/PixelsCommander/ViralJS","last_synced_at":"2025-03-27T13:32:47.215Z","repository":{"id":146587685,"uuid":"43702460","full_name":"PixelsCommander/ViralJS","owner":"PixelsCommander","description":"Express.JS middleware to enable P2P distribution for your app. Your decentralized CDN made easy.","archived":false,"fork":false,"pushed_at":"2016-08-10T10:24:48.000Z","size":3777,"stargazers_count":961,"open_issues_count":5,"forks_count":51,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-03-21T11:14:34.529Z","etag":null,"topics":["expressjs","nodejs","p2p","webrtc"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PixelsCommander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-10-05T17:45:14.000Z","updated_at":"2025-02-10T20:06:42.000Z","dependencies_parsed_at":"2023-05-02T18:01:56.455Z","dependency_job_id":null,"html_url":"https://github.com/PixelsCommander/ViralJS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FViralJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FViralJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FViralJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PixelsCommander%2FViralJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PixelsCommander","download_url":"https://codeload.github.com/PixelsCommander/ViralJS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245854686,"owners_count":20683398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","nodejs","p2p","webrtc"],"created_at":"2024-07-31T17:01:05.789Z","updated_at":"2025-03-27T13:32:46.253Z","avatar_url":"https://github.com/PixelsCommander.png","language":"JavaScript","readme":"![ViralJS](https://github.com/PixelsCommander/ViralJS/blob/master/figures/logo-small.png?raw=true)\n\nExpressJS middleware for P2P Web apps distribution\n==================================================\nTo reduce server load, latency and establish self-maintainable CDN based on your users browsers.\n\n[![Join the chat at https://gitter.im/PixelsCommander/ViralJS](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/PixelsCommander/ViralJS?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n- [Website](http://pixelscommander.github.io/Viral.JS/)\n- [Demo](http://pixelscommander.com:3000)\n- [Article about](http://pixelscommander.com/en/interactive-revolution/what-is-beyond-isomorphic/)\n\nInstalling from NPM\n-------------------\n`npm -i viraljs`\n\nHow to use?\n-----------\n\n```js\nvar ViralContainer = require('viraljs');\nvar viralContainer = new ViralContainer();\nmyExpressApp.use(viralContainer.middleware);\n```\n\nIsomorphism blurred boundaries between server and client. The only difference between them currently is server\\`s ability to distribute application to clients. What if we go further enabling client to do this? What if we erase boundaries between server and client completely? In this case every client which got application\\`s code becomes it`s distributor or carrier. And drawing the analogy with spreading microorganisms in the nature this technique perfectly matches “**viral JavaScript**“ naming.\n\nMotivation\n----------\nP2P content distribution allows to reduce server load and decrease network latency since peering could be setup in the way content to be delivered from the nearest peer available. For example after hitting corporative network application will be delivered inside of it using high speed internal channels without creating a load on company`s internet channel.\n\n![Normal distribution](https://github.com/PixelsCommander/ViralJS/blob/master/figures/normal_m.png?raw=true)\n\n\u003csub\u003e\u003csup\u003eTraditional app distribution. Server sends package many times, corporative internet channels are loaded appropriately\u003c/sup\u003e\u003c/sub\u003e\n\n![P2P distribution](https://github.com/PixelsCommander/ViralJS/blob/master/figures/p2p_m.png?raw=true)\n\n\u003csub\u003e\u003csup\u003eIn case of P2P distribution application hits corporative network once and then is distributed using high speed internal network. This reduces server load and corporative internet channel load\u003c/sup\u003e\u003c/sub\u003e\n\nOr another case – once application got from USA to Europe it is delivered inside of European networks only without creating transatlantic traffic.\n\n![Normal distribution](https://github.com/PixelsCommander/ViralJS/blob/master/figures/normal_world_m.png?raw=true)\n\n\u003csub\u003e\u003csup\u003eIt takes a lot of transatlantic trips to transmit an app when doing it in a traditional way\u003c/sup\u003e\u003c/sub\u003e\n\n![P2P distribution](https://github.com/PixelsCommander/ViralJS/blob/master/figures/p2p_world_m.png?raw=true)\n\n\u003csub\u003e\u003csup\u003eP2P allows to reduce number of transcontinental transfers and reduce server load\u003c/sup\u003e\u003c/sub\u003e\n\nBy distributing application via P2P you create a self-establishing and self-evolving CDN which moves data closer to client.\n\nBug tracker\n-----------\n\nHave a bug? Please create an issue here on GitHub!\n\nhttps://github.com/PixelsCommander/ViralJS/issues\n\nLicense\n-------\nMIT: http://mit-license.org/\n\nCopyright 2015 Denis Radin aka [PixelsCommander](http://pixelscommander.com)\n","funding_links":[],"categories":["JavaScript","Modules","📦 Legacy \u0026 Inactive Projects","webrtc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPixelsCommander%2FViralJS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPixelsCommander%2FViralJS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPixelsCommander%2FViralJS/lists"}