NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
|
September 29, 2014, 02:55:17 AM |
|
What is the problem with HMAC-SHA512? If there is no problem with it, why use a weaker alternative?
Speed? (No seriously.) You know what, maybe it was just a dumb question, who is going to notice the speed difference even when you have a few thousand players online at the same time on one server. But I had to ask it anyway. I did some quick research, and I think I won't go with MD5 or SHA1 at least. Someone else made this speed test on the hash functions: MD5 10.275190830230713, 10.155328989028931, 10.250311136245728 SHA1 11.985718965530396, 11.976419925689697, 11.86873197555542 SHA256 16.662450075149536, 21.551337003707886, 17.016510963439941 SHA512 18.339390993118286, 18.11187481880188, 18.085782051086426 atodorov.org/blog/2013/02/05/performance-test-md5-sha1-sha256-sha512/ And there's an older one here: http://www.cryptopp.com/benchmarks.htmlThe HMAC, if I understand it correctly, does two hashing calculations. So if MD5 = 20, and SHA512 = 36 ... (Okay okay, maybe it's a really dumb question.) The main statement hashes all 10000 entries one by one. This statement is executed 1000 times in a loop, which is repeated 3 times. So if I understand it correct it takes 18 seconds to make 30,000,000 SHA512 hashes according to that test? That's like 0.000006 second/hash? Sure MD5/SHA1 is 2x faster, but still it's basically nothing. Better make sure your server, database, code (including client-side), etc. are all good than fixing non-issues :p
|
|
|
|
a1choi
|
|
September 29, 2014, 06:00:45 AM |
|
Dicebitco.in? its not safe after the issues. I would rather stay away from it
I dont think this thread was saying anything about the safety of the site, just what it's coded in..
|
|
|
|
newIndia
Legendary
Offline
Activity: 2226
Merit: 1052
|
|
September 29, 2014, 02:02:36 PM |
|
What is the problem with HMAC-SHA512? If there is no problem with it, why use a weaker alternative?
Speed? (No seriously.) You know what, maybe it was just a dumb question, who is going to notice the speed difference even when you have a few thousand players online at the same time on one server. But I had to ask it anyway. I did some quick research, and I think I won't go with MD5 or SHA1 at least. Someone else made this speed test on the hash functions: MD5 10.275190830230713, 10.155328989028931, 10.250311136245728 SHA1 11.985718965530396, 11.976419925689697, 11.86873197555542 SHA256 16.662450075149536, 21.551337003707886, 17.016510963439941 SHA512 18.339390993118286, 18.11187481880188, 18.085782051086426 atodorov.org/blog/2013/02/05/performance-test-md5-sha1-sha256-sha512/ And there's an older one here: http://www.cryptopp.com/benchmarks.htmlThe HMAC, if I understand it correctly, does two hashing calculations. So if MD5 = 20, and SHA512 = 36 ... (Okay okay, maybe it's a really dumb question.) The main statement hashes all 10000 entries one by one. This statement is executed 1000 times in a loop, which is repeated 3 times. So if I understand it correct it takes 18 seconds to make 30,000,000 SHA512 hashes according to that test? That's like 0.000006 second/hash? Sure MD5/SHA1 is 2x faster, but still it's basically nothing. Better make sure your server, database, code (including client-side), etc. are all good than fixing non-issues :p I think a simple PHP-MySQL dice site may run fine on amazon cloud with real time update achieved by Ajax. All those node.js, socket.io seems redundant !!!
|
|
|
|
NLNico
Legendary
Offline
Activity: 1876
Merit: 1295
DiceSites.com owner
|
|
September 29, 2014, 02:30:19 PM |
|
No, AJAX would be terrible, you would have A LOT of requests, basically every second. You really should use a socket for that. However, you can definitely make a socket server in PHP. There are some libraries for it too: Ratchet, React, Wrench, PHudBase, PHPws, etc. A socket is an open connection between the client (browser) and server with bidirectional communication. If you make a bet, you send the info through the socket (and you get the result) and if others bet you get the bets from there. So it's all real-time, you only connect once. There are different libraries/servers for this, Socket.io is a popular one made in node.js. Perfect for a dice site.
An alternative is indeed getting new data with AJAX requests. With that, the browser would make a connection/request every x seconds to see if there are new bets. Obviously for a dice site this would be pretty terrible and give big lag and other problems. However AJAX is useful for other purposes.
|
|
|
|
newIndia
Legendary
Offline
Activity: 2226
Merit: 1052
|
|
October 05, 2014, 10:18:02 PM |
|
No, AJAX would be terrible, you would have A LOT of requests, basically every second. You really should use a socket for that. However, you can definitely make a socket server in PHP. There are some libraries for it too: Ratchet, React, Wrench, PHudBase, PHPws, etc. A socket is an open connection between the client (browser) and server with bidirectional communication. If you make a bet, you send the info through the socket (and you get the result) and if others bet you get the bets from there. So it's all real-time, you only connect once. There are different libraries/servers for this, Socket.io is a popular one made in node.js. Perfect for a dice site.
An alternative is indeed getting new data with AJAX requests. With that, the browser would make a connection/request every x seconds to see if there are new bets. Obviously for a dice site this would be pretty terrible and give big lag and other problems. However AJAX is useful for other purposes.
I was checking the All Bets section of www.onedice.me ...is not this data refreshing is done through Ajax ?
|
|
|
|
MaryKris
Member
Offline
Activity: 109
Merit: 10
|
|
October 06, 2014, 01:01:47 AM |
|
What about Primedice? Love to make one soon.
|
|
|
|
BitCoinDream
Legendary
Offline
Activity: 2394
Merit: 1216
The revolution will be digital
|
|
October 06, 2014, 06:12:32 PM |
|
What about Primedice? Love to make one soon.
Here u get the details of PrimeDice and a few others... I like the idea of knowing this, so let's make an overview (grouped by backend language, not really sorted) Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | |
More / corrections? Let us know
|
|
|
|
m19
|
|
October 07, 2014, 01:34:36 PM |
|
Any ideas on where the most gambling sites are hosted? Most of them use CloudFlare so you can't easily find the actual hosting provider.
|
|
|
|
Dabs
Legendary
Offline
Activity: 3416
Merit: 1912
The Concierge of Crypto
|
|
October 07, 2014, 01:37:21 PM |
|
The other question is, what servers are these sites using? Where are those located? How much? What's a good domain name? (I mean, maybe, the extension.)
Obviously, some of them are on a dot com, but is that really a good idea or would something else be better. (This is to avoid certain governments from seizing the domain names.)
|
|
|
|
RocketSingh (OP)
Legendary
Offline
Activity: 1662
Merit: 1050
|
|
October 08, 2014, 10:32:06 PM |
|
OP updated as per latest data found in the thread...
|
|
|
|
newIndia
Legendary
Offline
Activity: 2226
Merit: 1052
|
|
October 09, 2014, 09:33:31 AM |
|
Well, for example pocketdice.io sends a PHPSESSID cookie, so it's safe to say they use PHP ( https://pocketdice.io/index.php works too ). Besides that, you can easily see the socket.io socket. A socket is an open connection between the client (browser) and server with bidirectional communication. If you make a bet, you send the info through the socket (and you get the result) and if others bet you get the bets from there. So it's all real-time, you only connect once. There are different libraries/servers for this, Socket.io is a popular one made in node.js. Perfect for a dice site. An alternative is indeed getting new data with AJAX requests. With that, the browser would make a connection/request every x seconds to see if there are new bets. Obviously for a dice site this would be pretty terrible and give big lag and other problems. However AJAX is useful for other purposes. If the site is coded in Java, can the use of Java threading solve the problem of real time update ?
|
|
|
|
dogedice.me
|
|
October 09, 2014, 11:08:22 AM |
|
Busy gambling sites need to provide high security as well as serve high traffic. In which language today's top sites are coded ? Which DB are they using ? I'm listing a few sites below. Please post if u know about their configuration. If u know about a site which is not in the list, please post that too... Following table is updated as per latest data found in this thread... Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | | BitDice.me | nginx | PHP | socket.io | --- | AngularJS | Satoshibet.com | --- | --- | --- | mySQL+mongo | --- |
Hey, why there's second BitDice.me with PHP settings? That's ain't true
|
|
|
|
Skoupi
Sr. Member
Offline
Activity: 252
Merit: 250
Skoupi the Great
|
|
October 09, 2014, 02:50:00 PM |
|
Interesting post. I didn't know node.js is so popular already for web apps
|
|
|
|
RocketSingh (OP)
Legendary
Offline
Activity: 1662
Merit: 1050
|
|
October 09, 2014, 05:44:37 PM |
|
Busy gambling sites need to provide high security as well as serve high traffic. In which language today's top sites are coded ? Which DB are they using ? I'm listing a few sites below. Please post if u know about their configuration. If u know about a site which is not in the list, please post that too... Following table is updated as per latest data found in this thread... Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | | BitDice.mePocketDice.io | nginx | PHP | socket.io | --- | AngularJS | Satoshibet.com | --- | --- | --- | mySQL+mongo | --- |
Hey, why there's second BitDice.me with PHP settings? That's ain't true Oops... that was my editing mistake. I forgot to change the first column while editing the table for PocketDice.io. @dogedice.me It is nice to see U here. Care to tell us the column values for dogedice.me/bitdice.me ?
|
|
|
|
dogedice.me
|
|
October 09, 2014, 08:45:58 PM |
|
Busy gambling sites need to provide high security as well as serve high traffic. In which language today's top sites are coded ? Which DB are they using ? I'm listing a few sites below. Please post if u know about their configuration. If u know about a site which is not in the list, please post that too... Following table is updated as per latest data found in this thread... Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | | BitDice.mePocketDice.io | nginx | PHP | socket.io | --- | AngularJS | Satoshibet.com | --- | --- | --- | mySQL+mongo | --- |
Hey, why there's second BitDice.me with PHP settings? That's ain't true Oops... that was my editing mistake. I forgot to change the first column while editing the table for PocketDice.io. @dogedice.me It is nice to see U here. Care to tell us the column values for dogedice.me/bitdice.me ? Thanks I use tubesock to hijack rack and implement WebSockets in RoR, client code is my own with re-connection and error handling. I do not have any front-end as it's single page app, JavaScript is written with CoffeScript and its pure jQuery with Bootstrap.
|
|
|
|
RocketSingh (OP)
Legendary
Offline
Activity: 1662
Merit: 1050
|
|
October 09, 2014, 09:02:11 PM |
|
Busy gambling sites need to provide high security as well as serve high traffic. In which language today's top sites are coded ? Which DB are they using ? I'm listing a few sites below. Please post if u know about their configuration. If u know about a site which is not in the list, please post that too... Following table is updated as per latest data found in this thread... Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | | PocketDice.io | nginx | PHP | socket.io | --- | AngularJS | Satoshibet.com | --- | --- | --- | mySQL+mongo | --- | bitdice.me | nginx | RoR | tubesock | --- | CoffeScript |
Hey, why there's second BitDice.me with PHP settings? That's ain't true Oops... that was my editing mistake. I forgot to change the first column while editing the table for PocketDice.io. @dogedice.me It is nice to see U here. Care to tell us the column values for dogedice.me/bitdice.me ? Thanks I use tubesock to hijack rack and implement WebSockets in RoR, client code is my own with re-connection and error handling. I do not have any front-end as it's single page app, JavaScript is written with CoffeScript and its pure jQuery with Bootstrap. I'm not very familiar with some of the technologies U r talking about. I have updated your row with what I understood. Please let me know if those are fine... It'd be great to know which DB U r using here...
|
|
|
|
dogedice.me
|
|
October 09, 2014, 09:47:34 PM |
|
Busy gambling sites need to provide high security as well as serve high traffic. In which language today's top sites are coded ? Which DB are they using ? I'm listing a few sites below. Please post if u know about their configuration. If u know about a site which is not in the list, please post that too... Following table is updated as per latest data found in this thread... Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | | PocketDice.io | nginx | PHP | socket.io | --- | AngularJS | Satoshibet.com | --- | --- | --- | mySQL+mongo | --- | bitdice.me | nginx | RoR | tubesock | --- | CoffeScript |
Hey, why there's second BitDice.me with PHP settings? That's ain't true Oops... that was my editing mistake. I forgot to change the first column while editing the table for PocketDice.io. @dogedice.me It is nice to see U here. Care to tell us the column values for dogedice.me/bitdice.me ? Thanks I use tubesock to hijack rack and implement WebSockets in RoR, client code is my own with re-connection and error handling. I do not have any front-end as it's single page app, JavaScript is written with CoffeScript and its pure jQuery with Bootstrap. I'm not very familiar with some of the technologies U r talking about. I have updated your row with what I understood. Please let me know if those are fine... It'd be great to know which DB U r using here... BitDice.me & bitdice.me are the same As main storage I use MySQL, Redis is being used to all realtime data & caching.
|
|
|
|
RocketSingh (OP)
Legendary
Offline
Activity: 1662
Merit: 1050
|
|
October 10, 2014, 11:39:42 AM |
|
Busy gambling sites need to provide high security as well as serve high traffic. In which language today's top sites are coded ? Which DB are they using ? I'm listing a few sites below. Please post if u know about their configuration. If u know about a site which is not in the list, please post that too... Following table is updated as per latest data found in this thread... Site | Server | Backend | Socket lib | DB/Storage | Frontend | Just-Dice.com | | Node.js | socket.io | redis+MySQL | | PrimeDice.com | Cowboy | Node.js | socket.io | PostgreSQL | EmberJS | DiceBitco.in | nginx | Node.js+Express | Primus | | AngularJS | Dicenow.com | nginx | Node.js+Express | socket.io | | AngularJS | Satoshibet.com | nginx | Node.js | socket.io | | | MoneyPot.com | Cowboy | Node.js | socket.io | PostgreSQL | | PRCDice.eu | MS-IIS | .NET | SignalR | | | Win88.me | MS-IIS | .NET | ServiceStack | | AngularJS | Peerbet.org | MS-IIS | .NET | --- | | | Dice.ninja | cyclone | Python | sockjs-cyclone | MySQL | | luckyb.it | | Python+Flask | --- | | | Rollin.io | Apache | PHP+laravel | socket.io | | | BitDice.me | nginx | RoR+RabbitMQ | | Redis+MySQL | | PocketDice.io | nginx | PHP | socket.io | --- | AngularJS | Satoshibet.com | --- | --- | --- | mySQL+mongo | --- | bitdice.me | nginx | RoR | tubesock | --- | CoffeScript |
Hey, why there's second BitDice.me with PHP settings? That's ain't true Oops... that was my editing mistake. I forgot to change the first column while editing the table for PocketDice.io. @dogedice.me It is nice to see U here. Care to tell us the column values for dogedice.me/bitdice.me ? Thanks I use tubesock to hijack rack and implement WebSockets in RoR, client code is my own with re-connection and error handling. I do not have any front-end as it's single page app, JavaScript is written with CoffeScript and its pure jQuery with Bootstrap. I'm not very familiar with some of the technologies U r talking about. I have updated your row with what I understood. Please let me know if those are fine... It'd be great to know which DB U r using here... BitDice.me & bitdice.me are the same As main storage I use MySQL, Redis is being used to all realtime data & caching. Oops... U r already listed there. I dint notice. I'm Sorry...
|
|
|
|
247casino
Newbie
Offline
Activity: 56
Merit: 0
|
|
October 10, 2014, 01:32:36 PM |
|
a lot of high end scripts are compiled to protect the companies IP work
so they say what they use, but inside can have a hybrid of languages and often due if you actually get to the source
|
|
|
|
RocketSingh (OP)
Legendary
Offline
Activity: 1662
Merit: 1050
|
|
October 10, 2014, 03:46:04 PM |
|
a lot of high end scripts are compiled to protect the companies IP work
so they say what they use, but inside can have a hybrid of languages and often due if you actually get to the source
Do u hav experience in running a real gambling site ? If yes, can u plz tell us the concurrent connections it experiences on an average ? By concurrent connections here I mean the real time visitors shown by Google analytics.
|
|
|
|
|