You can subscribe to this list here.
2005 |
Jan
|
Feb
(53) |
Mar
(62) |
Apr
(88) |
May
(55) |
Jun
(204) |
Jul
(52) |
Aug
|
Sep
(1) |
Oct
(94) |
Nov
(15) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(130) |
Feb
(105) |
Mar
(34) |
Apr
(61) |
May
(41) |
Jun
(92) |
Jul
(176) |
Aug
(102) |
Sep
(247) |
Oct
(69) |
Nov
(32) |
Dec
(140) |
2007 |
Jan
(58) |
Feb
(51) |
Mar
(11) |
Apr
(20) |
May
(34) |
Jun
(37) |
Jul
(18) |
Aug
(60) |
Sep
(41) |
Oct
(105) |
Nov
(19) |
Dec
(14) |
2008 |
Jan
(3) |
Feb
|
Mar
(7) |
Apr
(5) |
May
(123) |
Jun
(5) |
Jul
(1) |
Aug
(29) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(3) |
2009 |
Jan
|
Feb
(36) |
Mar
(29) |
Apr
|
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(4) |
Oct
|
Nov
(13) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(9) |
Apr
(11) |
May
(16) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(92) |
Nov
(28) |
Dec
(16) |
2013 |
Jan
(9) |
Feb
(2) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(6) |
Jul
(14) |
Aug
(12) |
Sep
(4) |
Oct
(13) |
Nov
(1) |
Dec
(6) |
2014 |
Jan
(23) |
Feb
(19) |
Mar
(10) |
Apr
(14) |
May
(11) |
Jun
(6) |
Jul
(11) |
Aug
(15) |
Sep
(41) |
Oct
(95) |
Nov
(23) |
Dec
(11) |
2015 |
Jan
(3) |
Feb
(9) |
Mar
(19) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
|
2016 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(1) |
May
(3) |
Jun
(17) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(19) |
Nov
(12) |
Dec
(6) |
2017 |
Jan
(30) |
Feb
(23) |
Mar
(12) |
Apr
(32) |
May
(27) |
Jun
(7) |
Jul
(13) |
Aug
(16) |
Sep
(6) |
Oct
(11) |
Nov
|
Dec
(12) |
2018 |
Jan
(1) |
Feb
(5) |
Mar
(6) |
Apr
(7) |
May
(23) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(6) |
Oct
(6) |
Nov
(10) |
Dec
(3) |
2019 |
Jan
(26) |
Feb
(15) |
Mar
(9) |
Apr
|
May
(8) |
Jun
(14) |
Jul
(10) |
Aug
(10) |
Sep
(4) |
Oct
(2) |
Nov
(20) |
Dec
(10) |
2020 |
Jan
(10) |
Feb
(14) |
Mar
(29) |
Apr
(11) |
May
(25) |
Jun
(21) |
Jul
(23) |
Aug
(12) |
Sep
(19) |
Oct
(6) |
Nov
(8) |
Dec
(12) |
2021 |
Jan
(29) |
Feb
(9) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
(2) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(4) |
Nov
(12) |
Dec
(13) |
2022 |
Jan
(4) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(15) |
Jun
(7) |
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2023 |
Jan
(15) |
Feb
|
Mar
(23) |
Apr
(1) |
May
(2) |
Jun
(10) |
Jul
|
Aug
(22) |
Sep
(19) |
Oct
(2) |
Nov
(20) |
Dec
|
2024 |
Jan
(1) |
Feb
|
Mar
(16) |
Apr
(15) |
May
(6) |
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(13) |
Nov
(18) |
Dec
(6) |
2025 |
Jan
(12) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John f. D. E. <jo...@de...> - 2017-01-14 05:10:51
|
I’m struggling a bit to get naviserver to gzip static content (.js and.css). ADP gzipping is working. According to the docs, it’d seem that all I need to do is enable all the fastpath config stuff below, and it’d work, but that’s not doing the trick. Perhaps there is additional fast path configuring to do to enable certain directories? According to this code by Daniel Clark, a fast path filter is needed to make this work, but it seems that (a) his code may not be current and (b) his filter doesn’t work because he doesn’t supply the other dependent functions his code calls. https://www.qcode.co.uk/post/121 I’ve looked at the fastpath.c/fastpath.tcl as the docs indicated, but was not illuminated. I probably just don’t know where to look, but after about 2h of banging on this, I thought I’d ask for help…. -john ns_section "ns/fastpath" # Enable cache for normal URLs. Optional, default is false. ns_param cache true # Size of fast path cache. Optional, default is ~10M. ns_param cachemaxsize [expr 1024*10000] # Largest file size allowed in cache. Optional, default is 8K ns_param cachemaxentry 8192 # Use mmap() for cache. Optional, default is false. ns_param mmap true # Return gzip-ed variant, if available and allowed by client (default false) ns_param gzip_static true # Refresh stale .gz files on the fly using ::ns_gzipfile (default false) ns_param gzip_refresh true # Return the specified command for re-compressing when gzip file is outdated ns_param gzip_cmd "/usr/bin/gzip -9" |
From: Gustaf N. <ne...@wu...> - 2017-01-10 10:28:16
|
Dear friends of NaviServer, on sourceforge the release of NaviServer 4.99.15 is available [1]. As always, the newest release can be as well obtained from bitbucket [2]. In short: this release supports a few new features such as multiple driver threads for listening on the same port (using SO_REUSEPORT when available), allows dynamic connection thread pool mapping, provides better introspection (e.g. statistics from each driver how it was used), provides improved scalability, comes with better documentation and improved portability. I'll prepare as well an announcement for c.l.tcl and OpenACS.org. Below are the changes since 4.99.14: best regards -gustaf [1] https://sourceforge.net/projects/naviserver/files/naviserver/4.99.15/ [2] https://bitbucket.org/naviserver/naviserver/overview ======================================= NaviServer 4.99.15, released 2017-01-10 ======================================= 103 files changed, 3497 insertions(+), 1577 deletions(-) New Features: - Multiple driver threads for listening on the same port: When OS kernels support SO_REUSEPORT (which is the case on Linux since Kernel 3.9, Mac OS 10.3, Solaris 11, *BSD), one can specify now multiple driver threads for exactly the same listening address (protocol/IP-address/port) via the new config option "driverthreads" with a value larger than 1. With this new feature, NaviServer supports now for all stages of a request multi-threaded execution (driverthreads, spoolerthreads, connection threads, and writerthreads). Tests show that even with high number of concurrent clients, one can improve the throughput for high numbers of concurrent clients slightly (e.g. for 2 driverthreads and 250 concurrent clients, the throughput increases by ~9%, see https://www.mail-archive.com/nav...@li.../msg03445.html) Note: When using multiple driver threads on privileged ports, one has to add "#" followed by the number of necessary bind operations to the prebind address. Otherwise, prebind will bind to the address only once, and only one driver thread can be used. - Dynamic connection thread pool mapping: The new version of NaviServer extends the mapping of requests to connection thread pools by making it (a) introspectible and (b) dynamic (changeable at runtime). Dynamic thread pool mapping can avoid overlong blocking of connection threads by an unexpected peak of slow requests by moving these to a separate connection pool. For a detailed motivation, see https://www.mail-archive.com/nav...@li.../msg03446.html. The following new subcommands of "ns_server" implement the dynamic mapping to connection pools: * ns_server ?-server /s/? ?-pool /p/? map ?-noinherit? ?/mapspec/? Map HTTP-method and path (mapspec) to a certain pool, or list mappings from a pool (when no mapspec is given) * ns_server ?-server /s/? mapped ?-exact? ?-noinherit? /mapspec/ Obtain the pool for a mapspec (HTTP method and path) * ns_server ?-server /s/? ?-pool /p/? unmap ?-noinherit? /mapspec/ Undo previous mapping - New commands to obtain network driver information: * ns_driver info Return per driver detailed configuration information (name of module, type of driver, associated server, configured location, protocol, address, sendwait recvwait, and extraheaders) * ns_driver names Return a list of the names of the loaded driver modules. * ns_driver threads Return a list of the names of the driver threads * ns_driver stats Return for every driver thread the name of the driver module, the number of received requests, the number of spooled requests, the partial requests (received via multiple receive operations), and the number of errors. - Obtain detailed timing results from currently running request * ns_conn partialtimes Returns detailed timing snapshot about the current requests. The result is a dict containing the keys "accepttime", "queuetime", "filtertime", and "runtime" (similar to the per-pool timing statistics in "ns_server stats") - Added debug severity "Debug(nsproxy)" for separate debugging of nsproxy. Performance Improvements: - Move JoinConnThread() out of lock to reduce locking duration and to improve scalability. Bug Fixes: - Better error behavior, when prebind fails. - Fixed underspecified config file (simple-config does not set address, fallback to NS_IP_UNSPECIFIED. - Make sure, that URLs produced by urlspace's walk callbacks are proper list elements. - Make startup more robust, when called with invalid arguments. - nsproxy: * Don't reset timeout for for reaper when slaves already expired * Improve debug messages - Improve forward compatibility to forthcoming Tcl 8.7 (fixed bug in Tcl's Memory allocator; Zoran). - configure: Align behavior when "--with-openssl" is specified without arguments vs. when it is not specified (--with-openssl is activated per default). Previously, pkg-config was only looked at when "--with-openssl" was specified. Documentation improvements: - Improved sample config files * added new config parameters * document parameter "listenbacklog" * make simple-config working with default installed tree (activate .adp parsing) - Improved inline documentation about usage of Tcl_FindExecutable(argv[0]) (before fork vs. after fork) - Improved/new documentation pages of * admin-maintenance * ns_cgi * ns_conn * ns_connchan * ns_driver * ns_filestat * ns_http * ns_httpopen * ns_itcl * ns_parseargs * ns_register * ns_sendmail * ns_server * nssock * nsssl * nsv - more consistent capitalization: * use Tcl instead of TCL * use HTTP (or HTTPS) instead of http (or https). C API Changes: - Additional argument for reuseport for Ns_SockBind(), Ns_DriverListenProc(), Ns_SockListenEx(), Ns_SockBindUdp(), and Ns_SockListenUdp(). Configuration Changes: - New parameter for drivers (e.g. nssock) * Boolean Parameter "reuseport": When the parameter is set and SO_REUSEPORT is supported by the os, NaviServer will allow multiple listen operations on the same port (default: false) * Integer Parameter "driverthreads": set to a value > 1 when multiple driver threads should be used (default: 1). When multiple driver threads are configured, parameter "reuseport" is automatically set to "true". - New Boolean parameter "mutexlocktrace" for section "ns/parameters": When this parameter is set to true, timing of long mutex calls are printed to stderr. - Improve configurability: Allow to pass alternative implementation of CPPCHECK to "make" Command Line Changes: - Value provided to prebind option (-b) can be extended by a suffix "#n", where n is the number of pre-bound sockets (when e.g. multiple driver threads are used on privileged ports) Code Changes: - Extended regression tests * ns_conn.test * ns_driver.test * ns_server.test * ns_adp_compress.test (fixed compatibility with lib version > 1.2.8, which leads to different encoding) - Driver reform: make distinction explicit between driver type (e.g. "nssock"), driver name (e.g. "nssock1"), and driver thread name (e.g. "nssock1:1") - Moved definition of type "bool" from ns.h to nsthread.h to make boolean types as well available in nsthread implementation. - Improve compilation under windows: * don't pass "const char*" as member dest of Ns_ObjvSpec * add compatibility type "suseconds_t" for windows * define NS_NAVISERVER fro windows (no configure script) * move conditional definition of P_tmpdir after the .h files are loaded * fix type in macro PTR2UINT in windows code - Further Tcl cleanup * Replaced remaining Tcl_CmdProcs into Tcl_ObjCmdProcs * Reduced usage of Tcl_AppendResult() - Don't mess around with FD_SETSIZE - Don't use implementation defined NULL as last argument of variadic functions - Reduced size of huge switch statements - Reduced variable scopes - Reduce number of return statements before end of function - Added const declarations - Use "unsigned short" consistently for ports - Align argument names in prototypes and function definitions - Silenced static checker Modules: - nsdhcpd, nsdns, nsldapd, nsradiusd, nssip, nssmtpd, nssnmp, nssyslogd, nstftpd, and nsudp: Aligned function definitions with ns.h due to changes in Ns_SockListenUdp() Ns_SockListenEx() Note: Not all of these drivers are aligned yet with IPv6 interfaces. - nssyslogd: Added support for IPv6. - nsstats: * Added statistics for driver usage * Added Page for showing urls mapped to connection threads pools * Added information about driver threads |
From: Claudio P. <cla...@gm...> - 2017-01-02 17:45:13
|
Thank You very much Wolfgang, the redirect was killing me; now it works perfectly fine. Claudio 2017-01-02 16:54 GMT+01:00 Wolfgang Winkler < wol...@di...>: > We have a different setup. A simple example, as we use tclws, would be: > > > proc ::WS::AOLserver::call_op {when why} { > # {{{ > > ::WS::AOLserver::Init > ::WS::AOLserver::Return > > > # return and stop all filters > return -return_code return filter_break > # }}} > } > > > proc ::WS::AOLserver::InitEchoSoapURLs {service host port service_desc} { > > if { ![nsv_exists init soap::${service}::init_done] } { > > nsv_set init soap::${service}::init_done 1 > > # register the service in tclws > ::WS::Server::Service -mode aolserver -prefix "/SOAP/${service}" > -service $service -description $service_desc -host $host -ports $port > # register a filter for the ops (doc, op, wsdl) > ad_register_filter -priority 400 preauth * /SOAP/${service}/* > ::WS::AOLserver::call_op > > # Define any special types > ::WS::Utils::ServiceTypeDef Server $service echoReply { > echoBack {type string} > echoTS {type dateTime} > } > > # Define the operations available > ::WS::Server::ServiceProc $service \ > { > SimpleEcho {type string comment {Requested Echo}} > } { > TestString {type string comment {The text to echo back}} > } { Echo a string back } { > return [list SimpleEchoResult $TestString] > } > > } > > } > > > set service "echo" > set host "localhost:8080" > set port "8080" > set desc "Echo Service" > > ::WS::AOLserver::InitEchoSoapURLs $service $host $port $desc > > I've simpliefied the code a bit, so it should run on any naviserver > installation, except for the ad_register_filter call. I haven't testet this > simplified code, so expect some typos. But I think you'll get the general > idea. > > This is all sourced at startup. The filter catches all requests to the > service, an internal redirect is not necessary. > > Wolfgang > > Am 2017-01-02 um 16:06 schrieb Claudio Pasolini: > > Thanks Gustaf and Wolfgang. > > I modified the proc ::WS::AOLserver::Return as per Gustaf suggestion, but > I have not yet succeeded executing the sample EchoWebService. > > To reduce the complexity I modified the call to the service so as to make > a single call to the SimpleEcho method. Executing the script > CallEchoWebService I receive a screen with the correct results, but looking > at the error.log it seems that the calls to ::WS::AOLserver::Return be > duplicated and finally I get an error complaining that the connection is > already closed. > > Here is an excerpt of the error log. > > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > WS::AOLserver::Redirect: from '{} tclws ws echoexample wsdl' to > '/tclws/ws/echoexample/index.tcl' > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=wsdl > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ... calling ::WS::Server::generateWsdl > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=wsdl > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ... calling ::WS::Server::generateWsdl > [02/Jan/2017:15:37:13][3409.7fa0d5499700][-conn:oacs-5-9:3-] Notice: > Calling SimpleEcho via DoCalls! > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > WS::AOLserver::Redirect: from '{} tclws ws echoexample op' to > '/tclws/ws/echoexample/index.tcl' > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=op > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...::WS::AOLserver::Return calling ::WS::Server::callOperation > service=echoexample sock=nosock > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=op > [02/Jan/2017:15:37:13][3409.7fa0d5499700][-conn:oacs-5-9:3-] Notice: > Received: {SimpleEchoResult {This is a test}} > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Error: > connection already closed, can't get content > while executing > "ns_conn content" > (procedure "ns_getcontent" line 75) > invoked from within > "ns_getcontent -as_file false -binary false" > ("uplevel" body line 37) > invoked from within > "uplevel 1 { > > set sock nosock > > ns_log notice "\n...entering ::WS::AOLserver::Return > requestType=$requestType" > switch -exact -- $requestType { > > ..." > (procedure "::WS::AOLserver::Return" line 3) > invoked from within > "::WS::AOLserver::Return" > > > I don't understand why this is happening. > > Wolfgang: did You modify the proc ::ws_aolserver_redirect replacing > ns_rewriteurl with ns_internalredirect? > > Best regards. > > Claudio > > 2017-01-02 13:34 GMT+01:00 Wolfgang Winkler <wolfgang.winkler@digital- > concepts.com>: > >> Hi Claudio! >> >> I can confirm what Gustaf wrote below. We are using our own >> initialization routine, which is similar to the one provided by the tclws >> package. We have our own logging facilities, wo we don't need the log >> package: >> >> namespace eval ::WS::AOLserver { >> if {![info exists wsVersion]} { >> variable wsVersion [package require WS::Server] >> } >> #if {![info exists logVersion]} { >> # variable logVersion [package require log] >> #} >> } >> >> For returning values, we use exactly the line from Gustaf: >> >> set data(query) [ns_getcontent -as_file false -binary false] >> >> This is handy for REST interfaces as well. >> >> regards, >> >> Wolfgang >> >> >> >> Am 2016-12-31 um 17:51 schrieb Gustaf Neumann: >> >> Am 30.12.16 um 19:00 schrieb Claudio Pasolini: >> >> Hi all, >> >> I'm in the process of upgrading several OpenACS instances and migrating >> them from AolServer 4.5 to the latest NaviServer. >> >> One of the instances makes use of TCLWS for bulding a couple of SOAP web >> services and I'm having trouble to make it work. >> >> Here are the first problems encountered: >> >> - ns_ictl doesn't support the 'package' argument. I replaced the >> command >> ns_ictl package require log >> with >> ns_ictl trace allocate {package require log} >> >> probably, using "package require log" will be sufficient as well. >> >> >> - but I'm not sure about eventual side effects. >> - In a proc called by ns_register_filter preauth I replaced ns_rewrite >> with ns_internalredirect but I observed a strange behaviour. >> ns_register_filter invokes the proc passing one argument, but >> actually the proc receives two, prehauth being added. >> >> you are probably referring to the old module "nsredirect". Calling >> ns_internalredirect should be fine. >> >> Yes, there is a difference between the calling conventions in AOLserver >> and NaviServer: >> NaviServer tells the developer the stage, at which the proc was invoked >> (the same proc >> might be registered for multiple states (such as "preauth", "postauth" or >> "trace"). This >> difference is as well handled in e.g. OpenACS since 10+ years. >> >> >> - I stumbled in the same problem posted by Wolfgang Winkler >> Error: can't set "xsltSchemaDom": var is read-only >> and solved it thanks to Gustaf tip. >> >> should not happen in recent versions of NaviServer >> >> >> - Calling the sample EchoWebService I get a strange error >> Error: invalid length: 779 >> executing the command >> ns_conn copy 0 $length $fp >> >> this comes probably from this section: >> https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82 >> >> I would think that you can replace the section "Get POSTed data" >> by something like: >> >> set data(query) [ns_getcontent -as_file false -binary false] >> >> This has at least the following advantages >> - less hacky >> - works for http and https >> - works also when spooling post data >> >> all the best >> -gn >> >> >> I wonder if someone (Wolfgang?) having already a production site running >> TCLWS with NaviServer could suggest me how to proceed. >> >> Happy New Year! >> >> Claudio >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> >> _______________________________________________ >> naviserver-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> >> -- >> Univ.Prof. Dr. Gustaf Neumann >> WU Vienna >> Institute of Information Systems and New Media >> Welthandelsplatz 1, A-1020 Vienna, Austria >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org! http://sdm.link/slashdot >> >> _______________________________________________ >> naviserver-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> >> -- >> >> *Wolfgang Winkler* Geschäftsführung wol...@di... >> mobil +43.699.19971172 <+43%20699%2019971172> dc:*büro* digital concepts >> Novak Winkler OG Software & Design Landstraße 68, 5. Stock, 4020 Linz >> www.digital-concepts.com tel +43.732.997117.72 tel +43.699.1997117.2 >> Firmenbuchnummer: 192003h Firmenbuchgericht: Landesgericht Linz >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most engaging >> tech sites, SlashDot.org! http://sdm.link/slashdot >> _______________________________________________ naviserver-devel mailing >> list nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > _______________________________________________ > naviserver-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > -- > > *Wolfgang Winkler* Geschäftsführung wol...@di... > mobil +43.699.19971172 <+43%20699%2019971172> dc:*büro* digital concepts > Novak Winkler OG Software & Design Landstraße 68, 5. Stock, 4020 Linz > www.digital-concepts.com tel +43.732.997117.72 tel +43.699.1997117.2 > Firmenbuchnummer: 192003h Firmenbuchgericht: Landesgericht Linz > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > |
From: Wolfgang W. <wol...@di...> - 2017-01-02 15:54:44
|
We have a different setup. A simple example, as we use tclws, would be: proc ::WS::AOLserver::call_op {when why} { # {{{ ::WS::AOLserver::Init ::WS::AOLserver::Return # return and stop all filters return -return_code return filter_break # }}} } proc ::WS::AOLserver::InitEchoSoapURLs {service host port service_desc} { if { ![nsv_exists init soap::${service}::init_done] } { nsv_set init soap::${service}::init_done 1 # register the service in tclws ::WS::Server::Service -mode aolserver -prefix "/SOAP/${service}" -service $service -description $service_desc -host $host -ports $port # register a filter for the ops (doc, op, wsdl) ad_register_filter -priority 400 preauth * /SOAP/${service}/* ::WS::AOLserver::call_op # Define any special types ::WS::Utils::ServiceTypeDef Server $service echoReply { echoBack {type string} echoTS {type dateTime} } # Define the operations available ::WS::Server::ServiceProc $service \ { SimpleEcho {type string comment {Requested Echo}} } { TestString {type string comment {The text to echo back}} } { Echo a string back } { return [list SimpleEchoResult $TestString] } } } set service "echo" set host "localhost:8080" set port "8080" set desc "Echo Service" ::WS::AOLserver::InitEchoSoapURLs $service $host $port $desc I've simpliefied the code a bit, so it should run on any naviserver installation, except for the ad_register_filter call. I haven't testet this simplified code, so expect some typos. But I think you'll get the general idea. This is all sourced at startup. The filter catches all requests to the service, an internal redirect is not necessary. Wolfgang Am 2017-01-02 um 16:06 schrieb Claudio Pasolini: > Thanks Gustaf and Wolfgang. > > I modified the proc ::WS::AOLserver::Return as per Gustaf suggestion, > but I have not yet succeeded executing the sample EchoWebService. > > To reduce the complexity I modified the call to the service so as to > make a single call to the SimpleEcho method. Executing the script > CallEchoWebService I receive a screen with the correct results, but > looking at the error.log it seems that the calls to > ::WS::AOLserver::Return be duplicated and finally I get an error > complaining that the connection is already closed. > > Here is an excerpt of the error log. > > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > WS::AOLserver::Redirect: from '{} tclws ws echoexample wsdl' to > '/tclws/ws/echoexample/index.tcl' > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=wsdl > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ... calling ::WS::Server::generateWsdl > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=wsdl > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ... calling ::WS::Server::generateWsdl > [02/Jan/2017:15:37:13][3409.7fa0d5499700][-conn:oacs-5-9:3-] Notice: > Calling SimpleEcho via DoCalls! > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > WS::AOLserver::Redirect: from '{} tclws ws echoexample op' to > '/tclws/ws/echoexample/index.tcl' > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=op > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...::WS::AOLserver::Return calling ::WS::Server::callOperation > service=echoexample sock=nosock > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: > ...entering ::WS::AOLserver::Return requestType=op > [02/Jan/2017:15:37:13][3409.7fa0d5499700][-conn:oacs-5-9:3-] Notice: > Received: {SimpleEchoResult {This is a test}} > [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Error: > connection already closed, can't get content > while executing > "ns_conn content" > (procedure "ns_getcontent" line 75) > invoked from within > "ns_getcontent -as_file false -binary false" > ("uplevel" body line 37) > invoked from within > "uplevel 1 { > > set sock nosock > > ns_log notice "\n...entering ::WS::AOLserver::Return > requestType=$requestType" > switch -exact -- $requestType { > > ..." > (procedure "::WS::AOLserver::Return" line 3) > invoked from within > "::WS::AOLserver::Return" > > > I don't understand why this is happening. > > Wolfgang: did You modify the proc ::ws_aolserver_redirect replacing > ns_rewriteurl with ns_internalredirect? > > Best regards. > > Claudio > > 2017-01-02 13:34 GMT+01:00 Wolfgang Winkler > <wol...@di... > <mailto:wol...@di...>>: > > Hi Claudio! > > I can confirm what Gustaf wrote below. We are using our own > initialization routine, which is similar to the one provided by > the tclws package. We have our own logging facilities, wo we don't > need the log package: > > namespace eval ::WS::AOLserver { > if {![info exists wsVersion]} { > variable wsVersion [package require WS::Server] > } > #if {![info exists logVersion]} { > # variable logVersion [package require log] > #} > } > > For returning values, we use exactly the line from Gustaf: > > set data(query) [ns_getcontent -as_file false -binary false] > > This is handy for REST interfaces as well. > > regards, > > Wolfgang > > > > Am 2016-12-31 um 17:51 schrieb Gustaf Neumann: >> Am 30.12.16 um 19:00 schrieb Claudio Pasolini: >>> Hi all, >>> >>> I'm in the process of upgrading several OpenACS instances and >>> migrating them from AolServer 4.5 to the latest NaviServer. >>> >>> One of the instances makes use of TCLWS for bulding a couple of >>> SOAP web services and I'm having trouble to make it work. >>> >>> Here are the first problems encountered: >>> >>> * ns_ictl doesn't support the 'package' argument. I replaced >>> the command >>> ns_ictl package require log >>> with >>> ns_ictl trace allocate {package require log} >>> >> probably, using "package require log" will be sufficient as well. >> >>> * but I'm not sure about eventual side effects. >>> * In a proc called by ns_register_filter preauth I replaced >>> ns_rewrite with ns_internalredirect but I observed a strange >>> behaviour. ns_register_filter invokes the proc passing one >>> argument, but actually the proc receives two, prehauth being >>> added. >>> >> you are probably referring to the old module "nsredirect". >> Calling ns_internalredirect should be fine. >> >> Yes, there is a difference between the calling conventions in >> AOLserver and NaviServer: >> NaviServer tells the developer the stage, at which the proc was >> invoked (the same proc >> might be registered for multiple states (such as "preauth", >> "postauth" or "trace"). This >> difference is as well handled in e.g. OpenACS since 10+ years. >> >>> * I stumbled in the same problem posted by Wolfgang Winkler >>> Error: can't set "xsltSchemaDom": var is read-only >>> and solved it thanks to Gustaf tip. >>> >> should not happen in recent versions of NaviServer >>> >>> * Calling the sample EchoWebService I get a strange error >>> Error: invalid length: 779 >>> executing the command >>> ns_conn copy 0 $length $fp >>> >> this comes probably from this section: >> https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82 >> <https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82> >> >> I would think that you can replace the section "Get POSTed data" >> by something like: >> >> set data(query) [ns_getcontent -as_file false -binary false] >> >> This has at least the following advantages >> - less hacky >> - works for http and https >> - works also when spooling post data >> >> all the best >> -gn >> >> >>> I wonder if someone (Wolfgang?) having already a production site >>> running TCLWS with NaviServer could suggest me how to proceed. >>> >>> Happy New Year! >>> >>> Claudio >>> >>> >>> ------------------------------------------------------------------------------ >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, SlashDot.org!http://sdm.link/slashdot >>> >>> _______________________________________________ >>> naviserver-devel mailing list >>> nav...@li... >>> <mailto:nav...@li...> >>> https://lists.sourceforge.net/lists/listinfo/naviserver-devel >>> <https://lists.sourceforge.net/lists/listinfo/naviserver-devel> >> >> -- >> Univ.Prof. Dr. Gustaf Neumann >> WU Vienna >> Institute of Information Systems and New Media >> Welthandelsplatz 1, A-1020 Vienna, Austria >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org!http://sdm.link/slashdot >> >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> <mailto:nav...@li...> >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel >> <https://lists.sourceforge.net/lists/listinfo/naviserver-devel> > -- > > *Wolfgang Winkler* Geschäftsführung > wol...@di... > <mailto:wol...@di...> mobil > +43.699.19971172 <tel:+43%20699%2019971172> dc:*büro* digital > concepts Novak Winkler OG Software & Design Landstraße 68, 5. > Stock, 4020 Linz www.digital-concepts.com > <http://www.digital-concepts.com> tel +43.732.997117.72 tel > +43.699.1997117.2 Firmenbuchnummer: 192003h Firmenbuchgericht: > Landesgericht Linz > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ naviserver-devel > mailing list nav...@li... > <mailto:nav...@li...> > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > <https://lists.sourceforge.net/lists/listinfo/naviserver-devel> > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- *Wolfgang Winkler* Geschäftsführung wol...@di... mobil +43.699.19971172 dc:*büro* digital concepts Novak Winkler OG Software & Design Landstraße 68, 5. Stock, 4020 Linz www.digital-concepts.com <http://www.digital-concepts.com> tel +43.732.997117.72 tel +43.699.1997117.2 Firmenbuchnummer: 192003h Firmenbuchgericht: Landesgericht Linz |
From: Claudio P. <cla...@gm...> - 2017-01-02 15:06:21
|
Thanks Gustaf and Wolfgang. I modified the proc ::WS::AOLserver::Return as per Gustaf suggestion, but I have not yet succeeded executing the sample EchoWebService. To reduce the complexity I modified the call to the service so as to make a single call to the SimpleEcho method. Executing the script CallEchoWebService I receive a screen with the correct results, but looking at the error.log it seems that the calls to ::WS::AOLserver::Return be duplicated and finally I get an error complaining that the connection is already closed. Here is an excerpt of the error log. [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: WS::AOLserver::Redirect: from '{} tclws ws echoexample wsdl' to '/tclws/ws/echoexample/index.tcl' [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ...entering ::WS::AOLserver::Return requestType=wsdl [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ... calling ::WS::Server::generateWsdl [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ...entering ::WS::AOLserver::Return requestType=wsdl [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ... calling ::WS::Server::generateWsdl [02/Jan/2017:15:37:13][3409.7fa0d5499700][-conn:oacs-5-9:3-] Notice: Calling SimpleEcho via DoCalls! [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: WS::AOLserver::Redirect: from '{} tclws ws echoexample op' to '/tclws/ws/echoexample/index.tcl' [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ...entering ::WS::AOLserver::Return requestType=op [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ...::WS::AOLserver::Return calling ::WS::Server::callOperation service=echoexample sock=nosock [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Notice: ...entering ::WS::AOLserver::Return requestType=op [02/Jan/2017:15:37:13][3409.7fa0d5499700][-conn:oacs-5-9:3-] Notice: Received: {SimpleEchoResult {This is a test}} [02/Jan/2017:15:37:13][3409.7fa0d5398700][-conn:oacs-5-9:4-] Error: connection already closed, can't get content while executing "ns_conn content" (procedure "ns_getcontent" line 75) invoked from within "ns_getcontent -as_file false -binary false" ("uplevel" body line 37) invoked from within "uplevel 1 { set sock nosock ns_log notice "\n...entering ::WS::AOLserver::Return requestType=$requestType" switch -exact -- $requestType { ..." (procedure "::WS::AOLserver::Return" line 3) invoked from within "::WS::AOLserver::Return" I don't understand why this is happening. Wolfgang: did You modify the proc ::ws_aolserver_redirect replacing ns_rewriteurl with ns_internalredirect? Best regards. Claudio 2017-01-02 13:34 GMT+01:00 Wolfgang Winkler < wol...@di...>: > Hi Claudio! > > I can confirm what Gustaf wrote below. We are using our own initialization > routine, which is similar to the one provided by the tclws package. We have > our own logging facilities, wo we don't need the log package: > > namespace eval ::WS::AOLserver { > if {![info exists wsVersion]} { > variable wsVersion [package require WS::Server] > } > #if {![info exists logVersion]} { > # variable logVersion [package require log] > #} > } > > For returning values, we use exactly the line from Gustaf: > > set data(query) [ns_getcontent -as_file false -binary false] > > This is handy for REST interfaces as well. > > regards, > > Wolfgang > > > > Am 2016-12-31 um 17:51 schrieb Gustaf Neumann: > > Am 30.12.16 um 19:00 schrieb Claudio Pasolini: > > Hi all, > > I'm in the process of upgrading several OpenACS instances and migrating > them from AolServer 4.5 to the latest NaviServer. > > One of the instances makes use of TCLWS for bulding a couple of SOAP web > services and I'm having trouble to make it work. > > Here are the first problems encountered: > > - ns_ictl doesn't support the 'package' argument. I replaced the > command > ns_ictl package require log > with > ns_ictl trace allocate {package require log} > > probably, using "package require log" will be sufficient as well. > > > - but I'm not sure about eventual side effects. > - In a proc called by ns_register_filter preauth I replaced ns_rewrite > with ns_internalredirect but I observed a strange behaviour. > ns_register_filter invokes the proc passing one argument, but actually > the proc receives two, prehauth being added. > > you are probably referring to the old module "nsredirect". Calling > ns_internalredirect should be fine. > > Yes, there is a difference between the calling conventions in AOLserver > and NaviServer: > NaviServer tells the developer the stage, at which the proc was invoked > (the same proc > might be registered for multiple states (such as "preauth", "postauth" or > "trace"). This > difference is as well handled in e.g. OpenACS since 10+ years. > > > - I stumbled in the same problem posted by Wolfgang Winkler > Error: can't set "xsltSchemaDom": var is read-only > and solved it thanks to Gustaf tip. > > should not happen in recent versions of NaviServer > > > - Calling the sample EchoWebService I get a strange error > Error: invalid length: 779 > executing the command > ns_conn copy 0 $length $fp > > this comes probably from this section: > https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82 > > I would think that you can replace the section "Get POSTed data" > by something like: > > set data(query) [ns_getcontent -as_file false -binary false] > > This has at least the following advantages > - less hacky > - works for http and https > - works also when spooling post data > > all the best > -gn > > > I wonder if someone (Wolfgang?) having already a production site running > TCLWS with NaviServer could suggest me how to proceed. > > Happy New Year! > > Claudio > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > > _______________________________________________ > naviserver-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > > > -- > Univ.Prof. Dr. Gustaf Neumann > WU Vienna > Institute of Information Systems and New Media > Welthandelsplatz 1, A-1020 Vienna, Austria > > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > > _______________________________________________ > naviserver-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > > -- > > *Wolfgang Winkler* > Geschäftsführung > wol...@di... > mobil +43.699.19971172 <+43%20699%2019971172> > > dc:*büro* > digital concepts Novak Winkler OG > Software & Design > Landstraße 68, 5. Stock, 4020 Linz > www.digital-concepts.com > tel +43.732.997117.72 > tel +43.699.1997117.2 > > Firmenbuchnummer: 192003h > Firmenbuchgericht: Landesgericht Linz > > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > |
From: Wolfgang W. <wol...@di...> - 2017-01-02 12:34:20
|
Hi Claudio! I can confirm what Gustaf wrote below. We are using our own initialization routine, which is similar to the one provided by the tclws package. We have our own logging facilities, wo we don't need the log package: namespace eval ::WS::AOLserver { if {![info exists wsVersion]} { variable wsVersion [package require WS::Server] } #if {![info exists logVersion]} { # variable logVersion [package require log] #} } For returning values, we use exactly the line from Gustaf: set data(query) [ns_getcontent -as_file false -binary false] This is handy for REST interfaces as well. regards, Wolfgang Am 2016-12-31 um 17:51 schrieb Gustaf Neumann: > Am 30.12.16 um 19:00 schrieb Claudio Pasolini: >> Hi all, >> >> I'm in the process of upgrading several OpenACS instances and >> migrating them from AolServer 4.5 to the latest NaviServer. >> >> One of the instances makes use of TCLWS for bulding a couple of SOAP >> web services and I'm having trouble to make it work. >> >> Here are the first problems encountered: >> >> * ns_ictl doesn't support the 'package' argument. I replaced the >> command >> ns_ictl package require log >> with >> ns_ictl trace allocate {package require log} >> > probably, using "package require log" will be sufficient as well. > >> * but I'm not sure about eventual side effects. >> * In a proc called by ns_register_filter preauth I replaced >> ns_rewrite with ns_internalredirect but I observed a strange >> behaviour. ns_register_filter invokes the proc passing one >> argument, but actually the proc receives two, prehauth being added. >> > you are probably referring to the old module "nsredirect". Calling > ns_internalredirect should be fine. > > Yes, there is a difference between the calling conventions in > AOLserver and NaviServer: > NaviServer tells the developer the stage, at which the proc was > invoked (the same proc > might be registered for multiple states (such as "preauth", "postauth" > or "trace"). This > difference is as well handled in e.g. OpenACS since 10+ years. > >> * I stumbled in the same problem posted by Wolfgang Winkler >> Error: can't set "xsltSchemaDom": var is read-only >> and solved it thanks to Gustaf tip. >> > should not happen in recent versions of NaviServer >> >> * Calling the sample EchoWebService I get a strange error >> Error: invalid length: 779 >> executing the command >> ns_conn copy 0 $length $fp >> > this comes probably from this section: > https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82 > > I would think that you can replace the section "Get POSTed data" > by something like: > > set data(query) [ns_getcontent -as_file false -binary false] > > This has at least the following advantages > - less hacky > - works for http and https > - works also when spooling post data > > all the best > -gn > > >> I wonder if someone (Wolfgang?) having already a production site >> running TCLWS with NaviServer could suggest me how to proceed. >> >> Happy New Year! >> >> Claudio >> >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, SlashDot.org!http://sdm.link/slashdot >> >> >> _______________________________________________ >> naviserver-devel mailing list >> nav...@li... >> https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > > -- > Univ.Prof. Dr. Gustaf Neumann > WU Vienna > Institute of Information Systems and New Media > Welthandelsplatz 1, A-1020 Vienna, Austria > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- *Wolfgang Winkler* Geschäftsführung wol...@di... mobil +43.699.19971172 dc:*büro* digital concepts Novak Winkler OG Software & Design Landstraße 68, 5. Stock, 4020 Linz www.digital-concepts.com <http://www.digital-concepts.com> tel +43.732.997117.72 tel +43.699.1997117.2 Firmenbuchnummer: 192003h Firmenbuchgericht: Landesgericht Linz |
From: Gustaf N. <ne...@wu...> - 2016-12-31 16:52:08
|
Am 30.12.16 um 19:00 schrieb Claudio Pasolini: > Hi all, > > I'm in the process of upgrading several OpenACS instances and > migrating them from AolServer 4.5 to the latest NaviServer. > > One of the instances makes use of TCLWS for bulding a couple of SOAP > web services and I'm having trouble to make it work. > > Here are the first problems encountered: > > * ns_ictl doesn't support the 'package' argument. I replaced the > command > ns_ictl package require log > with > ns_ictl trace allocate {package require log} > probably, using "package require log" will be sufficient as well. > * but I'm not sure about eventual side effects. > * In a proc called by ns_register_filter preauth I replaced > ns_rewrite with ns_internalredirect but I observed a strange > behaviour. ns_register_filter invokes the proc passing one > argument, but actually the proc receives two, prehauth being added. > you are probably referring to the old module "nsredirect". Calling ns_internalredirect should be fine. Yes, there is a difference between the calling conventions in AOLserver and NaviServer: NaviServer tells the developer the stage, at which the proc was invoked (the same proc might be registered for multiple states (such as "preauth", "postauth" or "trace"). This difference is as well handled in e.g. OpenACS since 10+ years. > * I stumbled in the same problem posted by Wolfgang Winkler > Error: can't set "xsltSchemaDom": var is read-only > and solved it thanks to Gustaf tip. > should not happen in recent versions of NaviServer > > * Calling the sample EchoWebService I get a strange error > Error: invalid length: 779 > executing the command > ns_conn copy 0 $length $fp > this comes probably from this section: https://github.com/bovine/tclws/blob/master/AOLserver.tcl#L82 I would think that you can replace the section "Get POSTed data" by something like: set data(query) [ns_getcontent -as_file false -binary false] This has at least the following advantages - less hacky - works for http and https - works also when spooling post data all the best -gn > I wonder if someone (Wolfgang?) having already a production site > running TCLWS with NaviServer could suggest me how to proceed. > > Happy New Year! > > Claudio > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Univ.Prof. Dr. Gustaf Neumann WU Vienna Institute of Information Systems and New Media Welthandelsplatz 1, A-1020 Vienna, Austria |
From: Claudio P. <cla...@gm...> - 2016-12-30 18:00:44
|
Hi all, I'm in the process of upgrading several OpenACS instances and migrating them from AolServer 4.5 to the latest NaviServer. One of the instances makes use of TCLWS for bulding a couple of SOAP web services and I'm having trouble to make it work. Here are the first problems encountered: - ns_ictl doesn't support the 'package' argument. I replaced the command ns_ictl package require log with ns_ictl trace allocate {package require log} but I'm not sure about eventual side effects. - In a proc called by ns_register_filter preauth I replaced ns_rewrite with ns_internalredirect but I observed a strange behaviour. ns_register_filter invokes the proc passing one argument, but actually the proc receives two, prehauth being added. - I stumbled in the same problem posted by Wolfgang Winkler Error: can't set "xsltSchemaDom": var is read-only and solved it thanks to Gustaf tip. - Calling the sample EchoWebService I get a strange error Error: invalid length: 779 executing the command ns_conn copy 0 $length $fp I wonder if someone (Wolfgang?) having already a production site running TCLWS with NaviServer could suggest me how to proceed. Happy New Year! Claudio |
From: Gustaf N. <ne...@wu...> - 2016-12-30 17:28:47
|
Dear all, on sourceforge is a release candidate for NaviServer 4.99.15 (see [1]). Below is a - preliminary - summary of changes. IF you have more changes for this release. please commit or get in touch with me. If everything goes well, the release should follow next week (em, next year). Please test if possible. best regards -gustaf [1] https://sourceforge.net/projects/naviserver/files/naviserver/4.99.15/ ======================================= NaviServer 4.99.15, released 2017-XX-XX ======================================= New Features: - Multiple driver threads for listening on the same port: When OS kernels support SO_REUSEPORT (which is the case on Linux since Kernel 3.9, Mac OS 10.3, Solaris 11, *BSD), one can specify now multiple driver threads for exactly the same listening address (protocol/IP-address/port) via the new config option "driverthreads" with a value larger than 1. With this new feature, NaviServer supports now for all stages of a request multi-threaded execution (driverthreads, spoolerthreads, connection threads, and writerthreads). Tests show that even with high number of concurrent clients, one can improve the throughput for high numbers of concurrent clients slightly (e.g. for 2 driverthreads and 250 concurrent clients, the throughput increases by ~9%, see https://www.mail-archive.com/nav...@li.../msg03445.html) Note: When using multiple driver threads on privileged ports, one has to add "#" followed by the number of necessary bind operations to the prebind address. Otherwise, prebind will bind to the address only once, and only one driver thread can be used. - Dynamic connection thread pool mapping: The new version of NaviServer extends the mapping of requests to connection thread pools by making it (a) introspectible and (b) dynamic (changeable at runtime). Dynamic thread pool mapping can avoid overlong blocking of connection threads by an unexpected peak of slow requests by moving these to a separate connection pool. For a detailed motivation, see https://www.mail-archive.com/nav...@li.../msg03446.html. The following new subcommands of "ns_server" implement the dynamic mapping to connection pools: * ns_server ?-server /s/? ?-pool /p/? map ?-noinherit? ?/mapspec/? Map HTTP-method and path (mapspec) to a certain pool, or list mappings from a pool (when no mapspec is given) * ns_server ?-server /s/? mapped ?-exact? ?-noinherit? /mapspec/ Obtain the pool for a mapspec (HTTP method and path) * ns_server ?-server /s/? ?-pool /p/? unmap ?-noinherit? /mapspec/ Undo previous mapping - New commands to obtain network driver information: * ns_driver info Return per driver detailed configuration information (name of module, type of driver, associated server, configured location, protocol, address, sendwait recvwait, and extraheaders) * ns_driver names Return a list of the names of the loaded driver modules. * ns_driver threads Return a list of the names of the driver threads * ns_driver stats Return for every driver thread the name of the driver module, the number of received requests, the number of spooled requests, the partial requests (received via multiple receive operations), and the number of errors. - Obtain detailed timing results from currently running request * ns_conn partialtimes Returns detailed timing snapshot about the current requests. The result is a dict containing the keys "accepttime", "queuetime", "filtertime", and "runtime" (similar to the per-pool timing statistics in "ns_server stats") - Added debug severity "Debug(nsproxy)" for separate debugging of nsproxy. Performance Improvements: - Move JoinConnThread() out of lock to reduce locking duration and to improve scalability. Bug Fixes: - Better error behavior, when prebind fails. - Make sure, that URLs produced by urlspace's walk callbacks are proper list elements. - Make startup more robust, when called with invalid arguments. - nsproxy: * Don't reset timeout for for reaper when slaves already expired * Improve debug messages Documentation improvements: - improved sample config files * added new config parameters * document parameter "listenbacklog" - improved/new documentation pages of * admin-maintenance * ns_cgi * ns_conn * ns_connchan * ns_driver * ns_filestat * ns_http * ns_httpopen * ns_itcl * ns_parseargs * ns_register * ns_sendmail * ns_server * nssock * nsssl * nsv - more consistent capitalization: * use Tcl instead of TCL * use HTTP (or HTTPS) instead of http (or https). Tcl API Changes: C API Changes: - Additional argument for reuseport for Ns_SockBind(), Ns_DriverListenProc(), Ns_SockListenEx(), Ns_SockBindUdp(), and Ns_SockListenUdp(). Incompatible API Changes: Configuration Changes: - New parameter for drivers (e.g. nssock) * Boolean Parameter "reuseport": When the parameter is set and SO_REUSEPORT is supported by the os, NaviServer will allow multiple listen operations on the same port (default: false) * Integer Parameter "driverthreads": set to a value > 1 when multiple driver threads should be used (default: 1). When multiple driver threads are configured, parameter "reuseport" is automatically set to "true". - New Boolean parameter "mutexlocktrace" for section "ns/parameters": When this parameter is set to true, timing of long mutex calls are printed to stderr. Command Line Changes: - Value provided to prebind option (-b) can be extended by a suffix "#n", where n is the number of prebound sockets (when e.g. multiple driver threads are used on privileged ports) Code Changes: - Extended regression tests * ns_conn.test * ns_driver.test * ns_server.test - Driver reform: make distinction explicit between driver type (e.g. "nssock"), driver name (e.g. "nssock1"), and driver thread name (e.g. "nssock1:1") - Moved definition of type "bool" from ns.h to nsthread.h to make boolean types as well available in nsthread implementation. - Make it possible to pass alternative implementation of CPPCHECK to Makefile - Don't mess around with FD_SETSIZE - Don't use implementation defined NULL as last argument of variadic functions - Reduced size of huge switch statements - Reduced variable scopes - Reduce number of return statements before end of function - Added const declarations - Silenced static checker -- Univ.Prof. Dr. Gustaf Neumann WU Vienna Institute of Information Systems and New Media Welthandelsplatz 1, A-1020 Vienna, Austria |
From: Gustaf N. <ne...@wu...> - 2016-12-28 17:19:16
|
Dear friends of NaviServer, here is a short update of our "market statistics": a) the constant growth measured by w3techs continues b) the download statistics from sourceforge multiplied - for unknown reasons. While we had over the last 4 years typically monthly downloads on sourceforge in the range of 25-75, we saw recently twice about 200 downloads/month, and this month more than 1,000 downloads so far! Maybe, something is running wild. However, i prefer unexplained statistics going up over unexplained statistics going down. all the best -g https://sourceforge.net/projects/naviserver/files/stats/timeline?dates=2005-02-05+to+2016-12-28 Historical trends in the usage of NaviServer Am 09.08.16 um 17:15 schrieb Gustaf Neumann: > > Dear friends of NaviServer, > > The various NaviServer statistics point in the right direction: > > - According the w3techs, the total usage grew by 60% since Sept 2015 [1] > > - NaviServer is used on sites with more traffic than e.g. nginx > (currently close behind the Google servers) > > - The download statistics from sourceforge [2] reached last month a > top mark > > All figures are at a very low level, but the tendency looks good. > > all the best > > -gustaf neumann > > [1] https://w3techs.com/technologies/details/ws-naviserver/all/all > > [2] > https://sourceforge.net/projects/naviserver/files/stats/timeline?dates=2005-02-05+to+2016-07-30 > > > Historical trends in the usage of NaviServer > > Market position of NaviServer > > -- Univ.Prof. Dr. Gustaf Neumann WU Vienna Institute of Information Systems and New Media Welthandelsplatz 1, A-1020 Vienna, Austria |
From: Wolfgang W. <wol...@di...> - 2016-12-07 17:32:45
|
Hi everyone! We tried to insert texts with smileys into our postgres database and got garbled output. Obviously tcl can't handle 4 byte UTF characters out of the box. But there is a directive #define TCL_UTF_MAX 3 in generic/tcl.h. The comment says: /* * The maximum number of bytes that are necessary to represent a single * Unicode character in UTF-8. The valid values should be 3, 4 or 6 * (or perhaps 1 if we want to support a non-unicode enabled core). If 3 or * 4, then Tcl_UniChar must be 2-bytes in size (UCS-2) (the default). If 6, * then Tcl_UniChar must be 4-bytes in size (UCS-4). At this time UCS-2 mode * is the default and recommended mode. UCS-4 is experimental and not * recommended. It works for the core, but most extensions expect UCS-2. */ TCL_UTF_MAX 4 would still be UCS-2 and should be safe. Has anyone tried this with a naviserver instance? regards, wiwo -- *Wolfgang Winkler* Geschäftsführung wol...@di... mobil +43.699.19971172 dc:*büro* digital concepts Novak Winkler OG Software & Design Landstraße 68, 5. Stock, 4020 Linz www.digital-concepts.com <http://www.digital-concepts.com> tel +43.732.997117.72 tel +43.699.1997117.2 Firmenbuchnummer: 192003h Firmenbuchgericht: Landesgericht Linz |
From: Gustaf N. <ne...@wu...> - 2016-12-07 12:00:05
|
Dear all, The forthcoming version of NaviServer will extend the current mapping of requests to connection thread pools by making it introspectible and dynamic (changeable at runtime). Here is the motivation for it: Assume there is a web site expecting about 2000 requests per minute taking <10ms, 300 requests <1sec, and 30 requests <5secs, where all times are just the times spent in the connection thread (no input or delivery spooling included). We assume for the time being, the request processing times are independent from other requests, and that the requests are taking actually this boundary times. For such a website, a configuration with 8 connection threads would be sufficient, even when all requests reach their boundary times. In the table below, ERPM stands for expected requests per minute, and MRPTM for maximum number of requests per thread and minute: ms ERPM MRPTM Threads Needed 10 2000 6000 0.33 1000 300 60 5.00 5000 30 12 2.50 total 7.83 However, as we all know, good estimations are hard and furthermore, sometimes, the requests are "bulky" (no uniform distribution). So let us assume the server has to deal for a certain time period with 100 and not 30 of these slow requests. We see, that these requests can bring the whole server to a still-stand, blocking the 8 available connection threads alone (needing 8.33 threads). ms ERPM MRPTM Threads Needed 10 2000 6000 0.33 1000 300 60 5.00 5000 100 12 8.33 total 13.67 When all available connection threads are busy, further incoming requests are queued. When the queuing time is e.g. 1 second, a former 10ms request will take 1.01sec in the user's perception (~100 times slower). When a "slow" request taking normally 1 sec is queued for 1sec, such a request would be just twice as slow for the user, so the queuing penalty hurts much more for fast requests. When requests take much longer than usual, users tend to press reload, and the situation becomes even more worse, since there will be even more slow requests to be handled. Once the queuing kicks in, and there is only one pool, even an admin can't login and look what happens (except over the control port, when enabled). What's desired is a means to keep a server lively although certain requests might become slow. When we can identify slow requests, and let these be served by a separate pool, then the other 2.300 faster requests can run mostly undisturbed by the 100 slow ones, and the harm of underestimated slow requests will be much smaller. Therefore, multiple queues can improve average QOS significantly. With current NaviServer, the mapping of requests (method + urls) to connection pools can happen only via config file. With the forthcoming version, we can query and modify this mapping at runtime via the new subcommands of ns_server: ns_server ... map ... ns_server ... mapped ... ns_server ... unmap ... When we measure the runtime of a request, we can use this information to map future occurrences of the same request dynamically to a different connection pool, e.g. a pool for slow requests. Note, that for measuring the runtime, we must not include the queuing time, otherwise it might happen, that all requests might be moved to the slow pool due to queuing. Therefore, the forthcoming version will as well provide a means to obtain the "partialtimes" of a request (the same times, which can be currently recorded to the access log) ns_conn partialtimes By using the partial times and the dynamic mapping commands, we can define a request trace to perform the queue mapping like e.g.: ns_register_trace GET /* { set pt [ns_conn partialtimes] set req [list [ns_conn method] [ns_conn url]] set ctime [expr {[dict get $pt runtime] + [dict get $pt filtertime]}] if {$ctime > 3.0 && [ns_server mapped $req] eq ""} { ns_server -pool slow map -noinherit $req } } The connection thread pools can bed defined as usual in the config file: ns_section "ns/server/${server}/pools" ns_param fast "Fast lane pool" ns_param slow "Slow lane pool" ns_section "ns/server/${server}/pool/fast" ns_param minthreads 4 ns_param maxthreads 4 ns_param map "GET /*.png" ns_param map "GET /*.jpg" ns_param map "GET /*.pdf" ns_section "ns/server/${server}/pool/slow" ns_param minthreads 5 ns_param maxthreads 15 ns_param maxconnections 200 By these definitions, the mappings to the "fast" pool are static, and mapping to the "slow" pool are dynamic via the request trace. One can certainly perform the mapping to the fast pool as well dynamically. We had last week the most busy week of the year on our production system, and the dynamic connection pool mapping helped as to improve the user experience significantly. We are using there a more complex setup, also using a "monitor" connection pool for admin requests; the used rules for mapping are more differentiated, but these are application specific and will differ from site to site. These changes for naviserver are already committed to bitbucket. I've also updated nsstats module to inspect the actual mappings. all the best -g |
From: Gustaf N. <ne...@wu...> - 2016-11-20 15:15:13
|
Dear all, some of you might be interested in the following tests, which provides as wll some preview to the next NaviServer release. Some recent OS kernels support SO_REUSEPORT [1], which allows us to open multiple threads to listen on the same port. The current development version for NaviServer 4.99.15 uses the reuseport feature (if supported by the OS) when one specifies the new config option "driverthreads" on a driver with a value larger than 1. With this new feature, NaviServer will support for all stages of a request multi threaded execution (driverthreads, spoolerthreads, connection threads, and writerthreads). Although the implementation is not fully finished in NaviServer, (prebind, documentation,... missing), here are a few results from some testing on a Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz with 8 cores [2] on a Linux box with the Linux kernel 3.13.0-86-generic. As expected, the benefit will be for most application not overwhelming, since the driver thread uses async io and performs no complex computations; but still, the results are measurable for this test. It was also not clear, whether the OS will use the multiple driver threads. The test performs about 8mio identical requests to the out-of-the box NaviServer start page (static page) using different number of clients. The actual requests are measured by weighttp [3]. We can see, that NaviServer processes up to 62k requests, leading to best results with 130 concurrent clients. 1 driverthread: Number Requests per second of ---------------------------- Clients min ave max Time -------- -------- -------- -------- -------------- 10, 41537, 41623, 41712, 00:41:06 20, 50468, 50567, 50643, 00:41:12 30, 50991, 52123, 53439, 00:41:18 40, 55269, 55518, 55906, 00:41:24 50, 56124, 57238, 58526, 00:41:29 60, 57912, 58774, 59471, 00:41:34 70, 59162, 59791, 60676, 00:41:39 80, 60369, 61261, 62273, 00:41:44 90, 60550, 61569, 62234, 00:41:49 100, 61696, 61866, 62142, 00:41:54 110, 61844, 62255, 62809, 00:41:58 120, 61539, 62225, 62890, 00:42:03 130, 62539, 62726, 63007, 00:42:08 140, 61408, 61791, 62364, 00:42:13 150, 60133, 60477, 60863, 00:42:18 160, 57031, 58027, 58556, 00:42:23 170, 56698, 58295, 59615, 00:42:28 180, 56532, 57784, 59081, 00:42:33 190, 56854, 57331, 58030, 00:42:39 200, 57057, 57505, 57741, 00:42:44 210, 56710, 57207, 58001, 00:42:49 220, 55877, 57129, 57857, 00:42:54 230, 56414, 57521, 59239, 00:43:00 240, 55205, 56078, 56871, 00:43:05 250, 55325, 56398, 57146, 00:43:10 When we configure 2 driverthreads, the performance with a few clients is interestingly worse (40k vs. 41k above), the peak is at a similar level, but the performance decrease after the peak is more flat. At 250 clients, we have now 61k with 2 driverthreads instead of 56k with one driverthread. 2 driverthreads: Number Requests per second of ---------------------------- Clients min ave max Time -------- -------- -------- -------- -------------- 10, 40001, 40106, 40222, 00:49:20 20, 49768, 50164, 50510, 00:49:26 30, 52376, 52584, 52805, 00:49:32 40, 56059, 56204, 56308, 00:49:38 50, 56353, 56798, 57104, 00:49:43 60, 58605, 58949, 59283, 00:49:48 70, 59749, 59950, 60209, 00:49:53 80, 61523, 61682, 61992, 00:49:58 90, 62222, 62568, 63056, 00:50:03 100, 62504, 62722, 62932, 00:50:07 110, 62452, 62607, 62729, 00:50:12 120, 62880, 62927, 62968, 00:50:17 130, 62663, 62804, 62883, 00:50:22 140, 62447, 62509, 62563, 00:50:27 150, 61786, 62061, 62408, 00:50:31 160, 60609, 61769, 62419, 00:50:36 170, 60304, 61654, 62613, 00:50:41 180, 60355, 60702, 60965, 00:50:46 190, 60268, 60690, 61153, 00:50:51 200, 61023, 61142, 61233, 00:50:56 210, 61029, 61356, 62003, 00:51:01 220, 60858, 61136, 61596, 00:51:06 230, 61064, 61362, 61580, 00:51:11 240, 60867, 61260, 61530, 00:51:16 250, 61137, 61390, 61645, 00:51:20 The same continues with 10 driverthreads configured. the performance with a few clients is interestingly even worse (new 37k), reaching a peak of ~62k requests per second with more than 200 clients. 10 driverthreads: Number Requests per second of ---------------------------- Clients min ave max Time -------- -------- -------- -------- -------------- 10, 37443, 37657, 37875, 00:37:28 20, 49141, 49492, 49697, 00:37:34 30, 52764, 52887, 53081, 00:37:40 40, 55834, 56531, 57154, 00:37:45 50, 58638, 59156, 59624, 00:37:50 60, 59130, 59391, 59731, 00:37:55 70, 59807, 59920, 60005, 00:38:00 80, 59863, 60001, 60173, 00:38:05 90, 60107, 60167, 60244, 00:38:10 100, 59107, 59718, 60360, 00:38:15 110, 59480, 59927, 60496, 00:38:20 120, 59751, 60105, 60505, 00:38:25 130, 59479, 59635, 59799, 00:38:30 140, 59560, 59974, 60529, 00:38:35 150, 60571, 61301, 61760, 00:38:40 160, 61361, 61620, 61939, 00:38:45 170, 61261, 61821, 62154, 00:38:50 180, 60878, 61285, 61737, 00:38:55 190, 61039, 61553, 61863, 00:39:00 200, 61701, 61841, 62088, 00:39:05 210, 61665, 61933, 62222, 00:39:09 220, 61562, 61669, 61844, 00:39:14 230, 61448, 61634, 61785, 00:39:19 240, 61711, 61963, 62124, 00:39:24 250, 61531, 61789, 62154, 00:39:29 As the following output (produced by the new "ns_driver stats" command) shows, Linux distributes the requests evenly over the driver threads: name nsssl:0 received 0 spooled 0 partial 0 errors 0 name nssock:9 received 782662 spooled 0 partial 1051 errors 0 name nssock:8 received 786790 spooled 0 partial 1033 errors 0 name nssock:7 received 808231 spooled 0 partial 1054 errors 0 name nssock:6 received 813971 spooled 0 partial 1042 errors 0 name nssock:5 received 843588 spooled 0 partial 1070 errors 0 name nssock:4 received 727655 spooled 0 partial 982 errors 0 name nssock:3 received 777413 spooled 0 partial 1066 errors 0 name nssock:2 received 778254 spooled 0 partial 1009 errors 0 name nssock:1 received 824841 spooled 0 partial 1002 errors 0 name nssock:0 received 778979 spooled 0 partial 988 errors 0 Certainly, for most real applications, the benefits will be even less than this. However, more architectures with more cores are coming, so maybe future applications on future hardware can benefit more from this feature. all the best -gn [1] https://lwn.net/Articles/542629/ [2] http://ark.intel.com/products/83356/Intel-Xeon-Processor-E5-2630-v3-20M-Cache-2_40-GHz [3] https://github.com/lighttpd/weighttp |
From: Gustaf N. <ne...@wu...> - 2016-11-18 12:17:18
|
Dear friends of NaviServer, on sourceforge the new release of NaviServer 4.99.14 is available [1]. As always, the newest release can be as well obtained from bitbucket [2]. In short: this release fixes a few bugs, improves the portability to FreeBSD (locale handling) and Solaris (IPv6), provides some statistics for connection thread cleanup handling, and improves the applicability of ns_connchan for heavy traffic applications. I'll prepare as well an announcement for c.l.tcl and OpenACS.org. Below are the changes since 4.99.13: best regards -gustaf [1] https://sourceforge.net/projects/naviserver/files/naviserver/4.99.14/ [2] https://bitbucket.org/naviserver/naviserver/overview ======================================= NaviServer 4.99.14, released 2016-11-18 ======================================= 86 files changed, 2655 insertions(+), 1451 deletions(-) New Features: * Added statistics for "trace times": i.e. the time spent in a connection thread after the main request was executed, for running post filters, server traces (e.g. writing access.log) and cleanups. The statistic results are included in [ns_server stats]. * Improved compatibility with FreeBSD and OminOS (Solaris). * Added module "revproxy" for implementing a reverse proxy based on ns_connchan (working as well for proxying WebSockets). Performance Improvements: * Added new config flag "concurrentinterpcreate" to "ns/parameters" to allow optionally concurrent creations of Tcl interpreters. Concurrent creations of Tcl interpreters were a problem with Tcl 8.5, but seems to work with Tcl 8.6. Per default, this feature is turned off. * Don't update interp in "ns_ictl cleanup", when no defer callbacks were executed. Bug Fixes: * ns_connchan improvements: - Handle potential race condition between ns_connchan and socket callbacks during shutdown - Make sure, channel is writable before we are writing to it - Add support for partial write operations ("ns_connchan write" and "ns_connchan open") - Provide more detailed error messages - Allow callback changes without invoking socket-shutdown machinery * Make sure, the tests are running with expected locale and encoding (fixed a problem on FreeBSD) * Fix bug #77 (potential crash during ns_mktemp, strdup() vs. ns_strdup(), introduced in 4.99.13, reported by Patrick Heissenberger) * Collect statistics before traces are run (i.e. before access.log is written); this fixes a bug reported by David Osborne. * In HTTP client requests, don't start urls with "//" under certain conditions * Keep internally convention, that stored request lines do not end with crlf to avoid unneeded tests * Don't "roll away" log file from stderr, when nsd was started with "-c" or "-f" flags * Don't complain about uncorking, when user has already closed the connection * Make windows variant of ns_mkstemp() more compatible with unix/mac (remove _O_TEMPORARY flag) * Use datatype "int" for parameters passed with Ns_ObjvBool (rather than bool, which causes invalid values on gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)) * Fix several bugs in keylist Documentation improvements: * doc/src/naviserver/ns_connchan.man: - Added documentation for "ns_connchan open" - Clarified format in which timeouts can be specified - document new flags * doc/src/manual/admin-tuning.man: - Added documentation of "ns/parameter" option "concurrentinterpcreate" * doc/src/manual/admin-maintenance.man: - Added section with sample configuration for systemd * doc/src/naviserver/ns_mktemp.man: - Improved function, explain deprecation state of c-library function, * General overhaul of the contrib/example scripts contrib/examples/index.adp, contrib/examples/upload.tcl, contrib/examples/writer.tcl * Various small documentation improvements. * Improved sample config files. Tcl API Changes: * ns_connchan: Added flag "-version" to "ns_connchan open" to specify HTTP version (default 1.0) Configuration Changes: * Improved output of "make help" * Don't throw error message, when doing an install from a bitbucket checkout and no documentation was generated locally. Command Line Changes: * improve usefulness of "nsd -c": in case the environment variable NAVISERVER is not set, and bin/init.tcl is not found under the running binary, fall-back to the configured install directory as "home". Code Changes: * Extended regression test * Keylists: - Added new testset for keylists - fixed several bugs - use naviserver memory management - prefer Tcl_Objs over string based interface * Improved source code documentation * Turn ns_tmpnam into a proc and get rid of call to deprecated C library function tmpnam() * Added preprocessor variable NS_NAVISERVER to point to the configured install directory (can be used as last resort to find configuration data when started e.g. with "nsd -c"). * C-Code cleanup: * Improved type cleanness on gcc 4.8.4 (Ubuntu) and under gcc7. * Aligned function prototype with definition (Ns_DbInterpretSqlFile(), Ns_ThreadCreate(), Ns_ThreadStackSize(), caused complaints under Solaris) * Introduce macros for IPv6 support under Solaris, since it does not define s6_addr16 members) * don't use implementation defined NULL as last argument of variadic function Ns_ConfigGetPath(), Ns_DStringVarAppend(), Ns_HomePath(), Ns_MakePath(), Ns_TclEvalCallback() * Reduced number of return statement before end of function. * Reduced number of gotos. * Reduced variable scopes. Modules: * revproxy: New Tcl module based on ns_connchan to implement a reverse proxy (works as well with tuneling WebSockets). * nsexample, nsphp: Aligned function definitions with ns.h to improve cleanness of compilation |
From: Gustaf N. <ne...@wu...> - 2016-11-11 13:53:38
|
Dear friends of NaviServer, on sourceforge is a release candidate for NaviServer 4.99.14 (see [1]). The version fixes essentially a few new and a few old bugs and continues the ongoing code cleanup process. Also the portability is improved (FreeBSD, OmniOS) and ns_connchan was stress-tested via the new revproxy module and received several updates. If everything goes well, the release should follow next week. Please test if possible. Below are the changes since 4.99.14: best regards -gustaf [1] https://sourceforge.net/projects/naviserver/files/naviserver/4.99.14/ ======================================= NaviServer 4.99.14, released 2016-11-XX ======================================= 66 files changed, 2391 insertions(+), 1327 deletions(-) New Features: * Added statistics for "trace times": i.e. the time spent in a connection thread after the main request was executed, for running post filters, server traces (e.g. writing access.log) and cleanups. The statistic results are included in [ns_server stats]. * Improved compatibility with FreeBSD and OminOS (Solaris). * Added module "revproxy" for implementing a reverse proxy based on ns_connchan (working as well for proxying WebSockets). Performance Improvements: * Added new config flag "concurrentinterpcreate" to "ns/parameters" to allow optionally concurrent creations of Tcl interpreters. Concurrent creations of tcl interpreters were a problem with Tcl 8.5, but seems to work with Tcl 8.6. Per default, this feature is turned off. * Don't update interp in "ns_ictl cleanup", when no defer callbacks were executed. Bug Fixes: * ns_connchan improvements: - Handle potential race condition between ns_connchan and socket callbacks during shutdown - Make sure, channel is writable before we are writing to it - Add support for partial write operations ("ns_connchan write" and "ns_connchan open") - Provide more detailed error messages - Allow callback changes without invoking socket-shutdown machinery * Make sure, the tests are running with expected locale and encoding (fixed a problem on FreeBSD) * Fix bug #77 (potential crash during ns_mktemp, strdup() vs. ns_strdup(), introduced in 4.99.13, reported by Patrick Heissenberger) * Collect statistics before traces are run (i.e. before access.log is written); this fixes a bug reported by David Osborne. * In HTTP client requests, don't start urls with "//" under certain conditions * Keep internally convention, that stored request lines do not end with crlf to avoid unneeded tests * Don't "roll away" log file from stderr, when nsd was started with "-c" or "-f" flags * Don't complain about uncorking, when user has already closed the connection * Make windows variant of ns_mkstemp() more compatible with unix/mac (remove _O_TEMPORARY flag) * Use datatype "int" for parameters passed with Ns_ObjvBool (rather than bool, which causes invalid values on gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)) * Fix several bugs in keylist Documentation improvements: * doc/src/naviserver/ns_connchan.man: - Added documentation for "ns_connchan open" - Clarified format in which timeouts can be specified - document new flags * doc/src/manual/admin-tuning.man: - Added documentation of "ns/parameter" option "concurrentinterpcreate" * doc/src/manual/admin-maintenance.man: - Added section with sample configuration for systemd * doc/src/naviserver/ns_mktemp.man: - Improved function, explain deprecation state of c-library function, * General overhaul of the contrib/example scripts contrib/examples/index.adp, contrib/examples/upload.tcl, contrib/examples/writer.tcl * Various small documentation improvements. * Improved sample config files. Tcl API Changes: * ns_connchan: Added flag "-version" to "ns_connchan open" to specify HTTP version (default 1.0) C API Changes: Incompatible API Changes: Configuration Changes: * Improved output of "make help" * Don't throw error message, when doing an install from a bitbucket checkout and no documentation was generated locally. Command Line Changes: * improve usefulness of "nsd -c": in case the environment variable NAVISERVER is not set, and bin/init.tcl is not found under the running binary, fall-back to the configured install directory as "home". Code Changes: * Extended regression test * Keylists: - Added new testset for keylists - fixed several bugs - use naviserver memory management - prefer Tcl_Objs over string based interface * Improved source code documentation * Turn ns_tmpnam into a proc and get rid of call to deprecated C library function tmpnam() * Added preprocessor variable NS_NAVISERVER to point to the configured install directory (can be used as last resort to find configuration data when started e.g. with "nsd -c"). * C-Code cleanup: * Improved type cleanness on gcc 4.8.4 (Ubuntu) and under gcc7. * Aligned function prototype with definition (Ns_DbInterpretSqlFile(), Ns_ThreadCreate(), Ns_ThreadStackSize(), caused complaints under Solaris) * Introduce macros for IPv6 support under Solaris, since it does not define s6_addr16 members) * Reduced number of return statement before end of function. * Reduced number of gotos. * Reduced variable scopes. |
From: David O. <da...@qc...> - 2016-11-03 16:17:16
|
Thanks Gustaf. I've patched 4.99.12 with your changes and it seems to work fine now. Thanks for the fast response! Regards, David On 3 November 2016 at 10:12, Gustaf Neumann <ne...@wu...> wrote: > > Am 02.11.16 um 16:49 schrieb David Osborne: > > I've spotted an issue that seems to have been introduced at some point > between 4.99.10 & 4.99.11 (and still present in tip as of today). > When logpartialtimes are enabled, the access log seems to be logging the > runtime of the previous entry. > > Dear David, > > many thanks for the excellent bug report. the error sneaked in during the > large commit [1] addressing the HTTP/1.2 pipelined requests and the > entailed modified life-cycle management. This bug is now fixed on > bitbucket, the partial times are like before. > > -g > > PS: I've as noticed, that we have currently no time statistics about what > happens after a requests (cleanups, server traces, etc.). We can't include > such statistics in the access.log via logpartialtimes (since while writing > the access log entry, we have no idea, how long this will take, cleanup is > later), be we can include it in the server statistics (accessible via > "ns_server stats", and therefore useful for munin etc.). Maybe, we should > add this as well. > > [1] https://bitbucket.org/naviserver/naviserver/commits/ > 121f1aace338714a894ad1277e0781c2132f0d5f > > ------------------------------------------------------------ > ------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > -- David Osborne Qcode Software Limited http://www.qcode.co.uk T: +44 (0)1463 896484 |
From: Gustaf N. <ne...@wu...> - 2016-11-03 11:45:16
|
Am 02.11.16 um 21:30 schrieb Adam Jensen: > Back at the Bitbucket web interface, I could then press the 'Compare' > button and see the change. Continuing to follow the instructions, I've > created a pull request to test the process. this worked perfectly, the change is already in the code base. -g |
From: Gustaf N. <ne...@wu...> - 2016-11-03 10:12:21
|
Am 02.11.16 um 16:49 schrieb David Osborne: > I've spotted an issue that seems to have been introduced at some point > between 4.99.10 & 4.99.11 (and still present in tip as of today). > When logpartialtimes are enabled, the access log seems to be logging > the runtime of the previous entry. Dear David, many thanks for the excellent bug report. the error sneaked in during the large commit [1] addressing the HTTP/1.2 pipelined requests and the entailed modified life-cycle management. This bug is now fixed on bitbucket, the partial times are like before. -g PS: I've as noticed, that we have currently no time statistics about what happens after a requests (cleanups, server traces, etc.). We can't include such statistics in the access.log via logpartialtimes (since while writing the access log entry, we have no idea, how long this will take, cleanup is later), be we can include it in the server statistics (accessible via "ns_server stats", and therefore useful for munin etc.). Maybe, we should add this as well. [1] https://bitbucket.org/naviserver/naviserver/commits/121f1aace338714a894ad1277e0781c2132f0d5f |
From: David O. <da...@qc...> - 2016-11-03 09:54:24
|
The issue is present in the current tip of the naviserver source in bitbicket... 4.99.13 I believe On 2 November 2016 at 18:33, Iuri Sampaio <iu...@iu...> wrote: > Yes! > Unless, you're somehow stuck on 4.99.11, try NS 4.99.12. If the issue > still remains, then post here. > > > Best wishes > Iuri > > > On 02-11-2016 13:49, David Osborne wrote: > > Hi, > > I've spotted an issue that seems to have been introduced at some point > between 4.99.10 & 4.99.11 (and still present in tip as of today). > When logpartialtimes are enabled, the access log seems to be logging the > runtime of the previous entry. > > As a testcase on Debian 8: > > hg clone https://bitbucket.org/naviserver/naviserver > cd naviserver > ./autogen.sh --disable-ipv6 --with-tcl=/usr/lib/tcl8.5 --enable-rpath > --enable-threads > make > make install > > Edit: > /usr/local/ns/conf/nsd-config.tcl > -> add the following to the nslog section > ns_param logpartialtimes true > > Then add "ns_sleep 2" to the top of nsstats.tcl > > Run: > /usr/local/ns/bin/nsd -c -u nsd -t /usr/local/ns/conf/nsd-config.tcl > > Browsing to / followed by /nsstats.tcl followed by /, I get the following > results: > > [image: Inline images 1] > > So it looks like the runtime for the nsstats is being logged along with > the 2nd request for /. The request start times look OK though. > > I had a look at the code changes for 4.99.11 but couldn't really see > anything obvious. > > NaviServer/4.99.14d2 > Tag: 72191a0e529f default tip > Built: Nov 2 2016 at 15:15:30 > Tcl version: 8.5 > Platform: linux > > Here's the results from 4.99.10 > > [image: Inline images 2] > > Any ideas? > > Regards, > -- > David > > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > > > > _______________________________________________ > naviserver-devel mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > > > ------------------------------------------------------------ > ------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > > -- David Osborne Qcode Software Limited http://www.qcode.co.uk T: +44 (0)1463 896484 |
From: Adam J. <ha...@ri...> - 2016-11-02 20:30:59
|
On 11/02/2016 09:12 AM, Gustaf Neumann wrote: [snip] > mercurial can be understood as a "simpler git". up to a certain point, > one has the same commands like in git ("pull", "push"), but later the > details certainly differ. My impression is that git allows more detailed > configuration, but i have to say, for i we need in the naviserver > project, mercurial works perfectly smooth and fine. I haven't really used Git other than 'git clone ...'. I have been, however, casually looking into [Fossil][1] during the last few months. There is a [free hosting service][2] for Fossil repositories. The [source][3] for the Fossil hosting service is also open. [1]: http://www.fossil-scm.org/ [2]: http://chiselapp.com/ [3]: https://chiselapp.com/user/rkeene/repository/flint/ Last night, I configured a local instance of Navisever to host my Fossil repositories on my LAN through the nscgi mechanism. It might be interesting to explore that further. (I suppose everyone reading this list is already familiar with the Tcl/Tk technology ecosystem and, consequently, Fossil/SQLite). > concerning pull requests: Check out the following pages. > > https://confluence.atlassian.com/bitbucket/create-a-pull-request-774243413.html > https://confluence.atlassian.com/bitbucket/work-with-pull-requests-223220593.html > > The easiest approach is probably to commit your changes to your cloned > request, push it to your clone, and issue the pull request via the > web-interface of bitbucket. Thanks for the references. I deleted the Bitbucket clone of naviserver (hanzer/nsclone) and created a fork (hanzer/nsfork). Then, on my workstation, I did this: hg clone https://bitbucket.org/hanzer/nsfork cd nsfork vi contrib/examples/writer.tcl hg commit contrib/examples/writer.tcl hg push Back at the Bitbucket web interface, I could then press the 'Compare' button and see the change. Continuing to follow the instructions, I've created a pull request to test the process. |
From: Iuri S. <iu...@iu...> - 2016-11-02 18:33:48
|
Yes! Unless, you're somehow stuck on 4.99.11, try NS 4.99.12. If the issue still remains, then post here. Best wishes Iuri On 02-11-2016 13:49, David Osborne wrote: > Hi, > > I've spotted an issue that seems to have been introduced at some point > between 4.99.10 & 4.99.11 (and still present in tip as of today). > When logpartialtimes are enabled, the access log seems to be logging > the runtime of the previous entry. > > As a testcase on Debian 8: > > hg clone https://bitbucket.org/naviserver/naviserver > <https://bitbucket.org/naviserver/naviserver> > cd naviserver > ./autogen.sh --disable-ipv6 --with-tcl=/usr/lib/tcl8.5 --enable-rpath > --enable-threads > make > make install > > Edit: > /usr/local/ns/conf/nsd-config.tcl > -> add the following to the nslog section > ns_param logpartialtimes true > > Then add "ns_sleep 2" to the top of nsstats.tcl > > Run: > /usr/local/ns/bin/nsd -c -u nsd -t /usr/local/ns/conf/nsd-config.tcl > > Browsing to / followed by/nsstats.tcl followed by /, I get the > following results: > > Inline images 1 > > So it looks like the runtime for the nsstats is being logged along > with the 2nd request for /. The request start times look OK though. > > I had a look at the code changes for 4.99.11 but couldn't really see > anything obvious. > > NaviServer/4.99.14d2 > Tag: 72191a0e529f default tip > Built: Nov 2 2016 at 15:15:30 > Tcl version: 8.5 > Platform: linux > > Here's the results from 4.99.10 > > Inline images 2 > > Any ideas? > > Regards, > -- > David > > > > ------------------------------------------------------------------------------ > Developer Access Program for Intel Xeon Phi Processors > Access to Intel Xeon Phi processor-based developer platforms. > With one year of Intel Parallel Studio XE. > Training and support from Colfax. > Order your platform today. http://sdm.link/xeonphi > > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |
From: David O. <da...@qc...> - 2016-11-02 15:49:10
|
Hi, I've spotted an issue that seems to have been introduced at some point between 4.99.10 & 4.99.11 (and still present in tip as of today). When logpartialtimes are enabled, the access log seems to be logging the runtime of the previous entry. As a testcase on Debian 8: hg clone https://bitbucket.org/naviserver/naviserver cd naviserver ./autogen.sh --disable-ipv6 --with-tcl=/usr/lib/tcl8.5 --enable-rpath --enable-threads make make install Edit: /usr/local/ns/conf/nsd-config.tcl -> add the following to the nslog section ns_param logpartialtimes true Then add "ns_sleep 2" to the top of nsstats.tcl Run: /usr/local/ns/bin/nsd -c -u nsd -t /usr/local/ns/conf/nsd-config.tcl Browsing to / followed by /nsstats.tcl followed by /, I get the following results: [image: Inline images 1] So it looks like the runtime for the nsstats is being logged along with the 2nd request for /. The request start times look OK though. I had a look at the code changes for 4.99.11 but couldn't really see anything obvious. NaviServer/4.99.14d2 Tag: 72191a0e529f default tip Built: Nov 2 2016 at 15:15:30 Tcl version: 8.5 Platform: linux Here's the results from 4.99.10 [image: Inline images 2] Any ideas? Regards, -- David |
From: Gustaf N. <ne...@wu...> - 2016-11-02 13:13:14
|
Am 02.11.16 um 02:24 schrieb Adam Jensen: > I am somewhat new to Mercurial and Bitbucket but I've set up an account > and cloned the repository. Does anyone know of a tutorial or blog that > describes a work-flow, process, or development methodology that fits > this situation? > > There is the canonical Bitbucket repository: > https://bitbucket.org/naviserver/naviserver/ > > And my clone of that repository: > https://bitbucket.org/hanzer/nsclone > > At this point, do I 'hg pull' from /naviserver, then modify and 'hg > push' to /nsclone? Any clarification or useful references will be much > appreciated! mercurial can be understood as a "simpler git". up to a certain point, one has the same commands like in git ("pull", "push"), but later the details certainly differ. My impression is that git allows more detailed configuration, but i have to say, for i we need in the naviserver project, mercurial works perfectly smooth and fine. concerning pull requests: Check out the following pages. https://confluence.atlassian.com/bitbucket/create-a-pull-request-774243413.html https://confluence.atlassian.com/bitbucket/work-with-pull-requests-223220593.html The easiest approach is probably to commit your changes to your cloned request, push it to your clone, and issue the pull request via the web-interface of bitbucket. all the best -g |
From: Adam J. <ha...@ri...> - 2016-11-02 01:24:18
|
On 10/31/2016 08:44 AM, Gustaf Neumann wrote: > many of us use naviserver since many years, so we get blind to > things, which pop up immediately to the eye of a new user. I understand and agree; observing a new user's responses can be very informative. > Also keep in mind, that the code and documentation was written > by people with many mother tongues. Whatever languages are used, natural and synthetic (programming), it seems like a reasonable goal to strive to compose expressions in those languages in a way that is semantically meaningful, grammatically coherent, and syntactically well-formed. While I am reading the Naviserver documentation and source code (that's the expensive part), I can keep notes and then try to provide some form of useful feedback. > But contributing is easy: in case someone finds something to improve > (from wording of README files to docs and code), just clone the project > on bitbucket, improve the issues in your clone and issue a pull request. I am somewhat new to Mercurial and Bitbucket but I've set up an account and cloned the repository. Does anyone know of a tutorial or blog that describes a work-flow, process, or development methodology that fits this situation? There is the canonical Bitbucket repository: https://bitbucket.org/naviserver/naviserver/ And my clone of that repository: https://bitbucket.org/hanzer/nsclone At this point, do I 'hg pull' from /naviserver, then modify and 'hg push' to /nsclone? Any clarification or useful references will be much appreciated! |
From: Gustaf N. <ne...@wu...> - 2016-10-31 13:58:47
|
Dear all, while looking at bugreport #77 [1], i have revisited the situation around tmp file generation in NaviServer. We have currently the following tcl commands implemented (a) ns_tmpnam (b) ns_mktemp the first one is deprecated since a long time, since it uses the deprecated c-library function tmpnam(). I am considering on dropping the call to tmpnam() in the code, use instead mktemp(), but keeping the command for backward compatibility on the Tcl level. Most compiler complain already about the usage of tmpnam(). Concerning (b), the usage of mktemp() is also not really recommended, since the creation of the tmp file or directory should be atomic (rather than two different calls for creating a name and the creating then the resource). One should use mkstemp()/mkdtemp() instead, which perform the tmp-file/dir creating in one step and return the created resource. However, the recommended functions are not API-compatible, such we can't change simply the implementation in ns_mktemp. Implementing new commands "ns_mkstemp" or "ns_mkdtemp" in NaviServer would not be complex, since we have already a ns_mkstemp() function for internal use (also for windows), but i am reluctant introducing new commands, since starting with Tcl 8.6, Tcl has a new sub-command "file tempfile" to support temporary file generation. We could/should recommend its usage instead. so i am considering turning ns_tmpnam into a backwards (API) compatible proc, and leaving ns_mktemp as it is, hoping that more installations will switch to Tcl 8.6 sooner or later. Comments? Opinions? Necessities? all the best -gn [1] https://sourceforge.net/p/naviserver/bugs/77/ |