From: Chandrasekhar R. <cra...@ac...> - 2006-09-12 20:10:05
|
"Chinmay Pendharkar" schrieb: > Do take a look through the paper, and see if it would be useful to bring in > some of those features into javaOSC. I definately think so! In particular, the code to manage running the server in a seperate thread, support for the additional data-types, and the changes to the the parsing and dispatching (using a trie to store the address space), and the priority queue would all be great to incorporate. A few questions about JOE. First, is there a reason you are using 3 threads in the multithread version? I would have probably implemented it differently To me, it seems more intuitive to use 2 threads. I would have used a multiple-writer, single-reader FIFO for communication between other threads and the one the server runs in. The server thread would be responsible for sending data into the socket and reading data from the socket. It would also parse the messages and put them into a priority queue. It would the be responsibility of the user of the library, then, to get items out of the priority queue and have them dispatched. The user could then do the dispatching in whatever thread is appropriate instead of having the server spawn its own thread for dispatching. The other comment is that maybe the namespace storage model should be made pluggable. Using a trie is great for programs that use a multi-level namespace, but some programs would rather use a flat namespace (e.g., SuperCollider). In this case, a hash-based implementation would be better. > Also, please tell me how I should upload the source of this JOE, or > if I should send it over email. The best way would be if you could make your changes in the source tree itself and make any existing JUnit tests pass and write any new ones that are necessary. You should have Subversion access to the source tree already. Let me know if you have any difficulty checking out or modifying the source. - sekhar -- C. Ramakrishnan cra...@ac... Illposed Software http://www.illposed.com |