Search Unity

DOTSNET - High Performance Unity ECS Networking from the creator of Mirror!

Discussion in 'Assets and Asset Store' started by mischa2k, May 1, 2020.

  1. Azazello2020

    Azazello2020

    Joined:
    Mar 22, 2020
    Posts:
    12
    @vis2k I did a load test. After 76 clients i got disconnect. I attach the logs

    Code (CSharp):
    1. KCP: disconnecting connection because it can't process data fast enough.
    2.  
    3. Queue total 10000>10000. rcv_queue=1 snd_queue=9996 rcv_buf=0 snd_buf=3
    4.  
    5. * Try to Enable NoDelay, decrease INTERVAL, disable Congestion Window (= enable NOCWND!), increase SEND/RECV WINDOW or compress data.
    6.  
    7. * Or perhaps the network is simply too slow on our end, or on the other end.
    8.  
    9. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    10.  
    11. UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    12.  
    13. UnityEngine.Logger:Log (UnityEngine.LogType,object)
    14.  
    15. UnityEngine.Debug:LogWarning (object)
    16.  
    17. kcp2k.KcpConnection:HandleChoked () (at D:/ICVR/DotsSandBox/dotssandbox/Assets/DOTSNET/Scripts/ECS/Transport/Transports/kcp/kcp2k/highlevel/KcpConnection.cs:206)
    18.  
    19. kcp2k.KcpConnection:TickIncoming_Authenticated (uint) (at D:/ICVR/DotsSandBox/dotssandbox/Assets/DOTSNET/Scripts/ECS/Transport/Transports/kcp/kcp2k/highlevel/KcpConnection.cs:309)
    20.  
    21. kcp2k.KcpConnection:TickIncoming () (at D:/ICVR/DotsSandBox/dotssandbox/Assets/DOTSNET/Scripts/ECS/Transport/Transports/kcp/kcp2k/highlevel/KcpConnection.cs:371)
    22.  
    23. kcp2k.KcpServer:TickIncoming () (at D:/ICVR/DotsSandBox/dotssandbox/Assets/DOTSNET/Scripts/ECS/Transport/Transports/kcp/kcp2k/highlevel/KcpServer.cs:318)
    24.  
    25. DOTSNET.kcp2k.KcpTransportServerSystem:EarlyUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Assets/DOTSNET/Scripts/ECS/Transport/Transports/kcp/DOTSNET/KcpTransportServerSystem.cs:162)
    26.  
    27. DOTSNET.TransportSystem:OnUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Assets/DOTSNET/Scripts/ECS/Transport/TransportSystem.cs:84)
    28.  
    29. Unity.Entities.SystemBase:Update () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/SystemBase.cs:400)
    30.  
    31. Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:583)
    32.  
    33. Unity.Entities.ComponentSystemGroup:OnUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:523)
    34.  
    35. Unity.Entities.ComponentSystem:Update () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystem.cs:114)
    36.  
    37. Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:583)
    38.  
    39. Unity.Entities.ComponentSystemGroup:OnUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:529)
    40.  
    41. Unity.Entities.ComponentSystem:Update () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystem.cs:114)
    42.  
    43. Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:583)
    44.  
    45. Unity.Entities.ComponentSystemGroup:OnUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:523)
    46.  
    47. Unity.Entities.ComponentSystem:Update () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystem.cs:114)
    48.  
    49. Unity.Entities.ComponentSystemGroup:UpdateAllSystems () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:583)
    50.  
    51. Unity.Entities.ComponentSystemGroup:OnUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystemGroup.cs:523)
    52.  
    53. Unity.Entities.ComponentSystem:Update () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ComponentSystem.cs:114)
    54.  
    55. Unity.Entities.ScriptBehaviourUpdateOrder/DummyDelegateWrapper:TriggerUpdate () (at D:/ICVR/DotsSandBox/dotssandbox/Library/PackageCache/com.unity.entities@0.51.0-preview.32/Unity.Entities/ScriptBehaviourUpdateOrder.cs:426)
    56.  
    57. NetworkServerSystem: connectionId: -1430635582 not found in WrapHandler. This should never happen.
    58.  
    59. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    60.  
    61. UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    62.  
    63. UnityEngine.Logger:Log (UnityEngine.LogType,object)
    64.  
    65. UnityEngine.Debug:LogError (object)
     
  2. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    You can try to increase the kcp transport's queue sizes.
    Or try to send less data :)
     
  3. Azazello2020

    Azazello2020

    Joined:
    Mar 22, 2020
    Posts:
    12
    I did. But result result is the same
     
  4. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    The message tells you that the networking is getting way way behind what the application is trying to send.
    This is good, there needs to be a reasonable limit.
    Otherwise if you let the queue grow forever, the client's latencies would grow to 1,2,3,4,5..10,..20 seconds.

    You need to figure out why it's getting behind so much.
    Most likely need to simply send less data.
     
  5. Azazello2020

    Azazello2020

    Joined:
    Mar 22, 2020
    Posts:
    12
    What i did:
    1. I divided sample project "Benchmark" into a client side and server side. I did not add new messages
    2. Start server on Linux
    3. Start clients on AWS virtual machines
    4. Start clients on my machine
    5. After 70 clients on virtual machines my client was disconnect
     
  6. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    The benchmark demo sends thousands of entities to every client, multiple times per second.
    This is meant as an extreme worst case.
    For a real game, you would have significantly fewer entities.

    You can try to reduce the server component's broadcast max size.
    It's meant for these cases where you need to limit bandwidth.
     
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    uMMORPG and DOTSNET are on sale.
    I think it's -40% but occasionally -95%.
    For me it jumped to -95% after a few seconds.

     
  8. Rekart

    Rekart

    Joined:
    Jan 13, 2020
    Posts:
    22
    Hi! Recently updated DOTSNET to the latest version and now having issues with authorization message not being delivered from client to server. Haven't checked other gameplay messages, though.

    - IL2CPP build for android
    - ARM64 target
    - KcpTransportServerSystem NonAlloc set to true
    - both client and server running within one application on same device, communicationg via localhost

    tracked message up to send buffer on client side, while server does'n t even call OnTransportData. However handshakes seem to pass successfully, server calls fake authentication once and adds client to connections list.

    what i've tried and what didn't help:
    - different build optimization and code stripping settings
    - sending multiple mesages in a row
    - adding weird delays here and there
    - using other unity versions (2021.3.9f1)

    what did help:
    - using memory transport for local game
    - setting NonAlloc to false for KcpTransportServerSystem
    - building mono
    - connecting to remote server (mono running under linux)
     
    Last edited: Sep 19, 2022
  9. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    KCP nonalloc does not work on some systems.
    It's a hack to work around C#'s silly send/recv allocations.
    usually it doesn't work with IL2CPP for example :)
     
    Rekart likes this.
  10. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    DOTSNET price reduced to $80 again - now that I have more time.
    Backporting improvements from Mirror II to finally do the DOTSNET CCU test :)
     
  11. CrazyMeow

    CrazyMeow

    Joined:
    Mar 19, 2021
    Posts:
    10
    Are great assets supporting entities 1.0?
     
  12. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Working on the DOTS 1.0 upgrade for DOTSNET.
    It's heavy breakage, will take another week or so probably.
     
    CrazyMeow and Rekart like this.
  13. CrazyMeow

    CrazyMeow

    Joined:
    Mar 19, 2021
    Posts:
    10
    Thank you for your great work!
     
    mischa2k likes this.
  14. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Well let's get it to run first :)
    Be warned, both DOTS 1.0 and the next DOTSNET version will be very painful to upgrade to.
     
    CrazyMeow likes this.
  15. CrazyMeow

    CrazyMeow

    Joined:
    Mar 19, 2021
    Posts:
    10
    Awesome! I can't wait!
     
  16. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    DOTSNET has been removed from the Asset Store.

    2022-11-02 - 17-38-58@2x.png

    My sincere apologies, but I am unable to upgrade DOTSNET to the latest ECS version.

    Had high hopes for DOTS 1.0, they mentioned it was going to be easier to use than GameObjects.

    However, it's just about the most difficult way possible to make a video game. Some people seem to like it, but I just don't see it.

    DOTSNET may return once Unity releases a pure DOTS Editor that's easy to use. ECS certainly still has great potential for virtual worlds.

    Until then, I'll focus on Mirror to help people build their worlds.
    Some of the DOTSNET tech was already backported for even better performance.

    Please feel free to contact Unity for a refund. Usually refunds are possible for a few weeks after purchasing.

    You also have access to all my other assets for free now.
    Once you click purchase, the price should drop to $0 if you already own DOTSNET.

    ---

    Again, I apologize for letting you all down.
    Ultimately, the goal is to build virtual worlds.
    For that, we need the right tools.
    As of now, this just isn't it :(
     
    Arzumas, kmowers, mgear and 4 others like this.
  17. CrazyMeow

    CrazyMeow

    Joined:
    Mar 19, 2021
    Posts:
    10
    It is so sad.
    I have been following it continuously since I bought it in April, but have not yet come to use it. Until now when I heard the sad message.
    I believe you have given it a lot of thought, so I will still support you.
     
    RicardoAmores_MPG likes this.
  18. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Thanks.
    Haven't been sure about DOTS for over a year now.
    DOTSNET was invited to a major sale this month, and I couldn't offer this in good faith if I don't believe in it.

    I'll definitely give it another try once DOTS is easy to use.
     
    CrazyMeow likes this.
  19. SpeedOfLint

    SpeedOfLint

    Joined:
    Jun 3, 2018
    Posts:
    2
    Hello there @vis2k

    Before I ask my question, I'd like to say that thanks for everything you gave to the community!

    We were searching for networking solutions and decided on using Mirror. But the tricky part is we will develop the game using SvaltoECS and Unity Dots v0.51. My question is, since you no longer support DOTSNET, is it possible to use Mirror with ECS?
     
  20. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    DOTSNET works fine with DOTS 0.51.
    Just not with 1.0.
    Probably easiest to avoid DOTS until it's more usable tbh.
     
    akuno and CrazyMeow like this.
  21. SpeedOfLint

    SpeedOfLint

    Joined:
    Jun 3, 2018
    Posts:
    2
    Thanks for replying so quickly

    Since it is no longer on the asset store, how can we get our hands on DOTSNET? And as for my prior question, can we use Mirror with dots, is it possible?
     
    CrazyMeow likes this.
  22. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    If you purchased DOTSNET before, then you can still download it.
    Mirror does not support DOTS, that's why DOTSNET was made.

    If DOTS is convincing enough in the future, then DOTSNET will come back.
     
  23. punkbot

    punkbot

    Joined:
    Apr 18, 2014
    Posts:
    19
    Can you comment more on why you think DOTS 1.0 is unusable? Mainly just curious, as I'm working on a performance-centric game (for which ECS should allow substantially more entities), and want to understand what you saw as the downsides. FWIW, my game is procedural so doesn't rely on much Editor interaction.
     
  24. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    Please read my other post.
     
    CrazyMeow, Syn0_ and punkbot like this.
  25. Resed1t

    Resed1t

    Joined:
    Oct 5, 2021
    Posts:
    1
    Hello, version 1.0.8 of DOTS is already out and it looks quite convincing and is not in pre-release, will your development be resumed?
     
  26. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,347
    I heard that Joachim Ante is not CTO anymore, and Mike Acton left Unity.
    There seems be some mentioning on this thread here, and I asked to double check.
    I suppose it indicates to some issues behind the scenes.

    Personally I'll definitely wait until we have pure ECS Editor, without hybrid.
    Still convinced of DOTS/ECS.
    Not convinced of Unity's ECS implementation just yet.
     
    Last edited: May 26, 2023
  27. MrBigly

    MrBigly

    Joined:
    Oct 30, 2017
    Posts:
    221
    I agree with many of your points about DOTS in that article. I looked at DOTS for a week or so some time back and it took me about an hour or so before the light turned on and DOTS became very easy to work with. So much so I felt they should drop GOs/MonoBehaviour and replace it all with DOTS so that there is a single programming paradigm.

    I do think that it could be made much more intuitive, but they tried to present it in the context of MonoBehaviour structured coding. Without MonoBehaviour, that is with DOTS as the exclusive architecture to the scripting of the game engine, using DOTS for anything would be much easier to grasp, including networking, animation, physics, UI, --- everything.
     
  28. dannyalgorithmic

    dannyalgorithmic

    Joined:
    Jul 22, 2018
    Posts:
    100
    Unfortunately never going to happen. I wish so, but even 2D isn't even a serious thought in anyones mind, I highly doubt we're ever getting a dedicated ECS editor.
     
    mischa2k likes this.