Commit Graph

41 Commits

Author SHA1 Message Date
wcrisman
d0360ad252 Merged as many changes as possible in WebServer from the master branch without including any that would likely cause problems. 2014-12-07 20:19:51 -08:00
wcrisman
3d08ad5810 Added a few more changes into the mix. Only changes left are in WebServer. 2014-12-07 18:38:04 -08:00
wcrisman
ae1de97e91 Fixed compile errors by transferring more of the changes to this new branch. Previous upload doesn't compile. 2014-12-07 18:34:03 -08:00
wcrisman
2adcfad863 Merged many of the changes from the first attempt at an HTML5 Websocket implementation. Focused on the ones that didn't change the behavior of the web server. 2014-12-07 16:12:29 -08:00
wcrisman
46df41d433 Added debug output showing the message header for a HTTP message that failed to be read. 2014-09-17 09:49:04 -07:00
wcrisman
b48e81bfe0 Added exception handling in the main loop for the web server to avoid the main loop thread getting killed off due to an unexpected/unhandled exception.
Moved code for JSON handling and metadata/metadata container into the Common project from the Foundation project.
2014-09-16 14:01:31 -07:00
wcrisman
1a8fd62dd8 Modified the web server to use a dedicated thread to handle socket management. It now will setup new sockets, and pass request and response handling for each socket needing it to a runnable run through the thread service. This may impact performance (not sure which direction) and will ensure that socket listening is never dropped in favor of message processing. 2014-08-30 17:28:58 -07:00
wcrisman
fa572dae03 Modified ThreadService & Scheduler to allow the web server to pass a delegate service such that all webapps will use one service for each function (reduction in threading and debug complexity). 2014-08-30 15:43:30 -07:00
wcrisman
fba1f9f9b3 Re-added the clearing of SocketContext's request reference since it was causing problems with future requests. 2014-07-30 23:39:57 -07:00
wcrisman
12d99f8b4d Removed dead code.
Change to WebServer's listener code to ensure that there is always a thread listening (we somehow ended up with no thread listening in some cases).
2014-07-30 23:21:05 -07:00
wcrisman
cd0976ea2e Ensured the NPE should never again happen by accessing the request from the response instead of from the socket context. 2014-07-27 22:13:01 -07:00
wcrisman
164841677b Fixed NPE due to request being cleared before it should be since we now don't send the response immediately back on the socket, but rather on another socket listener thread. 2014-07-27 22:10:16 -07:00
wcrisman
0b5e458dff Removed double lock requirement for pass through sockets. 2014-07-27 22:04:42 -07:00
wcrisman
b0ae8b7e72 Merge branch 'master' of http://192.168.2.29:8990/r/Brainstorm 2014-07-18 17:21:36 -07:00
wcrisman
1cb59ffa71 Added clear to the socket read buffer to ensure it is in a writeable state. 2014-07-18 17:21:12 -07:00
Wynne Crisman
f5aa28e604 Fixed socket flagging bug that threw exceptions when flagging to read/write to a socket that has closed. 2014-07-18 17:14:13 -07:00
wcrisman
7522497634 Reverted last change and removed new code completely (wasn't working - no reason to figure out why since it was now more complicated than the code it intended to clean up). 2014-07-18 14:50:21 -07:00
wcrisman
1147864416 Re-enabled the old code with the new fix for the SSL failure. 2014-07-18 14:30:59 -07:00
wcrisman
06b0525f6d Added check for key validity before changing interestOps to avoid pointless exception.
Modified message buffering code to not load the next message to be sent if we are waiting for more content from the current message (currently shouldn't happen).
2014-07-18 14:23:16 -07:00
wcrisman
2a6f2f959e Rolled back changes to WebServer because they were causing some issues with SSL. Should investigate why the issues are occurring since the newer code should be more correct.
Modified build.xml (ant) to clean before any rebuild all due to having some inconsistency issues in the build.
2014-07-18 12:50:29 -07:00
Wynne Crisman
b7a830e6ae Stopped tracking generated files; Ignored all webapp caches. 2014-07-17 14:50:19 -07:00
wcrisman
3cf6011121 Fixed bug in stopping the ThreadCreator when shutting down the ThreadService. 2014-07-17 14:28:08 -07:00
wcrisman
499a70091b A hail mary to fix the deadlocking of request/responses in https over the internet (slow connections). Not sure if this will work at all.
Tried to fix the null target exception (very strange since it should be possible) in the ThreadService.
2014-07-17 12:19:22 -07:00
wcrisman
c48c065265 Modified WebServer to clean up the threading of socket communications: Made all communications via a socket (in or out) and via a linked pair of sockets (in or out of either when forwarding requests and responses to a remote server) single threaded; Attempted to clean up the way the socket listener flags are set.
Cleaned up ignored resources in the Brainstorm WebServer project by removing them from the repository.
2014-07-17 12:15:07 -07:00
wcrisman
edf8748a3c Stopped tracking the webapp related files in the web server project. 2014-07-16 13:15:36 -07:00
wcrisman
645a8c0a4b Attempted a different fix to the streamed content code so that it is blocking (previous fix failed for an unknown reason, and the code was getting complex unnecessarily). 2014-07-13 13:46:29 -07:00
wcrisman
2fc70088c1 Fixed newly introduced bug where by a blocking channel deadlocks because all content was read, but we attempted to read more anyway. 2014-07-13 12:54:10 -07:00
wcrisman
11b75d567f Fixed bugs in web server's handling of streamed content (logic was incorrectly handling non-blocking IO in the stream - interpreting it as a stream closed). Modified StreamedContent to use blocking IO instead of non-blocking since it was wasting CPU cycles (non-blocking IO done properly would require removing the write flag from the client socket and listening to the StreamedContent for the availablity of content before re-flagging the socket for writing). Using non-blocking IO here really isn't that useful since the content source should be trusted and timely, and multiple threads service clients (a few threads blocking for a few milliseconds is no big deal), and implementing it properly would significantly increase code complexity. 2014-07-13 12:19:30 -07:00
wcrisman
837fdced57 Fixed bugs in web server that ignored when the web app sets a header that overrides anything that would normally be generated (for forwarded content). 2014-07-13 11:01:23 -07:00
wcrisman
c06e555510 Added warnings to Monitor regarding unlocking with a thread that did not perform the locking; Added extra debug output for this occurrence. 2014-07-12 21:33:45 -07:00
wcrisman
17e9c5a153 Removed fancy debug logging from web server to prevent logging causing logging due to logging Monitor lock/unlock calls. Need to replace this logging code with a non-framework queue to allow remote management of the web server and log transfer. 2014-07-12 15:49:35 -07:00
wcrisman
0081ad43b9 Fixed bugs introduced into Monitor when adding debug info and simplifying. 2014-07-11 17:13:25 -07:00
wcrisman
985228d213 More changes to Monitor to attempt to catch a bug. 2014-07-11 16:17:49 -07:00
wcrisman
b11dc14fb3 More changes to Monitor to attempt to catch a bug. 2014-07-11 15:51:51 -07:00
wcrisman
66487c3b25 Fixed bug in handling of sessions - some non-standard web apps (forwarding domains for example) in fact will have null sessions attached to their connections. Non-breaking change. 2014-07-11 15:39:28 -07:00
wcrisman
54b2f9b5ad Minor changes to Monitor to attempt to find a bug. 2014-07-11 15:29:08 -07:00
wcrisman
2b035e092c A second round of fixes to simplify the web application setup code and provide for a connection context accessible by the application when handling web requests. 2014-07-11 12:32:03 -07:00
wcrisman
07b8c2ff8d Fixed bugs from last commit. 2014-07-11 10:41:39 -07:00
wcrisman
d2027e13f9 Modified the web server to allow connection related data to be stored in the connection's context by the application. This modifies the contract (interfaces) between the framework and application code, requiring changes to the application (breaks backward compatibility). 2014-07-11 10:39:36 -07:00
wcrisman
bb9b1f550e Fixed TCP no delay in the PassThroughSocketContext.
Ignored the eclipse metadata.
2014-05-30 12:11:28 -07:00
wcrisman
b45e56b890 Initial commit from SVN. 2014-05-30 10:31:51 -07:00