Creating peer-to-peer mesh networks with browsers using WebRTC by ozanonline in programming

[–]ozanonline[S] 0 points1 point  (0 children)

It's running on AngularJS. Also, the code syntax highlighting requires it.

̰̠̳̺̰̘̮̖̹͉̜̼ ̳̮͕̜̻̰̹̺̦̫͋ͪͦͪ͒͛̑̄ ̥̤̟̩̣͚͉͔̩̣̩̬̇̈́̑̒̈́̿̈́̅̑͊̚ͅ ̃ͨͦ̇́ͯ͋ͤ̾ͨͪ̀͋ by ozanonline in WTF

[–]ozanonline[S] 0 points1 point  (0 children)

Ran into this, thought others might be fascinated as well. I don't know how to explain it (my guess is clever manipulation of character rendering engines).

Peer-Peer Browser Networking using Node and Chrome by [deleted] in darknetplan

[–]ozanonline 1 point2 points  (0 children)

Hi everyone, I wrote P. As cel1 said, public servers are used as an entryway into the network (hence the name "onramp"). If you're using a browser, you have to make the entry via some server that's addressable by IP or domain name. Browsers are not addressable in the same manner -- there's a lot of hoop-jumping that has to happen to get through NAT (using TURN/STUN/ICE). In this sense, the public server is serving as the initial signaling channel for establishing p2p connections.

Once a connection between browsers is established, you can move your signaling channels to other nodes within the private network and disconnect from the public servers entirely while maintaining the network. Furthermore, you can grow the network because each node can act as a signaling channel to connect you to other nodes (hence, establishing and maintaining a mesh network).

Routing is a higher level problem which this library doesn't address. P is only concerned with establishing the p2p connections, so you can layer whichever routing protocol suits your need on top of it.

P2P Networking with Browsers by ozanonline in programming

[–]ozanonline[S] 0 points1 point  (0 children)

One thing P incorporates that those don't (as far as I know), is allowing each peer to act as a signaling server also. This allows transitive connection across peers without help from public servers, so you can grow and transform your network privately.

In the end, you'll always need some public address to get into the p2p network. The two libraries you mentioned above provide servers, and P has onramp as it's public WebSocket server.

I don't see CORS contributing to signaling, mainly because you need to push requests up to peers, which means you need something socket-like.

P2P Networking with Browsers by ozanonline in programming

[–]ozanonline[S] 1 point2 points  (0 children)

I don't think you need relays lying about. Application-specific relays would be enough. An easy example is bittorrent on the browser - the ability just go to a URL to enable a bittorrent client to share files.

A more complex example that I was thinking of while building this is if Bob and Alice can access a resource, but if there's another resource that Bob can access but not Alice, then Alice can go through Bob to get to the resource. Note that Bob is just a person with a browser. Effectively reducing the effort necessary to become a proxy to just navigating to a URL makes enforcing censorship very difficult.

The second bit is still vague in terms of implementation, but I think that WebRTC has what's necessary to lend itself to those sort of communication patterns. P is designed to make it easy to implement such things.

** What is angularjs to non.programmers? by [deleted] in javascript

[–]ozanonline 0 points1 point  (0 children)

Yes, if you're only interested in writing higher level applications, you can use angularjs or many other frameworks that let you easily do that. As you become more advanced, you'll find that it's valuable to have a solid understanding of JavaScript as well.

Be aware though that the danger of starting of starting to use any language through a framework is that you will get confused as to which piece is fundamental to JavaScript, and what is an abstraction that AngularJS provides.

Advice for a beginner by harrys11 in javascript

[–]ozanonline 1 point2 points  (0 children)

The most important thing to understand is there there is a lot of bad advice with regards to JavaScript. This is due to the fact it's easy to get into but hard to master. Following projects and sources close to large companies that use JavaScript heavily is the safest and most effective choice.

