pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

pastebin private pastebin - collaborative debugging tool What's a private pastebin?

Posted by Frymaster on Thu 2nd Jul 10:22
download | new post

  1. (Use some sort of RPC between PHP and Java)
  3. On the PHP side:
  5. 1. PHP assembles XML request
  6. 2. PHP calls "execute this request" function on Java via RPC, gets transaction number back
  7. 3. repeat until all requests underway
  8. 4. PHP calls "get results of request" function using transaction number, either gets result or gets told to wait
  9. 5. repeat until all requests dealt with, possibly with a very small sleep at the end of each loop-through
  11. On the Java side:
  12. when "execute this function" called, it (in a thread-safe manner) increments a transaction counter, spawns a new thread to process, and returns the transaction counter
  14. When the procssing thread is complete, it (in a thread-safe manner) adds result to a collection of results, including a timestamp and the transaction number with it (possibly a dictionary or similar, with the transaction number as the key)
  16. When the "get result" function is called, it checks if the result is in the collection (may not need to be thread-safe).  If so, it returns the result and deletes (in a thread-safe manner) from the collection
  18. Either every time one or other of the functions is called, OR running on a seperate thread and sleeping for, say, a minute between loops, something checks the collection for very old timestamps (may not need to be thread-safe).  If it finds any, it (in a thread-safe manner) deletes them from the collectoin

Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Use syntax highlighting

To highlight particular lines, prefix each line with @@

Remember my settings