Thread: RSPS Networking Library Choices

Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Quote Originally Posted by Fire Cape View Post
    That benchmark is bs and the company looks sus. Let me tell you why that benchmark is bad. The code comparison given doesn't even use Netty's ByteBuf but java.nio.ByteBuffer, that alone should tell you this is at best a bad comparison by someone who doesn't understand the library and at worse deliberately misleading.
    Notably it's missing a release() call at the end of the channelRead() method in the server-side implementation (it isn't done automatically as they aren't using SimpleChannelInboundHandler), so it'll be needlessly allocating new inbound buffers and relying on the GC (rather than reference counting) to clean them up. Relying on the GC for Netty's pooled buffers works badly as it uses off-heap memory (if it can), so the GC isn't aware of the memory pressure and probably won't free them quickly enough.

    (Interestingly they did remember the release() call in the client though.)


    See my post below, I missed something.
    .
    Reply With Quote  
     

  2. Thankful users:


  3. #22  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,263
    Thanks given
    405
    Thanks received
    436
    Rep Power
    1674
    Quote Originally Posted by Fire Cape View Post
    That benchmark is bs and the company looks sus. Let me tell you why that benchmark is bad. The code comparison given doesn't even use Netty's ByteBuf but java.nio.ByteBuffer, that alone should tell you this is at best a bad comparison by someone who doesn't understand the library and at worse deliberately misleading.
    Quote Originally Posted by Graham View Post
    Notably it's missing a release() call at the end of the channelRead() method in the server-side implementation (it isn't done automatically as they aren't using SimpleChannelInboundHandler), so it'll be needlessly allocating new inbound buffers and relying on the GC (rather than reference counting) to clean them up. Relying on the GC for Netty's pooled buffers works badly as it uses off-heap memory (if it can), so the GC isn't aware of the memory pressure and probably won't free them quickly enough.

    (Interestingly they did remember the release() call in the client though.)
    Ooooo I didn't notice that at all. I'll ask the owner about that and see what he says. Sounds shady/misleading to me.
    Reply With Quote  
     

  4. #23  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Quote Originally Posted by Gluon View Post
    Ooooo I didn't notice that at all. I'll ask the owner about that and see what he says. Sounds shady/misleading to me.
    Actually I've just realised it's fine, because it writes the input buffer back out to the channel, so there's no need to reduce its reference count (as ctx.write() will do it once the packet has been sent).

    though fwiw, I still think the benchmark is also not particularly realistic - e.g. it is using TCP but doesn't actually implement framing properly. This is not something you can assume in a real-world environment, as TCP is a stream-oriented protocol and the OS can and will split a write() into several TCP packets, or split a read() up on the other end.

    I still don't doubt CoralReactor is faster though - I presume the guy is re-using the same NIO buffer for all reads/writes to achieve that. If you really want performance you can do this, but it probably does mean your end user code will be more awkward to write on top of the library, so there are trade-offs involved.
    .
    Reply With Quote  
     

  5. Thankful users:


  6. #24  
    Registered Member
    Brainpower's Avatar
    Join Date
    Jan 2019
    Posts
    130
    Thanks given
    13
    Thanks received
    13
    Rep Power
    101
    Is there even anyone here that ever got to use the Coral Reactor library?
    I didn't manage to get ahold of a trial version at first but I really wanted to try.
    Because it didn't work the first time around I applied with an IT company email
    to see if they would get back to me and still they never did...
    Reply With Quote  
     

  7. #25  
    Community Veteran


    Join Date
    Dec 2008
    Posts
    4,263
    Thanks given
    405
    Thanks received
    436
    Rep Power
    1674
    Quote Originally Posted by Brainpower View Post
    Is there even anyone here that ever got to use the Coral Reactor library?
    I didn't manage to get ahold of a trial version at first but I really wanted to try.
    Because it didn't work the first time around I applied with an IT company email
    to see if they would get back to me and still they never did...
    Their target demographic is the financial industry (banks/trading/hedge funds etc). Doubt they'd respond to anyone unless they're willing to pay 6+ figures in licensing for it.

    They write very nice software and a price tag to match.

    I've also played around with https://github.com/OpenHFT/Chronicle-Network (similar use cases in high frequency trading etc) and from my experience was faster than Netty as well. Although the API is no where near as easy as Reactors or Nettys.

    They also have a nice suite of libraries if you haven't already checked them out. They hide some features behind pay walls for pro licensing, but I haven't found myself needing anything their free open source version didn't already offer.
    Reply With Quote  
     

  8. #26  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,819
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by Gluon View Post
    Their target demographic is the financial industry (banks/trading/hedge funds etc). Doubt they'd respond to anyone unless they're willing to pay 6+ figures in licensing for it.

    They write very nice software and a price tag to match.

    I've also played around with https://github.com/OpenHFT/Chronicle-Network (similar use cases in high frequency trading etc) and from my experience was faster than Netty as well. Although the API is no where near as easy as Reactors or Nettys.

    They also have a nice suite of libraries if you haven't already checked them out. They hide some features behind pay walls for pro licensing, but I haven't found myself needing anything their free open source version didn't already offer.
    I will contact them.
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  9. #27  
    Registered Member
    Mister Maggot's Avatar
    Join Date
    Dec 2008
    Posts
    7,227
    Thanks given
    3,283
    Thanks received
    2,875
    Rep Power
    5000
    At the end of the day, in the context of the specific application of a RuneScape server emulator, the 80/20 rule rears its sobering head. It kinda doesn't matter how efficient the networking library you're using is and spending a non-trivial amount of time optimizing for that is time better spent on actually implementing something you're more familiar with. The real world overhead for something like this will be in the order of milliseconds per hour, if not less significant.

    It's akin to replacing the piston rings in your '05 Civic every 5,000 miles to prevent any power loss from wear - aka, lots of work for next to zero reward. Your time, energy and effort are best placed elsewhere, like actually implementing the thing!
    Reply With Quote  
     

  10. #28  
    Donator


    Join Date
    Feb 2014
    Age
    26
    Posts
    161
    Thanks given
    261
    Thanks received
    62
    Rep Power
    100
    It's nice to use a well-tested networking library when they are available, but I couldn't find a good C# one so I just decided to use plain old APM System.Net.Sockets
    Reply With Quote  
     

  11. #29  
    Jire
    Jire's Avatar
    Join Date
    Nov 2008
    Posts
    34
    Thanks given
    193
    Thanks received
    70
    Rep Power
    608
    Quote Originally Posted by Infernal cape View Post
    It's nice to use a well-tested networking library when they are available, but I couldn't find a good C# one so I just decided to use plain old APM System.Net.Sockets
    https://github.com/Azure/DotNetty
    Reply With Quote  
     

  12. #30  
    Extreme Donator

    JayArrowz's Avatar
    Join Date
    Sep 2008
    Posts
    104
    Thanks given
    99
    Thanks received
    107
    Rep Power
    810
    Quote Originally Posted by Infernal cape View Post
    It's nice to use a well-tested networking library when they are available, but I couldn't find a good C# one so I just decided to use plain old APM System.Net.Sockets
    A dotnetty example:
    https://github.com/JayArrowz/NetScap.../GameServer.cs

    I think MS have stopped working on dotnetty and its being carried on by the community in another repo. Will post when I get more info.

    Edit:

    More info - https://github.com/cuteant/SpanNetty
    Reply With Quote  
     

Page 3 of 3 FirstFirst 123

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. GNetLib V0.0.0.3 (A Simple Java Networking Library)
    By Rust in forum Application Development
    Replies: 6
    Last Post: 07-29-2015, 08:40 PM
  2. Replies: 3
    Last Post: 08-19-2014, 04:54 PM
  3. RSPStream: A GUI for RSPS Networking
    By 'Conner in forum Projects
    Replies: 19
    Last Post: 10-02-2010, 08:29 PM
  4. Replies: 7
    Last Post: 09-06-2009, 06:05 AM
  5. RSPS Server Library
    By Shiver in forum Downloads
    Replies: 49
    Last Post: 02-15-2009, 03:18 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •