Page 5 of 7
Posted: Mon Sep 10, 2007 7:54 pm
by ASDen
1. Get it to work without javascript.
2. Get it to work without a browser. (CLI Version)
Why This Easy Stuff ?
I'm getting it to work without an Internet Connection .
Anyway have you tested it?
Posted: Mon Sep 10, 2007 9:26 pm
by Luke
ASDen, whenever somebody tells you that this is not multi-threading, you simply repeat that it is and that this has been stated before. You still have not explained how this is in any way multi-threading. Would you please just admit that what you are doing is not multi-threading or explain to us what detail we're all missing. Many (if not all) of the most knowledgeable members on this forum have explained (some of them several times) to you that this is not multi-threading and that what you are doing could be accomplished better, and less nonsensically with fsockopen. Using javascript for this provides no benefits that I can see. Please explain to me how this will benefit my application in any way.
Also, don't tell me to read the whole thread because I did.
Posted: Mon Sep 10, 2007 10:19 pm
by jeffery
astions wrote:ASDen wrote:challenging requests
1. Get it to work without javascript.
2. Get it to work without a browser. (CLI Version)
Threading is not possible with PHP CLI but you can achieve similar results by using Unix style forking:
http://au2.php.net/manual/en/ref.pcntl.php
Posted: Tue Sep 11, 2007 6:41 am
by n00b Saibot
ASDen wrote:1. Get it to work without javascript.
2. Get it to work without a browser. (CLI Version)
Why This Easy Stuff ?
I'm getting it to work without an Internet Connection .
lmao
but seriously code gave me bunch of js errors...
Posted: Tue Sep 11, 2007 8:00 am
by ASDen
To
The Ninja Space Goat:-
Would you please just admit that what you are doing is not multi-threading or explain to us what detail we're all missing
what I'm doing here is providing Multi-Threading functionality to an environment which doesn't support it of course it's not like Threading in C or Java but to quite an extent it do the job with features:-
1. Performing at the same time
2. communication between threads
3. Providing Synchronization of data delivered in all threads
4. Provided a process object that holds the threads communicating directly with each other
5. Providing a direct communication between user and threads (Threads can give orders Through Js to browser)
Most of these Features were used in the Jsim example (except the process notion added later)
( I slitted the reply look below)
Posted: Tue Sep 11, 2007 8:00 am
by ASDen
what you are doing could be accomplished better, and less nonsensically with fsockopen
That's not true as for the following reasons :-
1.
The Cpu load :- using sockets will result in a high server cpu load (especially for high client number) compared to using this class as the load is shared between the Server and the Client
2.
Connectivity to user :- when using the class the threads is connected Directley to the user through a Js function (ChangeBag)
3.
Memory Load :-using sockets from the server to it self will make to pay for all the memory cost (it opens the page handles both way connections)
4.
Availability :- fsockopen() and sockets in general is banned in a good deal of free hosting services (Good Experienced ones Esp.) and this is due to - as i think - bandwidth bleeding application based on it and the functionality they offer and i really think that nearly it will be banned in all free hosts and a number of low-paid hosting while Ajax case is client dependent which is a good point
Posted: Tue Sep 11, 2007 8:01 am
by ASDen
Please explain to me how this will benefit my application in any way.
in a numerous number of ways :-
1. Building really interactive interfaces
2. making real usage of the server processor (Focus on this point)
3. making full usage of your connection (download managers/multiple RSS readers) [And this point also]
4. benefiting real threading abilities in Apache 2/IIS
At last really thanks to your Unbiased attitude
Posted: Tue Sep 11, 2007 8:02 am
by ASDen
To
n00b Saibot :-
but seriously code gave me bunch of js errors...
do you use the link Or the code itself?
in what browser ?
what are these errors?
Posted: Wed Sep 12, 2007 1:41 am
by n00b Saibot
ASDen wrote:do you use the link Or the code itself?
Your provided link
http://7zone1.110mb.com/Jsim.php
ASDen wrote:in what browser ?
XP SP2, IE7
ASDen wrote:what are these errors?
IE7 wrote:Error[Line 56]: The data necessary to complete this operation is not yet available.
Relevant Code:
Code: Select all
function ChangeBag()
{
// all requests go here so it's our bag and here telling bag script if a thread finished
for (var x=0;x<i;x++)
{
if (t[x].request.readyState >= 3 && t[x].Tnum!=-1)
{
eval(t[x].request.responseText); // <--- HERE
//alert(t[x].request.responseText);
//t[x].Tnum=-1;
}
}
}
Error repeated atleast three times before i got to see the `10`...
I won't argue about Multi-threading vs. Multi-Tasking since that of no use... but atleast you can aim towards cross-browser compatibility & exact functioning under all possible circumstances...
Posted: Wed Sep 12, 2007 12:24 pm
by John Cartwright
I get an empty page with this error repeating,
Code: Select all
Error: syntax error
Source File: http://7zone1.110mb.com/AjT.js
Line: 56, Column: 134
Source Code:
var d = new Date();document.getElementById("M").innerHTML="1";var d = new Date();document.getElementById("M").innerHTML="2";var d = new
Posted: Wed Sep 12, 2007 8:32 pm
by jeffery
You have some coding errors:
Code: Select all
<br />
<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>/www/110mb.com/7/z
/o/n/e/1/_/_/7zone1/htdocs/ThreadComHelper.php</b> on line <b>59</b><br />
<br />
<b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/www/110mb.com/7/z
/o/n/e/1/_/_/7zone1/htdocs/ThreadComHelper.php</b> on line <b>60</b><br />
Posted: Thu Sep 13, 2007 4:02 am
by Chris Corbyn
jeffery wrote:You have some coding errors:
Code: Select all
<br />
<b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>/www/110mb.com/7/z
/o/n/e/1/_/_/7zone1/htdocs/ThreadComHelper.php</b> on line <b>59</b><br />
<br />
<b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/www/110mb.com/7/z
/o/n/e/1/_/_/7zone1/htdocs/ThreadComHelper.php</b> on line <b>60</b><br />
I suspect you just need to make the directory writable, although some error checking would be good.
Posted: Sat Sep 15, 2007 5:53 pm
by ASDen
To
n00b Saibot:-
Error[Line 56]: The data necessary to complete this operation is not yet available.
I tried it in IE7 it said there are errors-like-IE6 but didn't interrupt
atleast you can aim towards cross-browser compatibility & exact functioning under all possible circumstances...
I want to say two things:-
1. cross-browser is only in displaying issues but in case of Performing browser has no effect
2. ALL the problem is FF is the only browser - i tried - that implements Ajax as it should and IE is the most one who volatile it Especially it requires to get the whole page to load in screen which rises Previous errors (ignored in safari/opera)
To
Jcart :-
I get an empty page with this error repeating,
Weired thing Details about browser Please .
Posted: Sat Sep 15, 2007 6:04 pm
by ASDen
To
jeffery &
d11wtq :-
The problems are things in code i left as it doesn't affect viewer it just requires what
d11wtq said or just a @ just for good looking to FireBug users
To
The Ninja Space Goat:-
Did you vanish Or you just wanted to ask ?
---------------------------------------------------------
I have something i want to hear from all of you about
i finished another communication memory that uses Memory not files in a more optimized way for Access , Synchronization , simpler code BUT -as you can guess - it requires something that is not available to all hosts well let's make it a speed-optimized alternative
I use MySql Heap Engine/Table so the problem is MySql is required but it benefits what i said
What do you all think ?
Posted: Mon Sep 17, 2007 6:04 am
by n00b Saibot
ASDen wrote:ALL the problem is FF is the only browser - i tried - that implements Ajax as it should and IE is the most one who volatile it
Then I am sorry to say, but if you are coding something for public use then you have to do some defensive coding to get around it...
Secondly, IE7 supports XHR object natively...
lastly, word is `violate` instead of `volatile`....