PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: BoJlk on 30 December, 2004, 20:01:41

Title: taking the LOAD form the RoboCop
Post by: BoJlk on 30 December, 2004, 20:01:41
Greetings, i want to Disscus the problem when one Scipt is controling the whole HUB functionality.

It's good having cenrtilized control (meaning one place to control the HUB)  :]

thou it's not good for Fault tolerance!
If the RoboCop stop functioning or got an Error the whole hub can be considered unfunctional. 8o
Maybe the RoboCop scripts can be brocken to several  processes and each one would considered stand alone.
like user control part, hub configuration, rules checker, client cheker...etc' (there's many functions in this Script)

Why for you say? ?(
if one part of the scripts goes down
others continue working... :]

/edit]
and every part can be upgraded separetly...
optimus can work on different parts.
Title:
Post by: Pothead on 30 December, 2004, 20:09:54
I've only see robocop fail for two reasons.  Once with MLDC Donkey clients (i've got a tiny script of Blackwings to take care of them).  The other problem is when the counter.txt file becomes corrupt (filled with spaces), which stops Robocop from working.  
Since the first problem is easily sovled, there shouldn't be too much need for this.
If you search around the forum i've found a dedicated script for client checker, and by modifying existing scripts, min share, max hubs etc shouldn't be hard to do. :)
As for the other functional commands provided by robocop, i havn't got a clue. :S
Title:
Post by: BoJlk on 30 December, 2004, 20:15:36
i had the same problem the counter.txt corraption
that stop the whole Script functioning!
That's the problem...those kind of curraption or other reason sholdn't stop the whole scripts from functioning at all...
If the scripts would have been separeted...only the part responsible for writing to counter.txt file would fail.
not the whole script  ?(
Title:
Post by: ??????Hawk?????? on 30 December, 2004, 20:34:06
hi peeps  


Quotei had the same problem the counter.txt corraption

im almost certain that if this has been reported to Opti it will be fixed...
Title:
Post by: bastya_elvtars on 30 December, 2004, 20:39:32
mldc is so a cheater one that makes every script crazy. the best solution for protecting is to set the PtokaX GUI minshare to 12MB, as it only shares 11MB. (and we do not need users with <12MB or if so, we reg them.)

Bu why not separate funcs? easy answer

some functions return 1 on finish, stopping that data, and that won't get forwarded to other scripts. and you cannot 100% ensure what order data follows thru scripts.
Title:
Post by: Optimus on 30 December, 2004, 20:44:32
Well in new Ptokax with LUA5.02 there is a switch called [Stop script on error]

If i'm correct the other parts of the script will keep on working in case of an error.
Title:
Post by: BoJlk on 30 December, 2004, 21:01:20
But on upgrading the RoboCop to LUA5 not all Hub owner would be able to use it on PX lua4?
only with a script that converts all lua4 functions to lua5.

Anyway separating the Script will give more ability to work on each part separetly...that means you can even
publish the parts as stand alone.

/edit
Quotethe best solution for protecting is to set the PtokaX GUI minshare
that will remove the ability to configure the min share rules for different profiles.
Title:
Post by: bastya_elvtars on 30 December, 2004, 21:09:55
it won't

or you cannot live without users lower than 12MB minshare?

ops/vips do not have share rule by default in ptokax.

this just means that every share above 12MB will be controlled by robo.

btw i guess robo lua5 will be released the same second as ptokax lua5, otherwise senseless.

a quick hack advice for opti: make this buggy crap the last line inside Main() and you ae done (or is is dofiled?)
Title:
Post by: Optimus on 30 December, 2004, 21:18:14
Quotea quick hack advice for opti: make this buggy crap the last line inside Main() and you ae done (or is is dofiled?)
Hue what you mean bastya or is it a practical joke hehehe
Title:
Post by: Optimus on 30 December, 2004, 21:22:17
QuoteAnyway separating the Script will give more ability to work on each part separetly...that means you can even
publish the parts as stand alone.
Seperarting the script the way you want it is not possible for me. Cause i need all the data from all the seperate scripts that's why it's all in 1.

I could do some writes here and there saving data until i drop. but that's not what i want. I wanne be Quick/Fast/Small/Efficient/Etc

That could not be achieved when making everything seperate
Title:
Post by: bastya_elvtars on 30 December, 2004, 21:22:28
is that buggy loading stuff (counter.txt) inside function Main()?

if so, make it the last line before end :) - this way you can avoid other things from not starting up
Title:
Post by: Optimus on 30 December, 2004, 21:26:51
yups yups i see well it is/was almost down under from the 25 it was on place 23 but lowerd it now.

But on error script will stop working that problem can't be avoided at the moment. That a part of the Lua Lib build in ptokax.

But as i sayd in a post before in new Ptokax that is changed so script will keep on working even with a error
Title:
Post by: bastya_elvtars on 30 December, 2004, 21:39:09
if stops then its in the main chunk
Title:
Post by: plop on 30 December, 2004, 22:46:18
use the error 2 disable that part when needed.

