[jgroups-dev] TreeMesh progress and questions
Mike Jensen <[email protected]>
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
I know it has been a while since you have heard from me. But I been
continuing to work on everything. At the bottom I have a link to
download the code for you to examine.
I am in the process of creating a chat application that can run on top
of this. I have the basics of the chat application done, and it seems
to be working just fine on top of the TreeMesh. I still have other
things I want to do for it though:
* Implement meshGUI in the chat application, so that you can actually
see the connection structures that are being used for your chat session
* Implement an IRC bridge, just to show an example of how a highly
strong coherency application can work together with something like what
I have built
First a few notes about the implementation (so much I could write here,
I just outlined some bigger items):
* It does look like I have to keep track of what messages we have seen.
Because messages are routed to us via multiple paths, I need to keep a
list of longs which represent random msgID's and ignore those we have
already seen. I don't particularly like this because:
* We now have a list that can get large (but is bounded)
* We need to transmit another long with each message that could be a
broadcast msg
* Because we are transmitting a long vs a UUID, I am worried that we
could end up dropping msgs if the history is allowed to grow too large
(but is a configurable value)....is this worth the extra transmission
overhead?
Do you guys have any advice on possibly better ways to handle this?
* I have created a new MeshView which extends View. So far this seems
to work just fine as long as the application is aware that it could be
getting a MeshView instead of a View (assuming the application wants to
take advantage of the mesh structures). Although I can't seem to get
the unicast protocol to work with my tree protocol, and I suspect the
issue may be because of this. But I have spent almost no time to
diagnose the problem.
* I separated failure detection and merging based on the suggestions
from Bela. Although this is not heavily tested, I think the merge
algorithm that Bela suggested will work great, and seems very simple.
* Right now I have a few situations where nodes are timing out when they
should not be. I have not spent any time to diagnose why those
conditions might occur.
And now for the question!
My biggest issue is that I have extended UUID with a new class
"MeshIdentifier" that I want to function as the Address. The problem is
that despite this trying to mimic an Address as close as I can figure
out, I can't seem to get messages to actually route with this address.
Further more, I need to figure out how to get this Address to be
integrated deeper into JGroups so that when you call
JChannel.getLocalAddress() it returns this UUID form. The reason this
is important is because I want Addresses to be unique per instance, so
that if machines span multiple datacenters than we are able to uniquely
identify them even if they have the same IP/port. Another example of
such a situation would be running multiple instances of the process on
the same machine. Suggestions on how to better handle this? I invite
you to look at my implementation, but right now MeshIdentifier just
stores the real address + the super class UUID, and i just call
.getAddress() before I route any messages. This is less than ideal as
it means that I may or may not be sending the message to the node I
think I am.
I invite you to look at the code, you can download it here (including
any files that were modified within JGroups):
http://archive.jentfoo.com/coding_projects/treeMesh-V0.1.tar.gz
This code is EXTREMELY young and untested. You will notice lots and
lots of logging I have been using to debug this program. You will also
notice TODO statements in places where I know I am doing things in a
very inefficient way. Once all the bugs and kinks are worked out I plan
to go back through and cleanup the code, as well as improve performance
in a few places I just have not spent the time yet. For right now I
have been trying to focus on technical correctness. But with that said,
I am open to any suggestions you have, not just bug fixes, but code
structure, etc.
Once I feel the code is in a pretty solid state, and worth exposing more
I plan to do the following:
* Update my original design document with more details and more
specifics about the real implementation
* Distribute the code for others to examine, and with it distribute the
chat program I am making so that people can easily test it.
Let me know what your thoughts are, I have more questions but I can't
seem to think of them right now. If you want we can setup another
meeting and talk about this stuff while appsharing and on the phone. (I
know it is a lot to look at when just dumped on you). Let me know if
you prefer that format. Thanks for all the help, I look forward to
continuing this project!
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Javagroups-development mailing list