[JBoss JIRA] (JGRP-815) Scatter/Gather to avoid copying
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-815?page=com.atlassian.jira.plugin.s... ]
Bela Ban updated JGRP-815:
--------------------------
Fix Version/s: 4.1
(was: 4.0)
> Scatter/Gather to avoid copying
> -------------------------------
>
> Key: JGRP-815
> URL: https://issues.jboss.org/browse/JGRP-815
> Project: JGroups
> Issue Type: Sub-task
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.1
>
> Attachments: bla10.java, bla9.java
>
>
> When we invoke Channel.send(), we pass a bufffer to JGroups. At the transport level, JGroups marshals the sender and destination address, plus all headers and the buffer into a new byte[] buffer, which is then passed to the socket (DatagramSocket, MulticastSocket, Socket).
> We cannot do gathering writes on a DatagramSocket because DatagramSocket doesn't expose this functionality, contrary to a DatagramChannel.
> We could avoid having to copy the user's buffer by using gathering writes: effectively passing to the socket NIO ByteBuffers containing:
> 1: Src and dest address plus flags, plus possibly size
> 2: The marshalled headers
> 3: The buffer passed to JGroups by the user
> We can obtain a gathering-write channel as follows:
> ByteBuffer[] buffers; // contains the 3 byte buffers above
> DatagramSocket sock;
> DatagramChannel ch=sock.getChannel();
> ch.write(buffers, 0, length); // length is the number of bytes of the total marshalled message
> This is supported by a GatheringByteChannel.
> I don't think there's currently a need to do scattered reads, but this needs to get investigated more. Also investigate whether MulticastSockets support gathering writes (whether they expose the correct DatagramChannel).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months
[JBoss JIRA] (JGRP-809) Copyless stack
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-809?page=com.atlassian.jira.plugin.s... ]
Bela Ban updated JGRP-809:
--------------------------
Fix Version/s: 4.1
(was: 4.0)
> Copyless stack
> --------------
>
> Key: JGRP-809
> URL: https://issues.jboss.org/browse/JGRP-809
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.1
>
> Attachments: Buf.java, BufAllocator.java, Message.java
>
>
> Currently (as of 2.7), the transport reads the contents of a received packet into a buffer, then passes a *copy* of the buffer to a thread from the OOB or incoming thread pools. To prevent this copy, we can
> - have the receiver read only the version and OOB flag (to see which thread pool to dispatch the packet to)
> - pass a ref to the socket to a thread from the incoming of OOB pool, have that thread read the packet and return
> - each thread in the pool has its own buffer into which the buffer is read from the socket
> Possibly use NIO: we can install a selector and get woken up whenever data to be read is present. At that point, we can pass the ref to the socket to the handler thread and return immediately. NIO with channels for multicast sockets is available only in JDK 7 (or 8?), so this is a bit off... However, we can already implement this with reading the version and flags bytes and then passing the socket to the handler
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months
[JBoss JIRA] (JGRP-1821) SEQUENCER2: new impl of total order protocol
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1821?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1821:
---------------------------
Fix Version/s: 4.1
(was: 3.5)
> SEQUENCER2: new impl of total order protocol
> --------------------------------------------
>
> Key: JGRP-1821
> URL: https://issues.jboss.org/browse/JGRP-1821
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.1
>
>
> When in {{SEQUENCER}} a member P wants to send a multicast message M, it unicasts it to the coordinator, who multicasts it on behalf of P.
> The new impl {{SEQUENCER2}} is different:
> * P asks the coord for a seqno
> * The coord responds with a (monotonically increasing) seqno
> * P multicasts M with that seqno
> * Everyone uses one global {{Table}} to deliver messages and weed out duplicates
> Advantages:
> # A sender sends messages itself, so the sequencer doesn't need to do sending (and potential retransmissions)
> # Compared to {{SEQUENCER}}, the data is only sent and marshalled once (better for large messages)
> # A sender grabs entire ranges of seqnos, so this should be efficient
> The edge case handling though requires some work, e.g.
> * A member B crashes after having received a seqno (e.g. 4)
> ** The sequencer will give out 5 next, but since nobody received 4, all subsequent messages will get stuck, waiting for 4
> * The sequencer (coord) dies or leaves
> ** The next-in-line probably needs to run some reconciliation protocol, asking all members for their highest received seqnos
> ** Messages like 4 would get marked as dummy, removed from table and dropped
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months
[JBoss JIRA] (JGRP-1680) RDMA based transport
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1680?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1680:
---------------------------
Fix Version/s: 4.1
(was: 4.0)
> RDMA based transport
> --------------------
>
> Key: JGRP-1680
> URL: https://issues.jboss.org/browse/JGRP-1680
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.1
>
>
> Investigate whether an RDMA based transport makes sense.
> Advantages:
> * Speed, low latency (TCP/IP is bypassed entirely)
> * Low CPU usage
> Disadvantages:
> * JNI/C code
> ** Such a transport implementation would have to live outside of the JGroups repo
> ** Maintainability nightmare: the C code would also have to be ported to various OSes
> *** Investigate Java based libs (IBM's jVerbs) and C based libs (Apache Portable Runtime?)
> * High memory use, growing with cluster size: similarly to TCP, a 'group multicast' would involve N-1 sends. RDMA requires a Queue Pair (QP) for each destination. Each QP requires pinned memory (receive and send buffer), so each node would have to reserve (pin) N-1 memory buffers [1]
> ** OTOH, we may not use many group multicasts, e.g. with Infinispan's partial replication (DIST mode)
> * High cost of RDMA adapters, NICs and wiring: only a very small fraction of users would run such a transport.
> [1] http://www.hpcwire.com/hpcwire/2006-08-18/a_critique_of_rdma-1.html
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months
[JBoss JIRA] (JGRP-1424) TP: use of multiple transports
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1424?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1424:
---------------------------
Fix Version/s: 4.1
(was: 4.0)
> TP: use of multiple transports
> ------------------------------
>
> Key: JGRP-1424
> URL: https://issues.jboss.org/browse/JGRP-1424
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.1
>
>
> Refactor TP so that the socket sending and receiving is done in a separate class (UDP, TCP, TCP_NIO). Once this is done, add the ability to attach multiple transports to TP, e.g. UDP and TCP.
> The UDP transport could then be used for cluster wide messages (null destination) and the TCP transport could be used for unicast messages (non-null destination).
> Or this could be overridden by a message flag on a per-message basis !
> We could even attach multiple transports of the same type, e.g. one per physical network (10.x.x.x and 192.168.x.x), and do round-robin sending over them.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months
[JBoss JIRA] (JGRP-1672) Shared memory to send message between different processes on the same box
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1672?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1672:
---------------------------
Fix Version/s: 4.1
(was: 4.0)
> Shared memory to send message between different processes on the same box
> -------------------------------------------------------------------------
>
> Key: JGRP-1672
> URL: https://issues.jboss.org/browse/JGRP-1672
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 4.1
>
> Attachments: ShmTest.java
>
>
> Investigate whether it makes sense to use shared memory to pass messages between processes on the same box. Say if we have A, B and C on box-1 and X, Y, Z on box-2, when A multicasts a message, it could loop it back to itself, place it into shared memory for B and C to read and multicast it to X, Y, Z. The multicast socket could be non-loopback, so box-1 would not receive it.
> Problems:
> * Shared memory in Java can only be done via memory mapped (sequential or random access) files. To pass a lot of messages, something like a ring buffer would have to be created in shared memory
> * Unless we use FileLock, or polling/busy reading, there is no way to know when a producer has written a message into shared memory. We'd therefore have to use a signalling mechanism, probably a small JGroups message, to notify the consumer(s) of new messages.
> ** Alternatively, we could do busy waiting: the producer writes into a memory location when a message is ready to be consumed. Perhaps this memory location can be the number of messages ready to be read. The consumer could busy-wait, and decrement the number of messages read. This variable could be protected by a file lock, so after some amount of busy-waiting, the consumer could go back and do a real wait on the file lock, instead of burning CPU doing busy-waits.
> * For multicast messages, we'd have 1 producer but many consumers. A RingBuffer would not work here, as we don't know when all consumers have read a given message, ie. when to advance the read pointer
> ** As an alternative, we could have one shared memory buffer per member on the same host. This would also cater to unicast messages. However, then we'd use up a lot of memory.
> * How would this work for TCP ? We'd have to send the message to only members which are outside the local box. How do we identify those members ?
> * Message reception: a multicast message received and targetted to all members on the same box could also be placed into shared memory, so everyone on the same box receives it
> ** How would this work for TCP ? E.g. A sending a multicast message M would use shared memory to deliver M to B and C on box-1, but if it sends it to X, Y and Z, then that's unneeded work, as it could send it only to X, which could place it into shared memory for Y and Z to consume M.
> *** We'd have to include the knowledge of 'affinity' into an address
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months
[JBoss JIRA] (DROOLS-465) Cannot find KieModule with LATEST
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-465?page=com.atlassian.jira.plugin... ]
Mario Fusco commented on DROOLS-465:
------------------------------------
What suggested by the reporter of this issue (avoiding to add the local repository among the remote ones) actually prevents the maven-metadata.xml file to be removed and fixes this issue. Unfortunately this solution breaks the retrieval of newly deployed SNAPSHOTs while the KieScanner is running.
I'm trying to figure out why and how to fix this problem without breaking SNAPSHOTs resolution.
> Cannot find KieModule with LATEST
> ---------------------------------
>
> Key: DROOLS-465
> URL: https://issues.jboss.org/browse/DROOLS-465
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Beta1
> Reporter: Takami Hirata
> Assignee: Mario Fusco
> Attachments: reproducer.zip
>
>
> I install a kmodule into local repository with command {{mvn clean install}}.
> Loading this kmodule with 'LATEST' works on the day, but will fail on next day.
> Maven will find update on next day because of default updatePolicy 'daily', then maven check local repository ({{org.kie.scanner.Aether}} treats as a remote repository) but local artifact cache does not have 'maven-metadata.xml' which remote artifact should have, so finding update fails and {{org.sonatype.aether.connector.file.FileRepositoryWorker}} removes {{maven-metadata-local.xml}} for cleanup.
> {{org.kie.scanner.Aether}} adds local repository to remote repositories, but this may be incorrect usage.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 8 months