180 likes | 315 Views
JuxMem : a multi-protocol architecture. Sébastien Monnet GDS meeting. Low level layers JXTA & JuxMem core (java/C). JuxMem core (Mathieu Jan). JuxMem core ID getComID() Communications send(senderID, tag, message) addTagListener(tag, listener) Search localPublish(adv)
E N D
JuxMem : a multi-protocol architecture Sébastien Monnet GDS meeting GDS meeting - Rennes
Low level layersJXTA & JuxMem core (java/C) JuxMem core (Mathieu Jan) • JuxMem core • ID • getComID() • Communications • send(senderID, tag, message) • addTagListener(tag, listener) • Search • localPublish(adv) • remotePublish(adv) • localSearch(advTag, advValue, number, listener) • remoteSearch(advTag, advValue, number, listener) GDS meeting - Rennes
Fault-tolerance layerSelf-organizing group - provider side (java only) • API • send(message, level) • setMessageEventHandler(handler) • join(id) / leave(id) • setGMeventHandler(handler) • Goals • Perform replication • Manage group size • Deals with failures and new commers • Store group ids • Flat and hierarchical multicast Self-organizing group JuxMem core (Mathieu Jan) GDS meeting - Rennes
Fault-tolerance layerSelf-organizing group - client side (java/C) • API • send(message) • setMessageEventHandler(handler) • Goals • Data location • local and global search • data & com id(s) • Allocation • LDG (cache creation) Self-organizing group client stub JuxMem core (Mathieu Jan) GDS meeting - Rennes
Consistency interfaceCommunication layer - provider side (java only) • GDG level • sendLockAck(id, msg) • sendLockReadAck(id, msg) • sendUnlockAck(id, msg) • sendUpdateAck(id, msg) • sendReadAck(id, msg) • sendResetRequest(id, msg) • setHandler(gDGHandler) CP communications Self-organizing group JuxMem core (Mathieu Jan) GDS meeting - Rennes
LDG level setHandler(lDGHandler) Com with GDG sendLockRequest(msg) sendLockReadRequest(msg) sendUnlockRequest(msg) sendUnlockReadRequest(msg) sendReadRequest(msg) sendUpdateRequest(msg) sendResetAck(msg) Com with client sendLockAck(id, msg) sendLockReadAck(id, msg) sendUnlockAck(id, msg) sendUpdateAck(id, msg) sendReadAck(id, msg) sendRlxReadAck(id, msg) sendResetRequest(id, msg) Consistency interfaceCommunication layer - provider side (java only) GDS meeting - Rennes
Consistency interfaceCommunication layer - client side (java/C) • sendLockRequest(msg) • sendLockReadRequest(msg) • sendUnlockRequest(msg) • sendUnlockReadRequest(msg) • sendReadRequest(msg) • sendRlxReadRequest(msg) • sendUpdateRequest(Message msg) • sendResetAck(Message msg) • setHandler(clientHandler) CP communications Self-organizing group client stub JuxMem core (Mathieu Jan) GDS meeting - Rennes
Consistency protocol layer • LDG/GDG/Client • Communication layer counterpart (one receive per send) • Client only • Memory access • acquire() • acquireRead() • … Consistency protocol CP communications Self-organizing group JuxMem core (Mathieu Jan) GDS meeting - Rennes
JuxMem layers Client CP LDG CP GDG CP CP com - GDG CP com - LDG CP com - client Self-organizing group provider Self-organizing group client stub JuxMem core (Mathieu Jan) GDS meeting - Rennes
JuxMem’s generic objectsTo help the programmer • For consistency • ClientProtocolImpl • LDGProtocolImpl • GDGProtocolImpl • For group communication • SOGImpl • SOGClientStubImpl GDS meeting - Rennes
JuxMem’s selectorsChoosing the right implementation • For consistency • ProtocolSelectorImpl • For group communication • SOGSelectorImpl // all new protocols should be added there (and theyr identifier in ProtocolConfig interface) public void addProtocols() { addProcotol(ProtocolConfig.FLAT_EC_PROTOCOL, "juxmem.consistency.impl.protocols.flatec.EcProtocolInstanciation"); addProcotol(ProtocolConfig.EC_PROTOCOL, "juxmem.consistency.impl.protocols.ec.EcProtocolInstanciation"); addProcotol(ProtocolConfig.ECRR_PROTOCOL, "juxmem.consistency.impl.protocols.ecrr.EcRRProtocolInstanciation"); } GDS meeting - Rennes
Adding a new protocol • Write 3 classes extending the generic ones (client, ldg, gdg) • Write a class that instantiate the 3 others • Extends ProtocolInstantiation • Overload openClientProtocol • Overload openProviderProtocol • Add it in ProtocolSelectorImpl GDS meeting - Rennes
Using the new protocol • During allocation • Select the right protocol in the attrib field attrib.putValue(AllocSearchCriteria.NUMBER_OF_COPIES, Integer.toString(y)); attrib.putValue(SOGConfig.SOG_TYPE,Integer.toString(SOGN ames.BASIC_SOG)); attrib.putValue(ProtocolConfig.PROTOCOL, Integer.toString((ProtocolConfig.NEW_PROTOCOL))); …. memID = juxMemService.alloc(SIZE_ALLOC, attrib); GDS meeting - Rennes
Adding / using a new SOG • The same way • Extend SOGImpl • Extend SOGClientStubImpl • Add a line in SOGSelector • Choose the new SOG in attrib GDS meeting - Rennes
InstantiationClient side • Alloc • CP instantiation (according to attrib) • Search for providers • Send allocMsg to providers (wait for acks) • ClientCom instantiation • SOGClientStub instantiation (according to attrib) GDS meeting - Rennes
InstantiationProvider side • Upon allocMsg reception • CP instantiation • GDGCom & LDGCom instantiation • SOG instantiation • Send ack back to the client GDS meeting - Rennes
Conclusion • Adding a new CP/SOG is easy • Different pieces of data can use different SOG/CP • Currently available • SOG : noRepl, optimist, pessimist • CP : flatEC, EC, ECRR GDS meeting - Rennes