Skip to content

Commit

Permalink
Issue #58: some tweaks to implementation as I flesh out ZnSeasideGemS…
Browse files Browse the repository at this point in the history
…erver for seaside ... fine tune logging and honor debugMode in terms of passing exceptions when set ....
  • Loading branch information
dalehenrich committed Dec 11, 2014
1 parent 06e353e commit 3d7f41d
Show file tree
Hide file tree
Showing 111 changed files with 130 additions and 196 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@
"logListener:" : "dkh 12/04/2014 09:56",
"logToObjectLog" : "dkh 12/03/2014 12:23",
"logToTranscript" : "dkh 12/03/2014 12:16",
"startBasicServerOn:" : "dkh 12/10/2014 14:49",
"startServerOn:" : "dkh 12/10/2014 14:41" } }
"startBasicServerOn:" : "dkh 12/10/2014 14:49" } }

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
breakpoint handling
handleBreakpointException: exception resumeIfResumable: resumeIfResumable
"Handle breakpoint or halt, snap off continuation, then resume"

self createContinuation: exception description.
(resumeIfResumable and: [ exception isResumable ])
ifTrue: [ exception resume ]
ifFalse: [
Transcript
cr;
show: 'Passing ' , exception class name.
exception pass ]
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
"enableContinuations:" : "dkh 12/03/2014 12:13",
"error:" : "dkh 11/30/2014 19:35",
"error:message:" : "dkh 11/30/2014 19:35",
"handleBreakpointException:" : "dkh 12/06/2014 15:06" } }
"handleBreakpointException:resumeIfResumable:" : "dkh 12/11/2014 06:54" } }
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(name 'Zinc-GemStone-Server-Tools-dkh.24' message 'Issue #58: remove currentServer iv ... replaced by inherited serverInstance iv' id '6d1263da-2431-451b-a92b-a257655c4906' date '12/10/2014' time '16:05:27' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.23' message 'push up some behavior/state to GemServer as I contemplate implementation of SeasideGemServer family' id '78bb3fd7-ea3b-4b64-a757-c303de1c56f0' date '12/10/2014' time '15:20:15' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.22' message 'Issue #58: use GemServer>>activeProcessIsNative instead of direct calls to GsProcess since GsProcess calls are 3.x specific' id '958f81d5-d3bc-429c-a2ba-7b9f462ed6af' date '12/09/2014' time '17:17:14' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.21' message 'Issue #58: make SocketStream and friends continuation friendly by wrapping GsSocket references in a TransientStackValue. Add ZnTransactionSafeManagingMultiThreadedServer a subclass of ZnManagingMultiThreadedServer where all references to GsSockets are wrapped by a TransientStackValue ... including places where GsSockets are passed as arguments ... this makes the server instance transaction safe, so continuations can be snapped off and transactions can be safely used in delegates ...' id '05823530-aa2c-4e34-90e9-fd0ebbe6215a' date '12/09/2014' time '11:21:22' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.20' message 'Issue #58: fine tune logging' id '3577aab1-db3d-4ab8-993d-04e58dd0ba47' date '12/08/2014' time '15:01:16' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.19' message 'Issue #58: fiddle with logging ... remote breakpoints back on table' id 'd5813371-9583-4269-af84-0dba231131c1' date '12/07/2014' time '18:45:27' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.18' message 'Issue #58: remove some logging' id 'fbb9609a-ca2d-410a-88c3-c452d6690d81' date '12/06/2014' time '15:06:43' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.17' message 'Issue #58: flesh out remote breakpoint work ... cannot switch back to native threads, but for development of servers, it can still be useful ... continue following this thread ...' id '128442d3-dfdb-4e9a-b1cc-d87d146b1a72' date '12/06/2014' time '15:02:55' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.16' message 'Issue #58: make ZnGemServer>>breakpointExceptionSet controllable now ... default is Halt and Breakpoint' id '78777ed1-d6a3-46c7-b7e9-40a1b05b16b6' date '12/05/2014' time '15:05:30' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.15' message 'Issue #58: GemServer class>>handleBreakpointException: moved to ZnGemServerLogSupport, so breakpoing exceptions can be under enableContinuations control .... and breakpointExceptionSet controlled vi ZnGemServer ' id '4b04024b-c0ee-4f7a-8fb3-ad7f25d30e42' date '12/05/2014' time '15:02:48' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.14' message 'Issue #58: tweak ZnGemServer a bit' id '3bdb5967-20df-46a7-81ed-8afd9c04f39b' date '12/04/2014' time '11:19:35' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.13' message 'Issue #58: add ZnLogSupport>>object: ... for dropping an object into the object log...refactor REST tests to allow for testing using remote ZnGemServer and add persistence to ZnExampleStorageRestServerDelegate ... a bit of house cleaning in ZnGemServer' id '9ed1bb9e-f405-4b3b-ae1c-8016c091c850' date '12/04/2014' time '06:38:40' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.12' message 'Issue #58: ZnSingleThreadedServer>>logServerError: to unconditionally log an error: and handleError: for GemStone so we make sure that all errors make it to the log (object log and continuation) AND the gem file .... add gobs of log helper methods to ZnGemServer ... control logging method and filter and whether or not continuations are created for errors from ZnGemServer' id '97e8bdaf-9586-463a-b1a1-f0a091d0b673' date '12/03/2014' time '14:38:57' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.11' message 'switch to ZnTranscriptLogger for debugging' id '808ce940-affd-44b0-b75c-4b7544f80ffa' date '12/03/2014' time '09:59:57' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.10' message 'Issue #58: add transactions to web socket delegate and some logging to understand the odd 30 second delay for the chat delegate' id 'ef0c148c-84ee-4ca0-b783-42f73ef5471e' date '12/02/2014' time '20:37:02' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.9' message 'Issue #58: args to on:do: blocks required in GemStone' id 'f9c11040-764e-4fe5-b17d-3e20aec70d4f' date '12/02/2014' time '15:55:10' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.8' message 'Issue #58: now the 3.x tests should pass' id 'a806216a-1845-4a8a-8d24-f235261cc639' date '11/30/2014' time '21:30:22' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.7' message 'Issue #58: a bit of cleanup to get the 3.x tests to pass(?)' id '479abb60-a604-4381-8746-8285d5265aa9' date '11/30/2014' time '21:19:18' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.6' message 'Issue #58: ZnWebSocketTests>>testEcho test passing ... in debugMode, use ZnObjectLogLogger ... practical to debug ZnGemServer using object log logging and continuations' id '2737e4b6-3600-49ac-ba57-ec8731159dab' date '11/30/2014' time '20:18:41' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.5' message 'Issue #58: tweak recent changes ... and get back to getting tests to pass' id '43bffba2-7b67-49f9-b52c-721b80ee1b66' date '11/30/2014' time '11:54:09' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.4' message 'Issue #58: a log can be specified for an instance of ZnGemServer. By default errors are logged to transcript and continuation commmited to object log.... ' id 'd017e51c-6b6a-404d-b07b-98b00853a012' date '11/30/2014' time '11:19:13' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.3' message 'Issue #58:- always snap off continuation when an error event occurs- add some error handling a bit higher up the zn stack ... to catch application errors as well ... might be able to continue processing without passing error ... still passing at the moment... - ZnTranscriptLogger for all ZnGemServer guys ... might want to make this easier to customize' id 'c402419d-3976-4a02-ba31-be2670595768' date '11/30/2014' time '10:39:47' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.2' message 'Issue #58: start using ZnGemServer based on work done for https://github.com/GsDevKit/gsApplicationTools/issues/2' id 'ac143ad6-d3f3-4abc-a318-dd2f3d0e8e64' date '11/29/2014' time '19:58:22' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.1' message 'Issue #58: add dependency upon GsApplicationTools for Zinc-GemStone-Server-Tools, a new package which holds ZnServerStarter class needed by web socket tests ...' id '437b6f76-4bb6-4ea7-83b0-b5f93128158a' date '11/26/2014' time '13:39:44' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
(name 'Zinc-GemStone-Server-Tools-dkh.25' message 'Issue #58: some tweaks to implementation as I flesh out ZnSeasideGemServer for seaside ... fine tune logging and honor debugMode in terms of passing exceptions when set ....' id 'dfae1b4e-201d-4761-9593-1022db6fee59' date '12/11/2014' time '06:58:11' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.24' message 'Issue #58: remove currentServer iv ... replaced by inherited serverInstance iv' id '6d1263da-2431-451b-a92b-a257655c4906' date '12/10/2014' time '16:05:27' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.23' message 'push up some behavior/state to GemServer as I contemplate implementation of SeasideGemServer family' id '78bb3fd7-ea3b-4b64-a757-c303de1c56f0' date '12/10/2014' time '15:20:15' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.22' message 'Issue #58: use GemServer>>activeProcessIsNative instead of direct calls to GsProcess since GsProcess calls are 3.x specific' id '958f81d5-d3bc-429c-a2ba-7b9f462ed6af' date '12/09/2014' time '17:17:14' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.21' message 'Issue #58: make SocketStream and friends continuation friendly by wrapping GsSocket references in a TransientStackValue. Add ZnTransactionSafeManagingMultiThreadedServer a subclass of ZnManagingMultiThreadedServer where all references to GsSockets are wrapped by a TransientStackValue ... including places where GsSockets are passed as arguments ... this makes the server instance transaction safe, so continuations can be snapped off and transactions can be safely used in delegates ...' id '05823530-aa2c-4e34-90e9-fd0ebbe6215a' date '12/09/2014' time '11:21:22' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.20' message 'Issue #58: fine tune logging' id '3577aab1-db3d-4ab8-993d-04e58dd0ba47' date '12/08/2014' time '15:01:16' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.19' message 'Issue #58: fiddle with logging ... remote breakpoints back on table' id 'd5813371-9583-4269-af84-0dba231131c1' date '12/07/2014' time '18:45:27' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.18' message 'Issue #58: remove some logging' id 'fbb9609a-ca2d-410a-88c3-c452d6690d81' date '12/06/2014' time '15:06:43' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.17' message 'Issue #58: flesh out remote breakpoint work ... cannot switch back to native threads, but for development of servers, it can still be useful ... continue following this thread ...' id '128442d3-dfdb-4e9a-b1cc-d87d146b1a72' date '12/06/2014' time '15:02:55' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.16' message 'Issue #58: make ZnGemServer>>breakpointExceptionSet controllable now ... default is Halt and Breakpoint' id '78777ed1-d6a3-46c7-b7e9-40a1b05b16b6' date '12/05/2014' time '15:05:30' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.15' message 'Issue #58: GemServer class>>handleBreakpointException: moved to ZnGemServerLogSupport, so breakpoing exceptions can be under enableContinuations control .... and breakpointExceptionSet controlled vi ZnGemServer ' id '4b04024b-c0ee-4f7a-8fb3-ad7f25d30e42' date '12/05/2014' time '15:02:48' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.14' message 'Issue #58: tweak ZnGemServer a bit' id '3bdb5967-20df-46a7-81ed-8afd9c04f39b' date '12/04/2014' time '11:19:35' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.13' message 'Issue #58: add ZnLogSupport>>object: ... for dropping an object into the object log...refactor REST tests to allow for testing using remote ZnGemServer and add persistence to ZnExampleStorageRestServerDelegate ... a bit of house cleaning in ZnGemServer' id '9ed1bb9e-f405-4b3b-ae1c-8016c091c850' date '12/04/2014' time '06:38:40' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.12' message 'Issue #58: ZnSingleThreadedServer>>logServerError: to unconditionally log an error: and handleError: for GemStone so we make sure that all errors make it to the log (object log and continuation) AND the gem file .... add gobs of log helper methods to ZnGemServer ... control logging method and filter and whether or not continuations are created for errors from ZnGemServer' id '97e8bdaf-9586-463a-b1a1-f0a091d0b673' date '12/03/2014' time '14:38:57' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.11' message 'switch to ZnTranscriptLogger for debugging' id '808ce940-affd-44b0-b75c-4b7544f80ffa' date '12/03/2014' time '09:59:57' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.10' message 'Issue #58: add transactions to web socket delegate and some logging to understand the odd 30 second delay for the chat delegate' id 'ef0c148c-84ee-4ca0-b783-42f73ef5471e' date '12/02/2014' time '20:37:02' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.9' message 'Issue #58: args to on:do: blocks required in GemStone' id 'f9c11040-764e-4fe5-b17d-3e20aec70d4f' date '12/02/2014' time '15:55:10' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.8' message 'Issue #58: now the 3.x tests should pass' id 'a806216a-1845-4a8a-8d24-f235261cc639' date '11/30/2014' time '21:30:22' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.7' message 'Issue #58: a bit of cleanup to get the 3.x tests to pass(?)' id '479abb60-a604-4381-8746-8285d5265aa9' date '11/30/2014' time '21:19:18' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.6' message 'Issue #58: ZnWebSocketTests>>testEcho test passing ... in debugMode, use ZnObjectLogLogger ... practical to debug ZnGemServer using object log logging and continuations' id '2737e4b6-3600-49ac-ba57-ec8731159dab' date '11/30/2014' time '20:18:41' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.5' message 'Issue #58: tweak recent changes ... and get back to getting tests to pass' id '43bffba2-7b67-49f9-b52c-721b80ee1b66' date '11/30/2014' time '11:54:09' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.4' message 'Issue #58: a log can be specified for an instance of ZnGemServer. By default errors are logged to transcript and continuation commmited to object log.... ' id 'd017e51c-6b6a-404d-b07b-98b00853a012' date '11/30/2014' time '11:19:13' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.3' message 'Issue #58:- always snap off continuation when an error event occurs- add some error handling a bit higher up the zn stack ... to catch application errors as well ... might be able to continue processing without passing error ... still passing at the moment... - ZnTranscriptLogger for all ZnGemServer guys ... might want to make this easier to customize' id 'c402419d-3976-4a02-ba31-be2670595768' date '11/30/2014' time '10:39:47' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.2' message 'Issue #58: start using ZnGemServer based on work done for https://github.com/GsDevKit/gsApplicationTools/issues/2' id 'ac143ad6-d3f3-4abc-a318-dd2f3d0e8e64' date '11/29/2014' time '19:58:22' author 'dkh' ancestors ((name 'Zinc-GemStone-Server-Tools-dkh.1' message 'Issue #58: add dependency upon GsApplicationTools for Zinc-GemStone-Server-Tools, a new package which holds ZnServerStarter class needed by web socket tests ...' id '437b6f76-4bb6-4ea7-83b0-b5f93128158a' date '11/26/2014' time '13:39:44' author 'dkh' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ printHMSOn: aStream
nextPut: $:;
nextPutAll: (self minute asString padded: #left to: 2 with: $0);
nextPut: $:;
nextPutAll: (self second asString padded: #left to: 2 with: $0).
nextPutAll: (self second asString padded: #left to: 2 with: $0).
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ printYMDOn: aStream
"Print just YYYY-MM-DD part.
If the year is negative, prints out '-YYYY-MM-DD'."

^self printYMDOn: aStream withLeadingSpace: false.
^self printYMDOn: aStream withLeadingSpace: false.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ printYMDOn: aStream withLeadingSpace: printLeadingSpaceToo
nextPut: $-;
nextPutAll: (month asString padded: #left to: 2 with: $0);
nextPut: $-;
nextPutAll: (day asString padded: #left to: 2 with: $0)
nextPutAll: (day asString padded: #left to: 2 with: $0)
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ updating
amount: newValue

"Modify the value of the instance variable 'amount'."
amount := newValue
amount := newValue
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
amount

"Return the value of the instance variable 'amount'."
^amount
^amount
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ updating
total: newValue

"Modify the value of the instance variable 'total'."
total := newValue
total := newValue
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
total

"Return the value of the instance variable 'total'."
^total
^total
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ print: positiveNumberString on: aStream prefix: prefix length: minimum padded: z
ifTrue: [aStream nextPutAll: prefix; nextPutAll: (String new: padLength withAll: $0)]
ifFalse: [aStream nextPutAll: (String new: padLength withAll: Character space); nextPutAll: prefix]]
ifFalse: [aStream nextPutAll: prefix].
aStream nextPutAll: positiveNumberString

aStream nextPutAll: positiveNumberString
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
printOn: aStream base: base length: minimum padded: zeroFlag
| prefix |
prefix := self negative ifTrue: ['-'] ifFalse: [String new].
self print: (self abs printStringBase: base) on: aStream prefix: prefix length: minimum padded: zeroFlag
self print: (self abs printStringBase: base) on: aStream prefix: prefix length: minimum padded: zeroFlag
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ updating
object: newValue

"Modify the value of the instance variable 'object'."
object := newValue
object := newValue
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
object

"Return the value of the instance variable 'object'."
^object
^object
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ asString36
candidate := num printStringBase: 36.
^((candidate beginsWith: '36r')
ifTrue: [candidate copyFrom: 4 to: candidate size]
ifFalse: [candidate]) asLowercase

ifFalse: [candidate]) asLowercase
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ isRequestAuthenticated: request
authorization := [ request basicAuthentication ] on: Error do: [:err | ^ false ].
username := authorization first.
password := authorization second.
^ (credentials at: username ifAbsent: [ nil ]) = password

^ (credentials at: username ifAbsent: [ nil ]) = password
Loading

0 comments on commit 3d7f41d

Please sign in to comment.