btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 08:26:44 AM |
|
It would also be very nice if you could detect a laptop/device running on battery power and not mine in that case. http://www.google.com/search?q=get%20battery%20level%20java You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 08:27:26 AM |
|
Another question-- is this, or will it be, open-sourced?
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
pooler (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 09:57:25 AM |
|
Another question-- is this, or will it be, open-sourced?
Didn't read the thread, eh? ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Yes, the source will be released soon. That would be nice, but sadly a standard way of getting battery level information in Java doesn't seem to exist. You may be able to get it on some phones, but I don't think an unsigned applet can get that kind of information when running on a laptop. You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.
Not completely: dual-core mobile phones already exist. I will investigate, thank you for the suggestion!
|
BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
|
|
|
kano
Legendary
Offline
Activity: 4578
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 10:20:21 AM |
|
Another question-- is this, or will it be, open-sourced?
Didn't read the thread, eh? ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Yes, the source will be released soon. That would be nice, but sadly a standard way of getting battery level information in Java doesn't seem to exist. You may be able to get it on some phones, but I don't think an unsigned applet can get that kind of information when running on a laptop. You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.
Not completely: dual-core mobile phones already exist. I will investigate, thank you for the suggestion! Um - hang on a tick ... that should never be an issue. You do ask them before taking their CPU cycles right? You just simply say that "if they are on a mobile phone that they shouldn't" do it. Edit: and the same issue regarding a laptop on a battery ... if you ask and explain the consequences there should be no issue .... unless you hid the consequences ... but you wouldn't do that coz that would be scamming them ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif)
|
|
|
|
pooler (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 10:41:42 AM |
|
Um - hang on a tick ... that should never be an issue. You do ask them before taking their CPU cycles right? You just simply say that "if they are on a mobile phone that they shouldn't" do it. Edit: and the same issue regarding a laptop on a battery ... if you ask and explain the consequences there should be no issue .... unless you hid the consequences ... but you wouldn't do that coz that would be scamming them ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Unfortunately it's not that simple. I think opt-out is more practical than opt-in for most sites, otherwise I'm pretty sure that many visitors who don't mind simply wouldn't bother turning the miner on. Even if you start the applet on an opt-in basis, you certainly don't want the user to manually start the miner every time he goes from one page to another. You would probably use a cookie to remember the user's decision. So it would still be nice if the miner could automatically detect when a laptop is running on battery power and when it is not, as this could change at any time.
|
BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
|
|
|
pooler (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 01:14:31 PM |
|
I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets. That would mean one less problem to deal with. Can anyone confirm or refute this?
Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
|
BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
|
|
|
kano
Legendary
Offline
Activity: 4578
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 01:50:57 PM |
|
I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets. That would mean one less problem to deal with. Can anyone confirm or refute this?
Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
I am obviously talking about the first choice to start mining, not the page switch. When you first ask you also point out what they are doing (not hide it like a scammer) Your reply seems to directly imply that you don't ask - (since you didn't already have a cookie to remember their choice) - thus it sounds like you ARE stealing CPU cycles ...
|
|
|
|
terrytibbs
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 02:42:44 PM |
|
I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets. That would mean one less problem to deal with. Can anyone confirm or refute this?
Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
I am obviously talking about the first choice to start mining, not the page switch. When you first ask you also point out what they are doing (not hide it like a scammer) Your reply seems to directly imply that you don't ask - (since you didn't already have a cookie to remember their choice) - thus it sounds like you ARE stealing CPU cycles ... Oh cut it out with the stealing already. Am I stealing your screen space if you visit my website?
|
|
|
|
btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 02:46:51 PM |
|
I have done some research, and it looks like at present no mobile phone can run ordinary Java SE applets. That would mean one less problem to deal with. Can anyone confirm or refute this?
Of course the problem of laptops running on battery power still remains. I think the only satisfactory solution implies using cookies to remember users that have opted-out. My Javascript is a bit rusty, but if I remember correctly it shouldn't be too difficult to set these cookies client-side.
I am obviously talking about the first choice to start mining, not the page switch. When you first ask you also point out what they are doing (not hide it like a scammer) Your reply seems to directly imply that you don't ask - (since you didn't already have a cookie to remember their choice) - thus it sounds like you ARE stealing CPU cycles ... It should detect things like battery state and number of cpus, to offer reasonable defaults, or not even offer the option of running the miner. It's not even about whether you as the user or not.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 02:57:52 PM |
|
Another question-- is this, or will it be, open-sourced?
Didn't read the thread, eh? ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Yes, the source will be released soon. I skimmed it, but I must have missed that. Thanks. That would be nice, but sadly a standard way of getting battery level information in Java doesn't seem to exist. You may be able to get it on some phones, but I don't think an unsigned applet can get that kind of information when running on a laptop. I'm not a Java expert, but it would appear to be possible by interfacing with native OS APIs. For example, on Windows, use JNI or JNA to call native Windows API functions to monitor battery status. Native calls could also be investigated for Linux and OSX. Calling OS API functions from Java: JNA http://stackoverflow.com/questions/2389156/calling-win32-api-method-from-javaJNI http://www.atwistedweb.com/java/jni.htmlWindows Battery API functions: http://stackoverflow.com/questions/3154554/how-do-i-get-battery-information-in-windowshttp://stackoverflow.com/questions/233446/monitor-battery-charge-with-win32-apiI'm not saying it's easy or even possible at this point, but I think it warrants a bit more investigation. You also wouldn't want to mine if someone visits on a smartphone or some other low-powered device, but I guess the 2-core threshold will take care of that.
Not completely: dual-core mobile phones already exist. I will investigate, thank you for the suggestion! You're welcome.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
rTech
Sr. Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 305
Merit: 250
Trust but confirm!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 02:59:51 PM |
|
Well "to not steal" my clans website has warning before you can acces forum. It says that user solely accepts that we can use their cpu for mining if they step in our forum. None forces them to join my forum and its their freedom to decide if they want. Luckily finnish law is great and its fair enought to infrom users before they access. So practically its not stealing... There are no free meals, everything cost something for someone.
|
|
|
|
btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 03:01:02 PM |
|
Another suggestion/question.
If this miner is running on a site and I open the site in 5 tabs or in tabs in 2 different browsers, how is this handled? Will only one instance of the miner run? Even if people opt in, I think by default it should still limit the rate on their box so as to not hurt performance.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
pooler (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 04:02:47 PM |
|
The problem is that, unless I'm mistaken, it is not possible to make native calls from an unsigned applet. Another suggestion/question.
If this miner is running on a site and I open the site in 5 tabs or in tabs in 2 different browsers, how is this handled? Will only one instance of the miner run? Even if people opt in, I think by default it should still limit the rate on their box so as to not hurt performance.
That's another thing that is worth investigating. Of course at present every webpage loads its own miner, and that can be a problem if you have more than one page open. But... is it possible for an applet to detect the presence of other applets running?
|
BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
|
|
|
btc_artist
Full Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 154
Merit: 102
Bitcoin!
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
November 30, 2011, 04:42:44 PM |
|
That's another thing that is worth investigating. Of course at present every webpage loads its own miner, and that can be a problem if you have more than one page open. But... is it possible for an applet to detect the presence of other applets running?
Could it be done based on CPU usage? If CPU usage is above a certain level, don't start the miner.
|
BTC: 1CDCLDBHbAzHyYUkk1wYHPYmrtDZNhk8zf LTC: LMS7SqZJnqzxo76iDSEua33WCyYZdjaQoE
|
|
|
pooler (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2011, 12:36:17 AM |
|
If this miner is running on a site and I open the site in 5 tabs or in tabs in 2 different browsers, how is this handled? Will only one instance of the miner run? Even if people opt in, I think by default it should still limit the rate on their box so as to not hurt performance.
That's another thing that is worth investigating. Of course at present every webpage loads its own miner, and that can be a problem if you have more than one page open. But... is it possible for an applet to detect the presence of other applets running? Well, it turns out it is possible after all. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) I have updated the jar file; now if you open a second tab the second applet should refuse to start mining. I have not had the time to test it extensively; as always, if you encounter any issue please let me know.
|
BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
|
|
|
BitcoinPorn
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2011, 12:43:41 AM |
|
I am still taken back that someone finally up and made this work again, I swear there was a time I had a stack of suggestions and things, but as I am not a coder I never knew how hard or easy it is to do. I am thinking on a web site to design around this. Things are working pretty smooth so far, the ability to tweak as many settings as you have made tweakable is already making this better than previous online miners imo.
|
|
|
|
kano
Legendary
Offline
Activity: 4578
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2011, 02:37:51 AM |
|
Well "to not steal" my clans website has warning before you can acces forum. It says that user solely accepts that we can use their cpu for mining if they step in our forum. None forces them to join my forum and its their freedom to decide if they want. Luckily finnish law is great and its fair enought to infrom users before they access. So practically its not stealing... There are no free meals, everything cost something for someone.
Well then yes that's not scammer material ... The problem will be though that when other people use your version it should ask them once somewhere before it can mine.
|
|
|
|
BitcoinPorn
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 02, 2011, 02:51:54 AM Last edit: December 02, 2011, 03:05:08 AM by BitcoinPorn |
|
The real scam here is advertisers that allow sound pop ups or even embedded flash ads, that have sound enabled by default, and don't give me a pop up warning, an email, an instant message, and a fax, before the sound is blasting through my speakers.
Kano, your view of what a scam is skewed or you have some kind of personally history with technologies that have the ability to be good and bad, what is going on here man, where does this hard on for web mining come from? You seem to be pestering the people who want to use it legitimately. Is the fear someone uses a botnet and opens a thousand browser windows to mine or something? That is the only worst case scenario I can think of, but honestly there may be more I am not, I am curious where your hate comes from.
Edit: In fairness, is it my view that is skewed where I believe that even knowing that it will be abused by somebody, there can be good to come from this?
|
|
|
|
pooler (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 03, 2011, 06:44:28 PM |
|
For all those who wanted to play with the Javascript API but didn't know where to start: I have written a simple widget that allows visitors to start/stop the miner, and uses a cookie to make the decision persistent. http://jsfiddle.net/pooler/XB5Fg/This is an opt-out version, i.e., the miner is auto-started by default. An opt-in version can easily be obtained by changing the condition in the "if" at the end of the code.
|
BTC: 15MRTcUweNVJbhTyH5rq9aeSdyigFrskqE · LTC: LTCPooLqTK1SANSNeTR63GbGwabTKEkuS7
|
|
|
mc_lovin
Legendary
Offline
Activity: 1190
Merit: 1000
www.bitcointrading.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
December 22, 2011, 06:13:04 AM |
|
Hm.. Not sure what's happening, but I think i'm falling in love with Litecoin all of a sudden.
|
|
|
|
|