Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrader Script #37

Open
4 tasks
iBotPeaches opened this issue Jan 27, 2014 · 3 comments
Open
4 tasks

Upgrader Script #37

iBotPeaches opened this issue Jan 27, 2014 · 3 comments
Assignees
Milestone

Comments

@iBotPeaches
Copy link
Member

Its useless trying to do all these "bad" standards in Leaf v3. We need to build the good foundation for Halo 5 / Destiny / Titanfall / whatever the hell gives us stats.

So these things need to go

  • stupid MySQL. Mongo or redis only
  • Remove 0x00 based indexing in Mongo
  • Use ZRANK index for leaderboards in redis
  • Write script to run gamertags through our new system importing them. Lets do 5 every 2 minutes. That should take about 3 days.
@ghost ghost assigned iBotPeaches Jan 27, 2014
@0xdeafcafe
Copy link

Mongo

Are you sure you want to keep using that? I've heard so about it corrupting once it hits a relatively large data.

@iBotPeaches
Copy link
Member Author

I've done research into others like Foundation, Couch, Cassandra and RethinkDB.

Out of all of them. RethinkDB is coined as "Mongo without the problems", however its native plugin support for PHP is non-existent, so I'd have to write my own ORM to plug into Laravel so I don't have to write shitty code again.

As for the problems with Mongo. Those problems are rare, and nothing really happens except you loose all the last 1 minute of data as the memory hasn't paged back to disks yet. I don't have anything important that goes on there.

It could use some more research. Though Mongo has a huge community behind it, so I might just stick with it. Plowing the path with brand new stuff is difficult, but then again. If you write a driver for something, you are a pretty cool cat.

I'll see.

@iBotPeaches
Copy link
Member Author

Note for myself.

Redis is absolutely amazing, but can't handle ties. I think to handle this, the below will work. Assuming the stock information

CSR | Name | KD
50 iBotPeaches 1.44
50 Pyrosquirrell 0.50
50 Major_Nelson 2.00

Redis is key-value, so we can only store csr and name. We can cheat this by appending the KD onto the number. However, this breaks because we can't split the number back up, because how do you know if 50.144 is a CSR 50 with a KD of 1.44 or 14.4. Obviously its not 14.4, but the problem still remains.

If you use 6 right padded zeros, with a 7th digit explaining the decimal point after CSR, it should work. That makes the above data.

50.1440001
50.0500000
50.2000001
  1. CSR 50, last number is 1, therefore after CSR move decimal one point to get 1.44 kd
  2. CSR 50, last number is 0, therefore .50 kd.
  3. CSR 50, last number is 1, therefore 2 kd.

This should work. Will make unit-tests and confirm thoughts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants