[Peerfuse-dev] The Chimera DHT

Romain Bignon romain at peerfuse.org
Sat Aug 23 01:26:16 CEST 2008


Hello,

Sorry for the latency, but I was busy.

Vincent (Eld) became to work on the routing part of Chimera's code, and for me
I'm working on the ChimeraHost and HostGlobal classes rewritting to have
something thread-safe and beautiful.

There are two things I want to describe here.

I. The Network Layer
--------------------

The chimera's network layer is bad and uses UDP. For Peerfuse, we have to use
SSL/TCP connections. I think a good think is to keep the SSL classes, create
them outside of the DHT code, and give a pointer to ChimeraDHT.

After that, ChimeraHost (which is now renamed to Host) might contains the file
descriptor (int) of active connection (if any).

I think this isn't really a problem, but I want to have confirmation..

II. Messages delivry
--------------------

Other problem is in message delivry, and message encapsulation.

In chimera, you can associate a message ID (uint32_t) with a callback function.
There are system messages (CHIMERA_JOIN, CHIMERA_PING, etc) which are *NOT*
routed, and user defined messages which call the chimera_route callback to route
them to destination, and a callback defined by user will be called (same for all
user messages).

Firstly, I don't know if we have to encapsulate routed messages in a system
message "ROUTE" (for example), or if we define this messages as system messages,
and DHT knows that we have to route user messages.

Next, the messages serialization of Chimera is *bad*. I think we have to use the
Peerfuse's Packet and PacketArg classes to create and read messages.

Then, as Peerfuse is written in C++, I think it isn't a good think to use
function callbacks, but we can ask message handler to call a function of a
derivated class of MessageHandler (see src/message_handler.h).

So, here are my questions. I think I answered to several of them while writting
this email, but it is a good thing to ask your opinion.

Best regards,

-- 
Romain Bignon -- http://romain.peerfuse.org

http://peerfuse.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.peerfuse.org/pipermail/peerfuse-dev/attachments/20080823/abb4f9b7/attachment.pgp 


More information about the Peerfuse-dev mailing list