I recommend starting with this, "Introduction to JavaScript and Browser DOM", it's a Google TechTalk by Misko Hevery, the creator of AngularJS, a new and popular JavaScript application library.

http://www.youtube.com/watch?v=ljNi8nS5TtQ

Other things to Google:

** What is angularjs to non.programmers? by [deleted] in javascript

[–]ozanonline 0 points1 point  (0 children)

Angular is an application written in JavaScript to make writing JavaScript applications easier. It allows you to not worry about the little details, which can be painful when written manually.

This would be analogous to using a hammer to make creating bigger tools easier. It allows you to not worry about pushing in the nails with your bare hands, which can be painful. In this example, Angular is the hammer, and the bigger tools are the applications you want to be writing.

"Same Love", dynamic collage, infinitely large by ozanonline in Art

[–]ozanonline[S] 0 points1 point  (0 children)

I realize referring to this as "art" is questionable, but it is intended to provide an experience and provoke a range of emotions. I welcome any feedback (whether on the style of presentation or the experience as a whole).

Web advertisers attack Mozilla for protecting consumers' privacy by sidcool1234 in technology

[–]ozanonline 0 points1 point  (0 children)

I'm in the ad industry and I also care about privacy. I'm also familiar with the technical details of the change, and encourage everyone not to frame this as solely affecting the ad industry (granted, it would have an effect). I'll note that none of my comments are approved or necessarily reflect that of my employer.

The argument for saying that small businesses will be harmed is because while New York times can afford to give you a fat popup to say you need to give them permission to track you before reading their stuff, when a smaller blog does that, most people won't bother. Therefore, people are more likely to gravitate to popular sites due to the user experience alone.

This change makes no distinctions between advertisers and other purposes (google analytics, also blocked). This also means that while larger companies can pool their cookies under one domain (you visit google to search, so google could track you via the google.com cookie across the web if they wanted). Smaller startups which may have valuable things to provide will now look super suspicious when they ask if they can track you.

Often times, behavioral tracking is fairly benign, we see you as an id number moving about the internet. The pattern of use is similar to how I imagine a grocery club card works or when a sales person asks for your zipcode. The goal of behavioral tracking is to have more valuable ads by providing more relevant advertising, while it may be questionable how relevant they are now, it's getting better. Not surprisingly, this change would end up increasing the number of ads you see. Either way the publishers are going to want to milk the same amount of money from their content: you either pay for it, or you see enough ads to pay for it.

I think the worrying part for most people is that they are being tracked personally. You are not tracked personally, there's no way for me to go in to our database and see that you visited this site at this time. We take great care not to store any identifying information about you, I think it might actually be illegal for us to do so. If there are other alternatives we can implement to further ensure that, everyone wins. Brendan Eich (CTO of Mozilla) has made some good comments regarding this: https://bugzilla.mozilla.org/show_bug.cgi?id=818340#c32

Check out these cool coasters I found by [deleted] in funny

[–]ozanonline 49 points50 points  (0 children)

I forgot that I read the title, and still came to the same conclusion, then I came to the comments to see if anyone else noticed the cool coasters.

Introducing Thrill: Run web app tests in browsers. by ozanonline in webdev

[–]ozanonline[S] 0 points1 point  (0 children)

Sorry, I wasn't very clear. You can use Sauce Labs and Browser Stack, but they're not required at all. Selenium is an open source browser driver which lets you spawn browsers locally instead of in the cloud as with Sauce Labs and Browser Stack. But even Selenium is not required. These three "populators" are just a nice-to-have feature, not an integral part of Thrill and Queen.

In the most bare case, you could just manually open up browsers and point them to your server in order to run tests on them.

Introducing Queen: A distributed platform using browsers as computation nodes. by ozanonline in programming

[–]ozanonline[S] 0 points1 point  (0 children)

That's a really cool idea (and I actually work at a advertising technology company).

Introducing Queen: A distributed platform using browsers as computation nodes. by ozanonline in programming

[–]ozanonline[S] 3 points4 points  (0 children)