plop
Title:
Post by: BoJlk on 30 December, 2004, 23:33:15
so, you saying making it lua5
Will make it more stable then lua4?
I still think breaknig it to parts...with Centerlized GUI managment will make it perfect.
Just take for example any big network structure
it's made of Servers every one with his own part of the System
the same behind the RAID idea
Anyway the whole idea behind those technologies is fault tolerance

/edit
i really think with your Script's growth you should addept history's learned technics of managment.
Title:
Post by: n1ck on 31 December, 2004, 00:16:54
I totally agree with BoJlk, the problem for us 'non god like' scripters is. If it breaks it breaks and we have to start again. However with seperate scripts you can just take out the bad bit.
 This brings up my other pet hate compiling - but thats in another thread!
Title:
Post by: Optimus on 31 December, 2004, 00:44:29
Well if i didn't had a GUI i would allready made my script in modules so parts could be added and removed easily.

But since i have a GUI it would be harder to program all those modules into the interface and keep the hole GUI functional & userfriendly. I can do some VB tricks but i'm still no guru in that. I'm a little stuck in that way

Greetingz Optimus ZZZZZzzzz
Title:
Post by: n1ck on 31 December, 2004, 00:57:24
Dont think we aint greatful for what you do - not in the least - its great work. And for ease of use you cant beat a 'all in 1' with a GUI..... however it still would be nice to have the option. 2 downloads 'all in 1' or 'all in bits' lol
Title:
Post by: BoJlk on 31 December, 2004, 02:02:18
Don't take me the wrong way i'm absolutely have not problems with your scripts desinging (except this thread's subject, lol)
i hope you'll consider this doable...
this will make this Script the most successfull  :]
with all do respect to all scripters doing security scripts.
Title:
Post by: bastya_elvtars on 31 December, 2004, 03:19:10
think of the fact that what if dc++ functions were separate exe's.  :rolleyes:

btw The GIMP (http://gimp-win.sourceforge.net/)  uses this kind of architecture... but thats a programk ported from *nix to win32
Title:
Post by: Optimus on 31 December, 2004, 12:33:40
maybe 1 day i can manage something like we talked about above.
But at the moment i need to finish where are started with before i can go to the next level.

At the moment i'm experimenting (that is toghter with a good friend) with a new gui interface that is made in c+.
That will take us a long time before finished. Once it maybe finished duno if it ever will be i can try to make it it work with modules.

It all takes amounts of time and i can only say it maybe there in the future. But at the moment we have to ride the beast as it is.

(http://members.home.nl/jakootstra/example.JPG)
Title:
Post by: plop on 31 December, 2004, 17:49:04
QuoteOriginally posted by BoJlk
so, you saying making it lua5
Will make it more stable then lua4?
I still think breaknig it to parts...with Centerlized GUI managment will make it perfect.
Just take for example any big network structure
it's made of Servers every one with his own part of the System
the same behind the RAID idea
Anyway the whole idea behind those technologies is fault tolerance

/edit
i really think with your Script's growth you should addept history's learned technics of managment.
there are a couple versions of RAID, they all have there good and bad side's.
some are ment for fault tolerance, others for speed or a combination 2 get the best of both.
for example if you mirror 2 drives you can load data faster (the 1st drive which is ready sends the data), but saving goes slower as you need 2 save it 2 both drives (saving 2x).
same thing can happen with a modulair script, you would need 2 parse several dataarivals (if done badly) before the right 1 might appear (slowing it down).
the only way a modulair system can reach the speed of a allin1 is by loading the modules into the main script (making it 1 again).

for a long time i have been thinking of writing a script in a modulair form, just not sure yet how it would work best/fastest.
and it would be a lot of work.
but still in the end it would be a kind of allin1 script as you only run 1 script, not multiple.

plop
Title:
Post by: BoJlk on 01 January, 2005, 02:44:27
well the main problem in PX project is that it's slower because of the Scripts, every funsction coming to the Scripts serarching thru all the Scripts loaded looking for a Reaction.

then another suggestion!
maybe it's a good idea to summeries the reaction to every Function that comes to the Script.
Meaning for %MyIfno command there will be shortcut to the line in the script that contains the reaction
(it's only example, i don't lua)
Title:
Post by: plop on 01 January, 2005, 22:25:56
QuoteOriginally posted by BoJlk
well the main problem in PX project is that it's slower because of the Scripts, every funsction coming to the Scripts serarching thru all the Scripts loaded looking for a Reaction.

then another suggestion!
maybe it's a good idea to summeries the reaction to every Function that comes to the Script.
Meaning for %MyIfno command there will be shortcut to the line in the script that contains the reaction
(it's only example, i don't lua)
thats all a mather of how the script is made.
i have several small scripts which are heavier 2 run then a.i. which is huge.
the suggestion you made is allready in the non public beta's with lua 5.
every type of incomming data has it's own dataarival.
skrollster couldn't see the difference in cpu load with or without a.i. running.
but then again it's how you handle it, you can still make it heavy 2 run.

plop