Writing p2p programs in javascript and html

May 4th, 2008

Traditionally it has only been possible to create web-pages with the client-server model. This model is based upon the web browser connecting to a web server, requesting a web page and displaying the result. The last 3-4 years Ajax and web 2.0 has been all the rage, and has greatly improved how a web page can interact with the web server. With Ajax a web page can do async requests to a web server, and this makes it possible to construct programs out of a web page. A great example of this is Google Maps.


Using PeerAware it is now possible to create peer-to-peer web pages, or even combine the best from a client-server architecture with p2p. With PeerAware you run your own private p2p workspace, and all communication goes between connected members. The user-interface to the workspace is a web page with chat functionality, where all chat commands are sent across the p2p network to all connected members. It is the same communication path that can be used by customized web-pages. The owner of a PeerAware workspace decides what web-page should be loaded for members who connect to his workspace, and this web-page has a set of javascript functions available that can be used for communication between instances of the page.


To illustrate the concept a tutorial is available for those who want to use or make their own p2p javascript programs. I hope you enjoy this, it can be a lot of fun! If you have PeerAware installed you can also connect directly to the tutorial workspace.

Another example of this concept is the shared whiteboard that is part of the default workspace. This is a lot more advanced than the tutorial workspace, but if you are interested, the code is located in the html folder in the PeerAware program installation. This defaults to C:\Program Files\PeerAware in english language installations.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • TwitThis

Posted in Uncategorized |

Comments

4 Responses to “Writing p2p programs in javascript and html”

  1. h o pe program Says:

    [...] through HTML and java script. A tutorial shows how rock paper scissors was implemented, along wihttp://blog.peeraware.com/2008/05/04/writing-p2p-programs-in-javascript-and-html/Horizon of Hope?Our Story &middot Our Products &middot Get Involved &middot Your Stories &middot [...]

  2. mpl Says:

    [...] through HTML and java script. A tutorial shows how rock paper scissors was implemented, along wihttp://blog.peeraware.com/2008/05/04/writing-p2p-programs-in-javascript-and-html/ServicesMPL Corporation: Computing, telecommunications and multimedia [...]

  3. Daniel Says:

    I read similar article also named Writing p2p programs in javascript and html, and it was completely different. Personally, I agree with you more, because this article makes a little bit more sense for me

  4. Java Gaming Says:

    Good site I “Stumbledupon” it today and gave it a stumble for you.. looking forward to seeing what else you have..later

Leave a Reply

 Comment Form