eclipse-ee4j / eclipse-ee4j/tyrus

Tyrus should be able to broadcast over a farm using JMS of other similar technology

Open
#455 3 comments 0 reactions 0 assignees View on GitHub
Component: server Priority: Major Type: New Feature
Dominant language
Java
Stars
128
Forks
49
PR merge metrics
No merged PRs in 30d

Description

It would make a look simpler if Tyrus contains features natively to support using JMS queue or similar technology such as coherence to support sending messages to multiple nodes in the farm:

@ServiceEndpoint(...)
@TyrusCluster()
@TyrusJMSQueue(... something to configure a suitable queue ... )
public class MyClusteringEndpoint
{
}

This would probably only come into play if you make use of the new broadcast method on TyrusSession:

((TyrusSession)peer).broadcast(message)

The implication here is that is we were to allow filtering on the broadcast...

((TyrusSession)peer).broadcast(message, Session::isOpen)

.... this would probably require an interface that could be serialisable:

public interface SerializablePredicate
extends Predicate, Serializable {
}

You would have to be careful to not allow anonymous inner classes in this case as it would end up trying to serialise the entire outer object. I am not sure Lambda would be dealt with this incase, I guess you would have to make sure it doesn't capture too much of the containing state. I would get the ObjectOutput stream would fail in these cases.
#### Affected Versions
[1.3.1]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.