Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
joas_coder
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
joas_coder
2y ago
It is clear to me now that poll only removes if there is something to remove A much better name would have been FETCH and not POLL We'll be changing everything from poll to fetch in the next version => availableToFetch() and fetch()
32.
▲
by
joas_coder
2y ago
Oh, I see now. I thought he was talking about a computer language but he was actually talking about the English language. My bad. So are you saying that POLL was a bad choice of name because polling means "check if there is something a
33.
▲
by
joas_coder
2y ago
Not a language difference, but a design difference. By calling availableToPoll before polling you can poll a batch of messages without blocking or locking on each message. This design decision allows the ring to perform batching naturally.
34.
▲
by
joas_coder
2y ago
CoralRing does not produce garbage, but it cannot control what other parts of your application choose to do. It will hand to your application a message without producing any garbage, now if you go ahead and produce garbage yourself then the
35.
▲
by
joas_coder
2y ago
Totally agree! My understanding because of the use of the word "masochist" was that it was possible but difficult. Not that one language was better/worse than the other, in terms of performance.
36.
▲
by
joas_coder
2y ago
Well said and I couldn't agree more. There are top market makers and banks using Java for a fact. And other C++ firms as well. Some of them are considering or have considered the move to Java. Some have already done this move. Some wil
37.
▲
by
joas_coder
2y ago
LOL you have a point. But this is subjective. Someone could argue that a highly complex C++ system is masochism. The reality is: a lot of successful market makers, prop trading firms, banks, etc. use Java for ultra-low-latency financial sys
38.
▲
by
joas_coder
2y ago
CoralRing and CoralQueue (available on GitHub) are completely garbage-free. You can send billions of messages without ever creating garbage for the GC, so no GC overhead. This is paramount for real-time ultra-low-latency systems developed i
39.
▲
by
joas_coder
2y ago
> Given the documentation says that this is supposedly to be between JVMs, how do they handle the serialize/deserialize? Your transfer object needs to implement MemorySerializable. Below two examples from CoralRing's GitHub: h
40.
▲
by
joas_coder
2y ago
I think you can take a look at the DiamondQueue, which is a Demultiplexer and a Multiplexer combined so that thread A dispatches a bunch of tasks to a fixed set of worker threads (W1, W2, W3, etc.) and then these worker threads use a Multip
41.
▲
by
joas_coder
2y ago
> It looks like these are more lower level libraries so clients are supposed to block, but they are responsible for doing the blocking themselves. You busy spin when blocking (fastest) or you can use a WaitStrategy from https:/
42.
▲
by
joas_coder
2y ago
availableToPoll() is the method that blocks, because it can return 0 on an empty ring. When that happens you have to block, by for example busy spinning around availableToPoll() until it returns something to poll. You are never supposed to