Jump to content




cx4 - ComputerCraft Cloud Chest. Store your data in the cloud.


  • You cannot reply to this topic
33 replies to this topic

#21 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 16 July 2015 - 03:55 AM

Well, not enough to be abused mercilessly. :P If an account uses a lot - where "a lot" is defined as megabytes, not gigabytes, it will get capped or removed. For uploading files and images in other Boomtree areas, it uses Amazon S3 so there's no worries there; but cx4 is storing data in the database at the moment, which means it will be limited pretty fast.

#22 PokeAcer

  • Members
  • 143 posts

Posted 16 July 2015 - 06:54 AM

View PostForgotten_Boy, on 16 July 2015 - 03:55 AM, said:

Well, not enough to be abused mercilessly. :P If an account uses a lot - where "a lot" is defined as megabytes, not gigabytes, it will get capped or removed. For uploading files and images in other Boomtree areas, it uses Amazon S3 so there's no worries there; but cx4 is storing data in the database at the moment, which means it will be limited pretty fast.


#23 biggest yikes

  • Members
  • 573 posts

Posted 20 July 2015 - 04:44 PM

//offtopic
Spoiler


#24 Yarillo

  • Members
  • 81 posts
  • LocationFrance

Posted 10 August 2015 - 03:42 PM

It worked extremely fine.
I could do everything I wanted very easily.

http://www.computerc...cket-me-system/

Thank you very much !
I hope my program won't rustle your servers. If it gets used a lot, you might have quite a number of ME Systems inventory dumps in your database. D:

Edited by Yarillo, 10 August 2015 - 04:00 PM.


#25 Xgamer911

  • New Members
  • 1 posts

Posted 10 August 2015 - 10:05 PM

View PostYarillo, on 10 August 2015 - 03:42 PM, said:

It worked extremely fine.
I could do everything I wanted very easily.

http://www.computerc...cket-me-system/

Thank you very much !
I hope my program won't rustle your servers. If it gets used a lot, you might have quite a number of ME Systems inventory dumps in your database. D:

I think you killed the server. I cannot access any part of it.

@Forgotten_boy
Could you publish the webserver code so servers could run their own? (It would also save your servers)

Also I have a website host with unlimited disk and and bandwidth(but in details it says I have 100000GB), if you need help with hosting.
Can't help you if you are running this on a VPS or anything.

Edited by Xgamer911, 10 August 2015 - 10:13 PM.


#26 Yarillo

  • Members
  • 81 posts
  • LocationFrance

Posted 11 August 2015 - 02:20 AM

View PostXgamer911, on 10 August 2015 - 10:05 PM, said:

View PostYarillo, on 10 August 2015 - 03:42 PM, said:

It worked extremely fine.
I could do everything I wanted very easily.

http://www.computerc...cket-me-system/

Thank you very much !
I hope my program won't rustle your servers. If it gets used a lot, you might have quite a number of ME Systems inventory dumps in your database. D:

I think you killed the server. I cannot access any part of it.

@Forgotten_boy
Could you publish the webserver code so servers could run their own? (It would also save your servers)

Also I have a website host with unlimited disk and and bandwidth(but in details it says I have 100000GB), if you need help with hosting.
Can't help you if you are running this on a VPS or anything.

I can't access it either.
Bummer.

#27 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 11 August 2015 - 04:50 AM

Yep you killed the server. In its defense, it did valiantly serve two requests per second many hundreds of times before getting bored.

It's back up, but to avoid a paywall appearing sooner than later, here's what you should do: less requests, much less often. Two per second seems overkill for anything that isn't connected to a medical device keeping a family member alive. :lol: It would also help if you read the Etag header and respected 304 return codes, however I don't know if CC's HTTP handling can really do that.

#28 Yarillo

  • Members
  • 81 posts
  • LocationFrance

Posted 11 August 2015 - 05:02 AM

View PostForgotten_Boy, on 11 August 2015 - 04:50 AM, said:

two requests per second many hundreds of times before getting bored.

