ruedigermoeller / fast-cast Goto Github PK
View Code? Open in Web Editor NEWhp low latency reliable multicast messaging
License: GNU Lesser General Public License v3.0
hp low latency reliable multicast messaging
License: GNU Lesser General Public License v3.0
I used this maven jar for test,and I found that in my Android Stuidio,FastCast can't get his singleton anymore,and the reason is that in FSTUtil,the package sun.misc.Unsafe can't be import.When I google for this,it seems that this class that can't manipulate memory may be duplicated by Oracle.So I wonder if there are something that can take place of it?Thanks for you reply.Best Wishes.
Hello,
Having question: say I do some number of "publisher.offer(..)" calls. After that, I just call "publisher.flush()". How much guarantee is that everything offered before "flush" call was really sent down to socket?
Just it seems it's not the case that after flush everything gets written down to channel now from my tests. Thanks in advance.
When trying to run the FastCast 3.0 example, I get the following error:
org.nustaq.fastcast.impl.DataPacket_Struct cannot be cast to org.nustaq.offheap.structs.structtypes.StructString
I am using fst-2.4-oneja.jar.
Any help?
Could you give a hint, how to achieve the lowest possible latency? Thank you.
Hi!
private DatagramChannel ceateSocket(boolean block, int port) throws IOException {
DatagramChannel channel = DatagramChannel.open(StandardProtocolFamily.INET)
.setOption(StandardSocketOptions.SO_REUSEADDR, true)
.setOption(StandardSocketOptions.IP_MULTICAST_IF, iface)
.setOption(StandardSocketOptions.SO_RCVBUF, conf.getSocketReceiveBufferSize())
.setOption(StandardSocketOptions.IP_TOS, conf.getTrafficClass())
.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, conf.isLoopBack())
.setOption(StandardSocketOptions.IP_MULTICAST_TTL, conf.getTtl())
.bind(new InetSocketAddress(port));
channel.configureBlocking(block);
return channel;
}
It seems there is not set for StandardSocketOptions.SO_SNDBFR. Is it kind of bug, or it is set somewhere else?
Hi there,
Why I can only use FastCast instance topic either for sending or receiving, but not both?
public void subscribe( SubscriberConf subsConf, FCSubscriber subscriber ) {
....
if ( topicEntry.getPublisherConf() != null ) {
throw new RuntimeException("already a sender registered at "+subsConf.getTopicId());
}
Why this condition here, how publisher intersects with subscriber after all? Appreciate for answer.
Hi guys.
I am facing a trouble which I suspect to be a bug anyway. My case is next: I am creating two FastCast instances in same process, then init them both (one by one) like this:
fastCast.onTransport(config.transportName()).subscribe(fastCast.getSubscriberConf(config.topicName()), new FCSubscriber() {
@Override
public void messageReceived(String sender, long sequence, Bytez b, long off, int len) {
// some fancy logic
}
@Override
public boolean dropped() {
return true;
}
@Override
public void senderTerminated(String senderNodeId) {
}
@Override
public void senderBootstrapped(String receivesFrom, long seqNo) {
}
});
// I want publisher to be pre-inited as earlier as possible
publisher = fastCast.onTransport(config.transportName()).publish(fastCast.getPublisherConf(config.topicName()));
And immediately after that I start to call offer(..) on one FC, and expect message to be delivered on another. But most of the time it's not the case, this message just got lost, despite that offer returned true!
The only case is to do some Thread.sleep(1000) between init and calling offer. So, to conclude:
Really appreciate for support, since I'd like to believe such great thing is usable as a durable instrument and my transactions will not become lost garbage in space :)
Disruptor is a high-performance IPC and buffering solution. Using Disruptor may yield an even higher performance and lower latency. https://lmax-exchange.github.io/disruptor/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.