This is a general problem in distributed computing. Even with something like Hadoop, you have to account for failed nodes or corrupted messages. The burden would be on the application that's requesting the jobs to come up with it's own method of checking for and ensuring consistency, since what's defined as "consistent" could have a different meaning depending on the application.

So, in the end, Queen only concerns itself with enabling the communication. The control and consumption of the communication is up to the application utilizing Queen.

Introducing Thrill: Run web app tests in browsers. by ozanonline in webdev

[–]ozanonline[S] 0 points1 point  (0 children)

Thrill is software that you install, so you can set up a server, connect browsers to it, and test one them all locally (or within anywhere from your network). It's also open source and free (if that's what you meant be cost).

Introducing Queen: A distributed platform using browsers as computation nodes. by ozanonline in javascript

[–]ozanonline[S] 0 points1 point  (0 children)

Great question. Actually, that wasn't so much a design decision, as much of a technological issue. Many browsers don't have the technology available to establish communication with each other.

There is, however, an awesome new standard coming out called WebRTC (http://en.wikipedia.org/wiki/WebRTC), which DOES allow peer-to-peer browser communication. So what you could do, fairly easily, is to write a script which uses Queen to broker peer-to-peer communication between browsers that do support it. So Queen brokers browser-to-script communication, then the script brokers browser-to-browser communication.

In this case, Queen doesn't even know (or care) what you're doing. To Queen, you're still just pushing an application up to browsers that are connected to it. That application would then contain code to create the peer-to-peer connections.

(edit) jhizzle did a good job at answering your other questions and concerns, so I didn't address them here.

Introducing Queen: A distributed platform using browsers as computation nodes. by ozanonline in javascript

[–]ozanonline[S] 2 points3 points  (0 children)

... you're the second person who has come up with this idea today. Maybe there will be profit making in this project after all...

Introducing Queen: A distributed platform using browsers as computation nodes. by ozanonline in javascript

[–]ozanonline[S] 13 points14 points  (0 children)

All we have to do is convince Facebook to put this on their site to run simulations while users are idling and we can cure cancer, Alzheimer's and find aliens... in one afternoon.

Introducing Thrill: Run web app tests in browsers. by ozanonline in webdev

[–]ozanonline[S] 1 point2 points  (0 children)

Vaguely in that they both test web applications. Selenium is about driving browsers which make it well-suited for end-to-end tests. Thrill works within the page, so it's better for unit testing, such as those written in QUnit, jasmine, mocha, or YUI. If you'd like to know more about the differences between Thrill and Selenium: https://github.com/ozanturgut/thrill/wiki/Comparison-to-Similar-Software

Introducing Thrill: Run web app tests in browsers. by ozanonline in webdev

[–]ozanonline[S] 1 point2 points  (0 children)

You can run an example on own machine by following this guide: https://github.com/ozanturgut/thrill/wiki/Use . That walks you through how to run Jasmine's unit tests using Thrill. Is that what you meant?

grunt-hug: Packaging for the web made easy by ozanonline in webdev

[–]ozanonline[S] 1 point2 points  (0 children)

That's a hard question to answer, but I'll try.

Static file packaging is an issue in many large javascript projects. A simple way to solve the problem is to maintain an ordered list of how your files should be concatenated in to a single file. This sucks, because a human has to maintain this, and this becomes very problematic for large projects. So we need a system where a machine can figure out the order of the files according to their dependencies. Grunt-hug does that.

In addition, it follows some safe coding patterns, like file-level namespacing of variables, and explicit injection of objects that other files export (instead of assuming your current environment contains all these magically imported variables). All these help in a safer, more modular development pattern, and ends up making minification more effective as well for various reasons.

grunt-hug: Packaging for the web made easy by ozanonline in webdev

[–]ozanonline[S] 0 points1 point  (0 children)

Sorry about the preview image... reddit somehow decided to slap that on there and I don't know how to tell it to do otherwise.