Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,802 members, 7,810,090 topics. Date: Friday, 26 April 2024 at 08:30 PM

Build A JAMB Result Checking Website To Win 150,000 Naira - Programming (5) - Nairaland

Nairaland Forum / Science/Technology / Programming / Build A JAMB Result Checking Website To Win 150,000 Naira (63324 Views)

President Buhari Voice Recognition Program - Contest For 50,000 Naira / Build A Mobile App Without Knowing Any Programming Language or line of code. / Convert Existing Website To Phone App? (2) (3) (4)

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (12) (Reply) (Go Down)

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Phemmmy(m): 9:39pm On Apr 01, 2012
Why the need for building a new website?
I think the solution to that is just to increase their bandwidth.
Similar thing happened to CNN,SKY and BBC website on the terrorist attack day.I mean 9/11.
Whereby people couldn't access their website.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Babaggio: 10:14pm On Apr 01, 2012
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 4 hours & 28 minutes
As I said before, you cannot separate script performance from server capacity. A bad script with horrible algorithms can be 1000 times slower than a well-written script with optimal algorithms, such that you will need 1000 servers to do the job that one server can do with a good script. You can argue that in JAMB's case the script was not the problem, but you can't prove it unless you obtain the scripts currently being used by JAMB, benchmark them, and compare them with the best script written by participants in this contest ad running on the same server. Without this information, the entire debate is pointless, so I will need the debate to end right now.
.
------------------------------------------------------------------
There's a touch of arrogance in your last statement, which doesn't sit well with me. Are you saying that we can not learn one thing or two from what other people have posted in this thread?
I'm sure those who are interested in taking up your challenge have started working now. There is no need to be dictatorial about what opinions people offer. Lock the thread if you don't want people to question your authority/opinion!
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 11:09pm On Apr 01, 2012
@Babaggio: It was just authoritative. Well, I'm sorry about that, but I'm trying to run a contest and it's so hard each time I come back to this thread only to notice that, apparently, a ₦150,000.00 prize is not enough to convince people to learn Python.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by DualCore1: 11:31pm On Apr 01, 2012
dayhawk: @dualcore you are the only person to give a good answer because you sound like you understand the complexity behind complex systems. surely your data server architecture determines how master servers interact with slaves especially if you are restricted to a resource.
these days people tend to cling to "is a" and "part of" rather than top-down or data driven( method of programming)
this is because the former which mean 'class' and the lather which means 'object' reduces the complexity and hence organizes the hierarchy. these systems are canonical, the server architecture must not be superb but the code is...

this is why sites like google, facebook, twitter etc is still leading today. they experience no downtime because they create scripts that organize there resources before use and point them to a unique output sources, !! with no down time

what seun want exactly is simply: a code,a complex system method,a design.
with PHP this can be achieved easily.