It didn't seem like a lot but I'll keep it down !
I already cut by half the length of my requests. I'll try and find a way to limit their frequency.

You should build a safeguard inside the API on pastebin. Something that keeps track of the amount of characters requested and sent and calculates an average flow rate and doesn't let you do anything until that rate is under a certain point.

Edited by Yarillo, 11 August 2015 - 05:09 AM.


#29 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 11 August 2015 - 05:05 AM

There is a further bug in your program: upon restart it seems to have not got the correct cx4 key and is now spamming a non-existent URL nonstop despite receiving a 404 return code each time.

HTTP programming is pretty easy, but being respectful of someone's server takes a little extra work :) .

#30 Yarillo

  • Members
  • 81 posts
  • LocationFrance

Posted 11 August 2015 - 07:28 AM

Quote

upon restart it seems to have not got the correct cx4 key and is now spamming a non-existent URL nonstop despite receiving a 404 return code each time.
I tried to find what could possibly cause this but found nothing. Is it when it downloads or when it uploads ?

I might simply use Craft-A-Cloud by default if the servers can't hold my swag. It'll be way more stable. If my program gains in popularity (as of only 30 users for instance), I want it to be able to hold whatever happens.
I can't simply reduce the frequency to once a minute. The refreshing is manual. I'll make it boot on a locally stored copy of the latest content of the ME system though.

#31 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 11 August 2015 - 07:49 AM

You manually refreshed 2 times a second thousands of times? My server log is filled with several hours of this, repeated two to three times a second:
[Tue, 11 Aug 2015 07:27:13 GMT] "GET /guid/0.cc?location=1 HTTP/1.1" 404 156

That's abusive of my server - any server - and even a valid GET is simply not necessary at that speed. Definitely you will need to find your own host to have 30 users doing that; a webserver that handles 60 requests a second costs real money.

Since your program is still hitting my server, I've blocked your IP; if you want to try a version of your program that requests less than four times per hour, I'll let you back in. That's about the level of availability this is intended to support.

#32 Yarillo

  • Members
  • 81 posts
  • LocationFrance

Posted 12 August 2015 - 06:15 AM

Quote

Since your program is still hitting my server, I've blocked your IP
That's my server's IP

Quote

You manually refreshed 2 times a second thousands of times

I don't think so, no. But maybe. I don't know how your API works on the inside but on my side i'm sending two 4 chars long requests for each search in the database (the request, the response) and every once in a while I have to send a big one when it refreshes.

I'll cut down the automatic refresh on boot by saving the latest inventory locally and I'll keep you in touch. If you want you can unban me to try and see if it works. Otherwise, I already integrated craft-a-cloud and users can choose to use it by default via the options. But I started with yours and I'd very much like to stick with it.

Edited by Yarillo, 12 August 2015 - 06:25 AM.


#33 Forgotten_Boy

  • Members
  • 72 posts
  • LocationOntario, Canada

Posted 12 August 2015 - 06:29 AM

It will be when you start it up again / shift IPs. I'm blocking any IP that is attacking my server with your program; if others are using it then they have the same problem. Fix your program, I'll unblock. Thought I was pretty clear about how your program's operation is not acceptable for me, and is unlikely to be acceptable on any other freely provided server. What you're trying to do really should be done via socket connections and not HTTP requests. Yes it's possible, but extremely wasteful and you apparently won't take even basic steps to reduce the wastefulness as I've previously described.

#34 Yarillo

  • Members
  • 81 posts
  • LocationFrance

Posted 12 August 2015 - 06:33 AM

i'll just switch to another server/my own free one

Reducing the server load seemed like courtesy to me but it looks like you don't see it that way. I'll do it anyway but you won't get to see the results. I'm sorry but I don't have time to work around a picky host for a program that was supposed to be simple but already proved itself headache inducing because that

(but that's just the official version, I would have stuck with it if it weren't for your rudeness :/)

Edited by Yarillo, 12 August 2015 - 06:48 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users