PeerMesh and WebRTC: An Interview with Cagatay and Emre

October 16, 2014
WebRTC to the help of GIS. There are times when you get these aha moments. My chat a few weeks ago with Cagatay and Emre was like that. GIS stands for Geographic Information System. It is all about mapping, which can easily require humungous amounts of data to be stored and then sent from the server to the client. I think that PeerMesh is the first attempt to add WebRTC to GIS and reduce the server load by using a peer-to-peer network natively in the browser for this use case. Cagatay Celebioglu (the UX designer) and Emre Esirik (the developer) were kind enough to share their answers with me here. The mapping parts of it I understood a bit less, but I think it is important to remember a few things about PeerMesh:
  1. It takes WebRTC to a place I have never seen done before (after 3 years of looking at this sapce, this is impressive)
  2. It has nothing to do with voice or video, but still looks very useful
  3. It took 2 people to pull it off, and they were clueless about WebRTC when they started. They are experts in GIS as far as I can tell
  4. They live in Turkey, which shows how global a phenomena WebRTC is
  What is PeerMesh all about? PeerMesh is a pure javascript library for p2p sharing that is using WebRTC technology to reduce bandwidth costs up to %90. It works as traditional CDNs and handles traffic bursts for better website performance. It supports 3D GIS JS API (Cesium). Tile based layers from multiple sources, including WMS, TMS, OpenStreetMap, Bing Maps, ArcGIS MapServer and standard image files are supported on CesiumJS. PeerMesh has an ability of sharing tile images between peer to peer and 2D GIS JS API supported element Leaflet (WMS, OpenStreetMap, Mapbox are supported on Leaflet). İt is highly scalable which means the more viewers you have more peers hosting the content. https://www.youtube.com/watch?v=Xr8_rcdxLIU   What is the problem with GIS that P2P can be of aid? We have always known that bandwidth and server load was a big issue on GIS applications. We also know that current internet-based GIS applications relies heavily on centralized server which has a lot of drawbacks. We have decided to adopt a decentralized network-based style to enable p2p technology on GIS. P2P technology can improve scalability/reliability, enhance the overall reliability and fault-tolerance, increase autonomy and enable ad-hoc communication and collaboration. By combining Web services and P2P technologies into GIS, we aim to add more flexibility and autonomy to GIS Web services systems, and alleviate to some degree the inherent limitations of centralized systems.

We have used webRTC technology to create unique content delivery network that is cheaper and faster than existing solutions. This technology enabled us to distribute GIS data tiles between the peers on both 2D and 3D GIS systems. It is a Lightweight pure Javascript API that can be integrate to any website easily without requiring users to install anything. This means that it works without browser plugins.   What excites you about working in WebRTC? WebRTC is an amazing technology and we think it will be more important for future of web. P2P CDN, web torrent idea with WebRTC is unbelievable. When we thought about sharing GIS tiles between P2P, we were so excited. When we started to work with WebRTC and succeeded to implement P2P data sharing over a unique content delivery network, we believed that it will decrease bandwidth usage and data will be received in shorter time.   Backend. What technologies and architecture are you using there? PeerMesh is pure javascript API. It provides P2P data sharing technology by using WebRTC. PeerMesh Server is using WebSocket and sharing peer connection information and handshake to p2p. For GIS, Leaflet and CesiumJS API is integrated to PeerMesh js API.   What were the challenges for you in adopting something like WebRTC? Finding sample code and discussion about WebRTC is a difficult. WebRTC is a complicated technology, however, the browser handles lots of things for you. After trying to run WebRTC examples, it works really nice. WebRTC is a standard of W3C but each browser implementation is different. So, WebRTC adapter is implemented for browser compatibility .   If you had one piece of advice for those thinking of adopting WebRTC, what would it be? Understanding webRTC’s architecture is the half way of work and adopting p2p enables web socket technology necessary. You should define your own data protocol, because WebRTC has not defined a protocol for sending and receiving data.  Understanding this, you have to define data flow and architecture so you can define a data protocol.   What’s next for PeerMesh? We will continue using p2p technology to share new GIS skills. We will also work on building android WebRTC API so we can support native applications on mobile.

You may also like