1. create 15 similar db's on different servers and upload the same content
2. on the 15 servers upload 1 for each the jamb script default.php( this means that the should be 15 scripts in 15 servers
3. 15 domains or subdomains. any/
3 create an base server.(this is your 11th server and your main server...
now in your main server upload, index.php, inside jamb.org.ng/unifiedtme/
depending on what your .htaccess defines as your index,


inside index.php
------------------------------------
<?php
$a=rand(1,15);// rand number from 1 to 15
$b="http://www.jamb".$a."."."org.ng";//creates http://jambX.org.ng, where x is a random number btwn 1-15
$c=$b."/unifiedtme/default.php";// makes http://jambx.org.ng/unifiedtme/default.php

header('location:'.echo($c).''); // automatically redirects the person to a random server out of the 15 jamb servers


?>



in the default.php
simply setup your html form
<form action="process.php" method="post" name="jambresult">
<input type="text" name"jambinput" /><hr />
<h3>enter your reg num/SN/PIN</h3>
<a href="javascript:#" onclick="jambstart()" />
</form>

<div style="position:absoulute; top:40%; left:40%;height:auto; width:auto; z-index:100; visibility:hidden" id="divload">
<img src="processing.gif" />
</div> <!-- this animated image which writes processing, displays for 10 seconds before the jamb form is submitted -->

<script>
jambstart()
{
setTimeout('jambwait()',10000)
var x=document.getElementById('divload')
x.style.visibility="visible";
//
}
jambwait()
{
document.jambresult.submit()
}

<!-- this 10 seconds implement helps because the -->

</script>



------------------------------------------------------------------------------------


now process.php

<?php
ini_set('max_execution_time',30); //means this script executed over 30seconds then it times out
ini_set('memory_limit',90500M); //increases the ram
include('config.php'); //dont use persistent connection
incude('check_class.php');
?>
<?php

$jin=mysql_real_escape_string(stripslashes(striptags($_POST['jambinput'])));
$check=new result($jin) // sends data to the class 'result' ;
$check->good_e();

if($check)
{
}
?>


---------check_class.php--------------------------

<?php
class result
{
function __construct($in) //takes data from
{
$this->in=$in;
$this->update=mysql_query("SELECT * FROM userresult WHERE regnum='$in' OR sn='$in' OR pin='$in'"wink;
}

function good_e()
{
return $this->in;
if(mysql_num_rows($this->update) < 1)
{
echo "<script>alert('WRONG SN/PIN/REGNUM!')</script>"
}
else
{
setcookie("dog",$this->in,time()+2000); //sets cookie up after verification
header('location:result.php'); //r
}

}

?>


--------result.php------------

<?php


ini_set('max_execution_time',40); //means this script executed over 30seconds then it times out
ini_set('memory_limit',9050M); //increases the ram
include('config.php');
$bin=$_COOKIE['dog'];
$binx=mysql_query("SELECT * FROM userresult WHERE regnum='$in' OR sn='$in' OR pin='$in'"wink
sleep(10) // sleeps delays the person for 10 more seconds so that so many other people can aswell access the script without overload
$data=mysql_fetch_array($binx);

echo($data['subject1']);
echo($data['subject2']);
echo($data['subject3']);
echo($data['subject4']);
echo($data['regnum']);
echo($data['name']);
echo($data['examnum']);

mysql_close();
?>


------NOTE AS I SAID ALL THESE SCRIPT MUST BE ON EVERY SERVER EXCEPT THE MAIN SERVER and ALL THE SERVERS MUST
BE PHP 5.6 ENABLED AND MUST HAVE DATABASES ALL WITH IDENTICAL STRUCTURES AND DATA.

thanks


-LOVE Y'aLL thumbs up everyone.... blazedesigns . co . cc

07064595646

I appreciate the time you have spent writing this and I like your logic. This may not work for very huge websites but it should work for JAMB. The only point of failure I see is if the servers are not much so the range given to rand() is so small it will almost always hit same number for a couple of connections.

Taking this to the clouds may be risky because the clouds will never (as of my writing) beat a physically located dedicated server when it comes to reliability and availability.


Seun: the entire debate is pointless, so I will need the debate to end right now.
It is not pointless, you just don't see the point and that's understandable.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by doncigalo: 1:31am On Apr 02, 2012
techytom: @doncigalo
Please Explain what you mean by timers. Can you also give an insight on how http requests and responses could help speed up the website's performance

Sure, in regards to http requests and responses, u minimize as much as possible the number of HTTP requests that your app makes to the web server. The logic behind that is each HTTP request to the server and its corresponding response eats up CPU usageside (server ) and introduces incremental delays, so by minimizing the amount of HTTP requests you lower the amount of CPU usage and incremental delays thereby optimising ur app and preventing server overloading as well.

As for the use of the timers, it is a way of benchmarking ur app, setting up timers in different code sections of ur app can find out with part of ur app is slow and optimising that section according. Another use of timers is to set the maximum time that an app should carry out a request, especially a server request , so if takes 2 secs to carry out a particular request, u cud write a function that stops that particular process if it exceeds more than 2 seconds.


@dualcore How can a physically located dedicated server be more reliable than a cloud based one?? Thats not possible. I dont think your ever had the chance to use a cloud based server, cuz if you have, you would know the amount of redundancies that are implemented. Im talking about master-slave/master-master configurations in conjunction with a backup database that is based in another location (the backup process is even done via satellite), Im talking about standby generators (2 not even 1), Im talking about underground bunkers. Lets not forget the number of technicians, both database and network , that are looking after these systems 24/7/365 and even the security personnel as well.

So how can a cloud based server be more reliable than a physically located server ?? Its not just possible.

To prove the point; why didnt Safaricom, the company behind the MPESA platform (largest mobile payment platform),go for a local dedicated server ? They have the technical and financial capability being a major telco company in sub Saharan Africa, instead they hosted the application on a cloud based servers being hosted by a British company called Rackspace. This is a financial application that demands 99.9% availability.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by dayhawk(m): 4:12am On Apr 02, 2012
yamakuza:

if u can do the above in 4 hrs, u should be able to learn Python and port it in 4 days.

Using Python and not PHP, is the only way u can win the money.

You stand a good chance of winning. Dont u want the money? $1k!

yamakuza,

dualcore:


in my next code i will try as much as i can to speak parsel tongue...
i want to ensure Seun doesn't have a reason not to invest till he's hands down

@dual core , the rand(1,15) will work very well,though its crude ... yet its still rand for Gods! sake. its worth
more than just a try cus im certain it will work.

seun:
"getting the real jamb script for benchmarking!! "

yeah thats necessary because some functions like 'for()' loop function will make your script as slow as 150s.
if its looping a real var 5times above or looping a function
jamb engineers are doing the wrong thing
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by dellnet: 4:34am On Apr 02, 2012
Seun, I have to say I have never seen anyone that gives out reward just to find the right person to work with. I am not interested in your money but may the right man research further and win this contest. This is what I have observed with jamb site.
1. It runs on IIS 7
2. ASP.NET scripts
3. Somewhere in Germany
Running some simple diagnostic tools, I came to the conclusion that it is a terrible script / misconfiguration on the server's part that makes the site to go down. However, scripts should be able to properly configure the server.
To reproduce my observation do the following:
1. go to http://jamb.org.ng/Unifiedtme/default.aspx
2. Start netstat (in windows I run it with -b to see all executables and addresses)
3. Key in a PIN/reg number...whatever
4. Go back to netstat and refresh the command. You will see 2 ports open just to check the result. The lesser port number eventually closes after some fews seconds (5-10secs?). The higher port to sidmach server stays open for about 2 mins.

Now if we do the math in I.P networks, we have only about 65k ports minus about 1.2k reserved ports per I.P address. So roughly about 64k ports available to service millions of request. Imagine if the available 64k ports will all have to wait for about 120 seconds before they are free, how many backlogs will be waiting on the server?

2 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 4:41am On Apr 02, 2012
Some rules have been relaxed:
- The deadline for indicating interest in the contest has been lifter, to increase the pool of contestants.
- The deadline for submitting your final entry has been shifted forward slightly to Sunday 2nd April at 11pm.
Go, go, go, go, go! Code away.

@dell_net: Love the way you think. What you've observed is the HTTP keepalive timeout. Wrong conclusion, though.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by dellnet: 4:45am On Apr 02, 2012
why do you say the connection timeout is not holding the resources?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 4:55am On Apr 02, 2012
I meant to say that while the 120s keepalive timeout is definitely tying down some resources, the issue has nothing to do with the number of TCP/IP ports (you can have more than 64000 simultaneous connections on a server). The problem is that every connection consumes some memory, and probably requires a separate thread depending on the architecture of IIS.

There are probably also configured limits on the number of simultaneous active/pending connections, so when those limits are reached, the server will stop accepting new connections.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Nairaplus(m): 4:59am On Apr 02, 2012
Seun:
I want to promote Python3 & CherryPy in Nigeria. I also want to bring great programmers out of the closet (for jobs).
Exactly what I thought when I read this comment. Thank God Seun is upfront enough to say it.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by agabaI23(m): 6:23am On Apr 02, 2012
Seun welldone. This is a concealed interview I think.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by DualCore1: 7:04am On Apr 02, 2012
doncigalo:
@dualcore How can a physically located dedicated server be more reliable than a cloud based one?? Thats not possible. I dont think your ever had the chance to use a cloud based server, cuz if you have, you would know the amount of redundancies that are implemented. Im talking about master-slave/master-master configurations in conjunction with a backup database that is based in another location (the backup process is even done via satellite), Im talking about standby generators (2 not even 1), Im talking about underground bunkers. Lets not forget the number of technicians, both database and network , that are looking after these systems 24/7/365 and even the security personnel as well.

So how can a cloud based server be more reliable than a physically located server ?? Its not just possible.

To prove the point; why didnt Safaricom, the company behind the MPESA platform (largest mobile payment platform),go for a local dedicated server ? They have the technical and financial capability being a major telco company in sub Saharan Africa, instead they hosted the application on a cloud based servers being hosted by a British company called Rackspace. This is a financial application that demands 99.9% availability.
There are a gazzilion Cloud Vs. Dedi papers out there, grab one.
I have things in the cloud and on the ground and I speak for my self and know what I am talking about regarding what's in the cloud and what's on the ground.
People get swayed by the gimmicks thrown to them by the web hosting industry. I see beyond those gimmicks and tell it as it is. You really haven't seen stuff gotten lost in the cloud so you really won't appreciate staying on the ground.

My views.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by womer: 7:41am On Apr 02, 2012
A inefficient script would require a more powerful server to handle the same amount of traffic that a more efficient script would handle effortlessly on a wimpy server.
[img]http://www.filii.info/g.gif[/img]
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by omni1: 8:16am On Apr 02, 2012
Best ever written script, poor servers and technologies also Database structure/ admin equals a waste of resources.

I guess the spec of trying to bring out best geeks or programmers should simply be limited to or changed to have ONLY Python based programmers. Allowing all other languages will do better to suffice for your former claim @Seun. Don't always be intimidated by PHP ok?

@Programmers Money must not always motivate us to do things. When are most of us going to stop acting so hungry? Just so bad the world knowing how hungry some of us are. Even if you've not seeing such an amount before, be amazed with style before your PC and not publicly here.

Success to contestants in Python. All my other PHP lookers, let's be cheering at them yet getting the same problem solved with our preferred programming language.

One last thing, I think someone here actually needs Python coders and since none is showing up a better approach as this is invented to lure that needed coder out of his haven.

¤PHP for life!¤
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by dayhawk(m): 8:33am On Apr 02, 2012
*omni:
Best ever written script, poor servers and technologies also Database structure/ admin equals a waste of resources.

I guess the spec of trying to bring out best geeks or programmers should simply be limited to or changed to have ONLY Python based programmers. Allowing all other languages will do better to suffice for your former claim @Seun. Don't always be intimidated by PHP ok?

@Programmers Money must not always motivate us to do things. When are most of us going to stop acting so hungry? Just so bad the world knowing how hungry some of us are. Even if you've not seeing such an amount before, be amazed with style before your PC and not publicly here.

Success to contestants in Python. All my other PHP lookers, let's be cheering at them yet getting the same problem solved with our preferred programming language.

One last thing, I think someone here actually needs Python coders and since none is showing up a better approach as this is invented to lure that needed coder out of his haven.

¤PHP for life!¤

omni thank you!! you just made my day...
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kodewrita(m): 8:47am On Apr 02, 2012
Hypothetical question: What if you only do the retrieving of data once and convert the result into a picture that you cache (at data entry) on your server or an Amazon Web Service bucket?

When the JAMB applicant comes, we simply use the USER ID or unique user hash to retrieve the appropriate file from Amazon. No hits on our db besides the login sequence and all the stress goes to the image server (wherever it might be).

Besides, most people only check their result 1-3 times( a score of 60 in JAMB does not breed return visits).

As for login, if you supply JAMB with a particular OpenID compliant email address, we can simply handover login authentication to Yahoo or Google and only use the verified user email to generate a hash for retrieving your image from AWS. If you are not registered with us, then NO hash and NO hash means NO result. (Side effect being that a hacked yahoo account means NO JAMB result :grin: )

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by playmode(m): 9:11am On Apr 02, 2012
Sorry Seun ,will love to partake but 150Gs is not even half of what i charge to build my websites.If Waec needs a proper jamb website hosted on offshores with 99% uptime they should stop being stingy and let me know.I will also throw in a free mordern logo design because their current logo is beyond old school.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by realpeople: 9:53am On Apr 02, 2012
The money is too small compared to what the website will generate. shocked shocked

THese are my requirements

1. I can only come in here when the prize tag is N2.5 million. So that i wont be angry in future when my work is making waves in the market.
2. I will be one of the administrators to the DB
3. JAMB will employ me on different base along side my co-workers

If all these requirements are met then expect my script on Friday.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Funkymallam(m): 10:17am On Apr 02, 2012
realpeople: The money is too small compared to what the website will generate. shocked shocked

THese are my requirements

1. I can only come in here when the prize tag is N2.5 million. So that i wont be angry in future when my work is making waves in the market.
2. I will be one of the administrators to the DB
3. JAMB will employ me on different base along side my co-workers

If all these requirements are met then expect my script on Friday.

Dreamer! Dream on.

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by DualCore1: 10:53am On Apr 02, 2012
playmode: Sorry Seun ,will love to partake but 150Gs is not even half of what i charge to build my websites.If Waec needs a proper jamb website hosted on offshores with 99% uptime they should stop being stingy and let me know.I will also throw in a free mordern logo design because their current logo is beyond old school.

You had the full rights to ignore the thread and move on with your life without having to make a post making yourself a loud mouth.
Some people just make posts like their lives depended on it.

3 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 1:29pm On Apr 02, 2012
kodewrita: Hypothetical question: What if you only do the retrieving of data once and convert the result into a picture that you cache (at data entry) on your server or an Amazon Web Service bucket?
Memory is a more likely bottleneck than the CPU, so storing the data in a more bulky format (as an image) will probably slow things down because 1.5 million images would require more RAM than the data used to construct the images. Simple applications like JAMB result checking (and Nairalist) don't require advanced optimizations. Just design your DB and queries carefully such that each page requires very few queries, all of which are perfectly indexed, and your performance would be fantastic.

1 Like

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by dellnet: 1:47pm On Apr 02, 2012
Seun, You should judge this work from IP stack down to http not just from http stack to the application itself. This will give you a fairer ground to judge the submissions of this contest based on the standards on how a webserver operate. You can surely have more than 65k connections to a http server but what about the IP connection? (IPv4 by far is the most common method of connection to the web.)
Also note that some web-servers automatically spawn script base on the concurrent limitation etc. However, I don't want to spoil the hunt game so I reserve much of the technical input till the deadline is over.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by kodewrita(m): 1:54pm On Apr 02, 2012
Seun:
Memory is a more likely bottleneck than the CPU, so storing the data in a more bulky format (as an image) will probably slow things down because 1.5 million images would require more RAM than the data used to construct the images. Simple applications like JAMB result checking (and Nairalist) don't require advanced optimizations. Just design your DB and queries carefully such that each page requires very few queries, all of which are perfectly indexed, and your performance would be fantastic.

I see. If am getting you right, there's more to gain from MySQL indexing than incurring extra memory burdens due to externally requesting the images.

My earlier assumption though was that all you had to store was the URL which could be given to the user as a static AWS url effectively incurring no cost from your own server with that borne by the client's machine.


thanks though. Good stuff.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Vigilante: 1:59pm On Apr 02, 2012
Most people simply believe Seun wants to make a kill out of this project.
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 2:14pm On Apr 02, 2012
Vigilante: Most people simply believe Seun wants to make a kill out of this project.
What kind of kill do you mean? Would people be more interested if I ask them to write completely useless things?
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by jeebz: 2:25pm On Apr 02, 2012
Talk is cheap
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by sebastinta(m): 2:37pm On Apr 02, 2012
Enuf talk nd start working on d site...would have love to join but havnt work on python b4.
BTW a good programmer should nt fink abt d money, but wat u can do dat stands out amongst odas
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Fayimora(m): 3:06pm On Apr 02, 2012
C'mon guys! Can we leave al these hardware blah blah talk. It is freaking pointless here. I believe that is not what the change is all about. It says build a ... not optimize or write a technical report on .... 'We all' know that an application is only a starting point but again, that is not the point here. That is why it is a challenge!

If you look at it from a different angle, you are getting paid for an open source project. I think the prize money is more than enough, as long as my conversions are correct(£595)..lol
Re: Build A JAMB Result Checking Website To Win 150,000 Naira by techytom(m): 3:17pm On Apr 02, 2012
Hello folks...

I've finally included support for python 3
I've also improved the speed of data access
The templates also look cleaner.

it is found here. you can checkout the code or download the most recent code available for download
http://code.google.com/p/emergency-jamb-result-checker/downloads/list

2 Likes

Re: Build A JAMB Result Checking Website To Win 150,000 Naira by Seun(m): 3:37pm On Apr 02, 2012
@techytom: You're on your way to winning the contest, though I wish you knew how to use mercurial. Keep workin'

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) ... (12) (Reply)

Meet Dare Obasanjo Who Works With Microsoft / The Greatest Programmer On Nairaland / Funny Programming Memes. Just For Laughs

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 85
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.