New site: is-ave-open.info

Status
Not open for further replies.

MonsterTKE

Senior Member
ECF Veteran
Verified Member
May 4, 2012
112
73
Georgia
So everyone knows how hard it is to order from AVE due to their popularity (This is going to go double when they reopen).
So I wrote this site to aid in getting there as soon as possible after they open, while hopefully reducing the load on their server as much as possible.

Is Alien Visions E-Juice open?

It refreshes all connected clients every 15 seconds, and when the site opens sounds an "Awooooga" horn and redirects to their page.
Their site only gets hit by my server every 15 seconds no matter how many people are connected, so this should significantly reduce server load on avejuice.com vs. everyone hitting f5, and you should never be more than 15 seconds behind the person who triggered the cache refresh.

As it stands right now I am scraping the front page for keywords, as those haven't been 100% set in stone I'll do my best to keep it up to date. Right now it is looking for "<h1>Closed For Today</h1>", and if it finds anything else it will see that as open, when the site actually works I'll make it look for a proper "Open" sign.

(To Ben: I would really love for you or your developer to add a simple true/false API that I could hit vs. scraping your page.)
 

MonsterTKE

Senior Member
ECF Veteran
Verified Member
May 4, 2012
112
73
Georgia
Hey Monster this is really cool! Great job! I will keep the page loaded and listed for the AWOOOGA!

Here you go, lol As soon as their site is finalized I will be adding some time checks to my code, It really only needs to be checked aggressively as opening time approaches, and once it is open it really only needs to check every 10 -20 minutes. After all noone is waiting around to see it close, and I want to be polite in hitting his server.

I tested it with 140,000 connections a minute, the site is really lightweight, no frameworks or anything to load, and its cached with APC, so unless half the vapers in the country hit it at the same time it should be good.
 

MonsterTKE

Senior Member
ECF Veteran
Verified Member
May 4, 2012
112
73
Georgia
ROFL. That's pretty awesome. When can we expect the release of the android app?

Soon, though I want/need to have a real API on AVE's end, then I can just run a little node.js app to hit that endpoint when needed and use Google cloud messaging to push to the app. Ill probably end up re-writing the entire thing in Node when I get to that point.
 

MonsterTKE

Senior Member
ECF Veteran
Verified Member
May 4, 2012
112
73
Georgia
Hey Monster this is really cool! Great job! I will keep the page loaded and listed for the AWOOOGA!

I implemented those changes I mentioned in V.05, so you can pretty much sit on the page 24/7. Before it just polled my server every 15 seconds and sent the data back to the client, my server would then poll Ave's site every 15 seconds and save the data, this way even if 1000 people are connected ave only gets hit every 15 seconds, which is no different than 1 user hitting f5.

This change scales the polling rate to the time of day, from 7:45 PST - 8:30 PST it polls my server every 10 seconds, from 8:31 - 12:00 every 30 seconds, and the rest of the time once a minute.

Let me know if you see any features that need adding or bugs that come up. I log a lot to the javascript console, f-12 in chrome, and you can watch the requests go out and come back. :)
 

MonsterTKE

Senior Member
ECF Veteran
Verified Member
May 4, 2012
112
73
Georgia
I'm not a computer expert but won't that put an extra burden on the server?

Exactly the opposite, it can honestly handle 1+ k requests a second without falling over. Assuming 1000 connections to my server, at peak times is 6000 requests a minute, from the standpoint of Ave's server, they only see 4 connections (from my server) in that same minute.

I sent Ben a facebook message yesterday, asking to talk to him about getting an API page that I can hit rather than scraping the site, that would reduce my impact on his site even further (No SQL to load, page to render, etc).
 

GwenB

Senior Member
ECF Veteran
Verified Member
Mar 16, 2013
222
156
Virginia Beach, Virginia
Exactly the opposite, it can honestly handle 1+ k requests a second without falling over. Assuming 1000 connections to my server, at peak times is 6000 requests a minute, from the standpoint of Ave's server, they only see 4 connections (from my server) in that same minute.

I sent Ben a facebook message yesterday, asking to talk to him about getting an API page that I can hit rather than scraping the site, that would reduce my impact on his site even further (No SQL to load, page to render, etc).

err....ok, sounds like you know what your doing. I'll use that. My husband is jonesing. Thank you for the link.
 

MonsterTKE

Senior Member
ECF Veteran
Verified Member
May 4, 2012
112
73
Georgia
Hey Monster! Great idea. Question: Is your site supposed to auto update/refresh? If I sit on the site in IE It shows the last time I checked. So if I checked at 7am at 9am it would still show 7am.

If it isn't supposed to refresh that's cool.

Great job!

I haven't tested it in IE, but its cached on the server so if nothing changes the site shouldn't change. If you can open f-12 then refresh the page you can see what it is doing in the "console" window. The original site content is loaded in with AJAX, so if you can see "YES" or "NO" instead of "CHECKING" its should be working fine.

Edit* Yep, works just like its supposed to in IE, you should see the text above "NO" go from Loading to No Change, after that happens it just refreshes silently unless something changes.
 
Last edited:
Status
Not open for further replies.

Users who are viewing this thread