*** kilo has joined #gnuenterprise *** kilo has left #gnuenterprise *** reinhard has joined #gnuenterprise *** sjc has joined #gnuenterprise *** kilo has joined #gnuenterprise bbl *** dcmwai has quit IRC *** sjc has quit IRC *** reinhard has quit IRC *** jamest has joined #gnuenterprise *** reinhard has joined #gnuenterprise *** lekma has joined #gnuenterprise hello all reinhard: u around? yes sorry i found out what i was looking for (pidfile option) the server is really faster i decided to put latest svn in prod wee so much faster? :) :) well starting is amazing not only for start but also faster for usage? so now i can reload all repo without disturbing much the users for usage as weel s/weel/well but it's harder to see cause of the xul forms overhead ok but request count fetch procs are faster what i was thinking lately about your xul form stuff you store some kind of form definition in the db, right? yep if you request that form definition, do you always use the same session, or do you use the session of the client? client session if all client would use the same session for retrieving the form definition, appserver could maybe cache much better hmmm i do believe you but i think the design i choosed is flawed anyway and slow by design i think we'll have to redo the all thing once this project is finish and maybe make it a gnue sub-project so that more people can think about it and if it fits their need they can maybe use it :) but i think there will be some licensing issue,no? cause xul/mozilla/and friends are mpl, and gnue is all gpl anyway these are just thoughts don't know enough about xul anyway to say anything here :) *** jamest has quit IRC *** jamest has joined #gnuenterprise *** kilo has quit IRC back to the question, i could force the use of a session to use better cache? yes now the client lauches a proc that import some external python and passes the session object although I am not sure this will be possible in following versions of appserver (for security reasons how would i pass the session (let's say) 0 that's also came to my mind security it might become impossible to use a "foreign" session id if the user has no right to see those forms and session highjacking will be over... (it comes handy atm for some testing where you don't want to go through the all open proc) reinhard: are there some incompatibility between statup option yep, session hijacking is a big security risk ? ie -Z and pidfile or debug-file there shouldn#t shouldn't it seems if i use -Z and pidfile and debug-file i get the output err scratch that but nothing send to debug-file -Z and --pidfile are exclusive and no pidfile ok because they make no sense in combination well you would only use a --pidfile if you don't run in foreground wouldn't you? why ? i intend to use the pidfile to make a reload but still want to see debug output and send it to a file for others to look at debug to file should work with --pidfile in any case what i should have in the file is the same as what on stdout ? when you use --debugfile you don't get anything on stdout you get it on debug file *instead* wasn't that always so? ahhh * reinhard has messed with debugging features lately so -Z and debug-file are exclusive also no you can run in foreground but still not want debug output on screen /usr/bin/gnue-appserver --web-frontend --loglevel 1 --debug-file /var/log/gnue/`date +%Y%m%d-%Hh%Mm%Ss`-geas.log -Z here is my start command line the logfile is created but nothing is sent to it and i still have screen output what --web-frontend is? i starts a web server it starts a web server i use it to store pictures and render them in a navigator widget in xul :) comes in handy :) nice DB000: Traceback (most recent call last): DB000: File "/usr/bin/gnue-appserver", line 33, in ? DB000: server = geasRpcServer.geasRpcServerApp (); DB000: File "/usr/lib/gnue/appserver/geasRpcServer.py", line 113, in __init__ DB000: geasConfiguration.ConfigOptions) DB000: File "/usr/lib/gnue/common/apps/GServerApp.py", line 71, in __init__ DB000: self.__createPidFile (0) DB000: File "/usr/lib/gnue/common/apps/GServerApp.py", line 184, in __createPidFile DB000: pidfile = open (self.OPTIONS ['pidfile'], 'w') DB000: IOError: [Errno 2] No such file or directory: '/var/run/gnue/appserver.pid' when started with /usr/bin/gnue-appserver --web-frontend --loglevel 1 --debug-file /var/log/gnue/`date +%Y%m%d-%Hh%Mm%Ss`-geas.log no pidfile option --pidfile just changes the localtion no --pidfile option doesn't mean it doesn't write a pid file, it just means it writes to standard location and when started with pidfile option, nothing is sent to debug-file hmmm and to get debug output you need to specify a --debug-level well ahhh maybe the misunderstanding is sorry i use loglevel and i thougt it was ok the messages that are printed on appserver startup like "Appserver up and running" do not count as debug output neither are (IIRC) the loglevel messages from xmlrpc they both go to stdout (IIRC) try > stdout 2> stderr and see where the messages end up :) ok will try but I would *bet* stdout because actually with --debug-file we catch stderr and redirect it to the debug file did this work before? did I break something? like I said, I messed a bit with those debug options i don't if it worked before i don't know if it worked before i'm just messing trying to find the best option to have the pid in a file and some kind of a log file not to verbose and not too terse lekma: --debug-level=1-4 should be what you are looking for thx DB001: would be all warnings DB002: are info about system configuration DB003: is the SQL code sent to the database backend (helpful for finding performance killers) DB004: is calls to the appserver API with parameters and return values DB004 is really verbose, DB003 not enough... :( i'm never happy :) bbl *** jcater has joined #gnuenterprise *** titopbs has joined #gnuenterprise reinhard: if you read this, on my server the debug-file is not written in "real time" ie i have to stop the server to have the debug infos actually written in the disk is this normal behaviour?? I've hit this with some of my non-gnue python apps the solution is to do a filehandle.flush() right after the filehandle.write() call (in GDebug.py, I assume) thx jcater *** wendall911 has joined #gnuenterprise for those of you who need debug-file written to disk immediately: --- GDebug.py 2005-03-18 17:44:23.015478904 +0100 +++ GDebug.py.new 2005-03-18 17:32:43.000000000 +0100 @@ -73,6 +73,7 @@ del (lines [-1]) self.filehandle.write (string.join (["DB000: " + s for s in lines], "\n")) self.filehandle.write ("\n") + self.filehandle.flush () def writelines (self, list): for line in list: @@ -155,6 +156,7 @@ lines = "%s" % message for line in lines.splitlines (): _fh.write ("DB%03d: %s %s%s%s" % (level, stamp, filename, line, os.linesep)) + _fh.flush () if dropToDebugger and _DEBUGGER: _DEBUGGER.set_trace () apply to gnue.common.appsGDebug.py apply to gnue.common.apps.GDebug.py *** btami has joined #gnuenterprise lekma: I applied the patch permanently to svn jcater: ok * btami is away: jcater: thanks, wanted to propose the same * btami is away: *** dcmwai has joined #gnuenterprise jcater: in the online svn there is no color in diffs maybe you can fix it... *** dcmwai_ has joined #gnuenterprise *** dcmwai has quit IRC *** dcmwai_ has quit IRC *** johannesV has joined #gnuenterprise hi lekma, as i can read from the logs you're quite happy with my latest improvements in appserver .... :) yep so that's good news i'd like to add some 'benchmark' stuff (gcd and li-scripts) first and then add the dependency-stuff for inserts and deletes johannesV: i'm trying to compare perf from between generated gnue-forms and xul forms as well as make appserver use of all that new things in common's dbdriver (like directly inserting or updating) and i can't launch any gnue generated forms atm as i saw in reinhards commit mails he did a change in callFunc, so are you using latest svn ? * johannesV is trying a generated form ... works fine for me in gnue.common.datasources.GDataSoure.py line 939 it says: parts = appUrl.split ('/') shouldn't it be: parts = url.split ('/') why ? first we strip away that 'appserver://' if i understand correctly appUrl is only "appserver://" then, if there are options behind a '?' we don't need them too so url get's translated into appUrl having only the part in between split into the three parts: server, resource-type and resource-name gnue-forms "appserver://gecocer/basics_langs" is correct? no oh gnue-forms appserver://connectionname/resourcetype/resourcename where connectionname is the name of the appserver-connection in your connections.conf resource-type is 'form' atm, but is thought to also support report in a time and resource-name is the name of the class (atm) and, well, appserver:// gives forms the hint to use an appserver-resource that's all about :) ok it works fine i'm glad i could help you i forgot the resourcetype right the form generation seems faster than it used to beas well the form generation seems faster than it used to be as well hmm, might be as i've optimized the caching a bit but i think another boost will come with the next two major changes, first there's the use of the connection-functions insert/update/delete instead of building a resultset for each and the next (even bigger thing) will be the rewrite of the data.cache class and it's algorithm johannesV: the old classrep stuff is replaced by repository.py ? (but the latter will be a hard nut to crack) lekma, yes ... impressive, isn't it :) yep (as i've written the former too) but, the big difference is, that the old repository was built upon the language interface completely and the new one is using data.py and a better wrapping mechanism around the language interface can i use the updateLinks functions to "reload" a class or a procedure ? no, updateLinks has one major purpose: replace gnue_id's by the apropriate wrapper-instance or (in unlink-mode) clear all references to let garbage collection work fine it does not fetch any new data from the backend nor does it merge some data with the existing instances the only way to update classes in the repository is a call of repository.load () [or sending SIGHUP to appserver process] to be precise, you've to watch out if you're calling repository.load () directly: make sure to have your session's cache beeing cleared, otherwise you won't get new data from the backend you could achieve this by calling a session.rollback () [usually the repository is using the internal session] lekma, do you still need to reload single classes ? single procs would be perfect why ? lots of concurrent changes on procs you change the procedures' code that frequently ? well.... ...yes :) i'm not the only one working on the server and a lot of "functionnal" proc (order creation, bill of material) are undergoing some changes since 2 or 3 days (that's the go live effect) :) hmm even if it's only for a short time and reserved to devs only so sighup's not an option reloading procs would be useful well, the problem would be all that cross-references in the repository ... i didn't have the time to implement it again would it be sufficient to have the proceudre's code reloaded i can still try with the sighup or do you change the signature as well ? signature?? i mean, the parameters, result-type ... nope for this we run gnue-readgcd how do you change the procedure-code ? using a special form ? yep in a form textarea to have a procedure's code beeing reloaded it would be sufficient to remove the attribute 'gnue_code' from the instances __dict__ if x is a procedure-element in the repository, you could do: del x.__dict__ ['gnue_code'] the next access to x.gnue_code should force the language interface to reload the code from the backend brb *** sjc has joined #gnuenterprise ok back let me try something ... ok, i have a 'hackery' solution for your pb i think you have that additional rpc-function for reloading a single class, right ? yep def reloadProcedure (self, classname, procname): """ """ p = self.repository.classes [classname].procedures [procname] if p.__dict__.has_key ('gnue_code'): del p.__dict__ ['gnue_code'] self._internalSession.rollback () newCode = p.gnue_code this should do the job you might change that rpc-function to take another parameter (the name of the procedure) and add this python-code to geasSessionManager.py thx note, the last line (newCode = p.gnue_code) is kind of optional if you omitt it, the code will be fetched from the backend, the next time the procedure would be executed so if you keep that line, the code will be loaded imediately if classname does not exist in the repository, a ClassNotFoundError will be raised if procname is not available, a ProcedureNotFoundError will be raised brb are classname and procname full names (ie module_class and module_proc)? or can i use gnue_ids? for classname gnue_id is ok for proc it's ok too thx names must be qualified on perf side: i tried a generated form on a class with ~20 properties and one calc prop there is around 10000 records in table if i search without anything the first record is quite fast to be displayed but then if i hit last record the memory usage grows alarmingly and it takes ages to come (the last record) hmm , calc. in cond or order? the mem usage starts from 1.3 % and stops at 8.4% nocond at all no cond at all i don't know about order in generated gnue-forms order is given by search-fields lekma: if you hit "last record" in forms no gld for this class forms fetches through all records of the resultset ok, i need to run now, but i'll read the logs bye bye bye *** johannesV has quit IRC lekma: would be interesting which side eats more memory: forms or appserver that server memory i'm talking about ah ok shouldn't the last record button only fetch the last record? for databases, there's usually no way of fetching the last record from a query AFAICT but for appserver there is ?? you can count and get the last yes there is that's what i do in xul but appserver has to get the data from the db somehow so appserver has no other chance to fetch all records in between from the db too to get the data of th last record hmmm and as it's already fetching through the list, it also caches the data what also interesting: without closing the session i came back to first record then hit next record a few times the first everything is fast and then last record again same behaviour but memeory grows only from 8.4% to 9.7% i think that part of this mem is freed anyway but not reclaimed by os hmm actually once you've hit "last record" memory usage should be more or less constant because all your records are in cache anyway except for the other data that are fetched from the db to do calculated fields hmm i did hit rollback in the middle my bad if there is no rollback the mem usage is constant ah that's a good sign at least although I would not bet my life on the fact that there are no memory leaks left ;-) :) *** btami has quit IRC *** popcorn has quit IRC derek: yo derek: were you into delphi development at one point? *** kilo has joined #gnuenterprise *** titopbs has quit IRC btami: viewcvs should be colorized now jcater: great thx chillywilly: i have developed with delphi a long time ago *** jcater has quit IRC night all *** lekma has quit IRC I have to do things in delphi that make me weep in the night nickr: windows dll? nickr: actually that might cause suicidal tendencies No, I've written DLLs in C though that load and wrap other DLLs muahh nickr: it's pretty much the same pain in Delphi I don't find it that painful except having to cast function pointers and whatnot nickr: well, depends on if you need to interact with the M$ api Ah No, this is a totally different level very little winlib no gui either I hadn't ever even really used windows and I had to write some dlls in c and delphi a few years back...my god what a shock broken was an understatement I don't find it particularly broken I ended up having to trace threads to figure out everything...functions are scattered everywhere nickr: this was with windows 95/98 though nt may be better, dunno *** jamest has left #gnuenterprise hi, to do gnue-forms -u gtk2 do i need something else than pygtk? i still get: gnue-forms: Unknown UI driver specified: gtk2 :( and TypeError: __init__() got an unexpected keyword argument 'moduleName' with -u curses :'( *** kilo has quit IRC mnemoc: oops, I get the same error for curses but gtk2 works for me mnemoc: fixed curses, if you use svn please update and try again night all *** reinhard has quit IRC *** nictuku has joined #gnuenterprise hi *** sjc has quit IRC what do i need aditional to pygtk (2.6.0) to get gnue-forms -u gtk2 working? :( *** nictuku has quit IRC *** wendall911 has quit IRC *** dcmwai has joined #gnuenterprise *** wendall911 has joined #gnuenterprise *** wendall911 has left #gnuenterprise building wxwidgets has been hour and a half eating my box :( i really wanted to use gtk2 ui :'( *** dere1 has joined #gnuenterprise