Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

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

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

  1. Willchenyang

    Willchenyang

    Joined:
    Jul 20, 2018
    Posts:
    14
    This looks really great. I have one question.
    I am using unity for rendering on server side. So basically I am streaming frames from my server. Does DOTSNET supports connection from client outside unity? Say a webpage running with kcp?
     
  2. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    DOTSNET supports different transports.
    For a web browser you need websockets, kcp is UDP which doesn't work for web browsers.
     
  3. Willchenyang

    Willchenyang

    Joined:
    Jul 20, 2018
    Posts:
    14
    Thanks! So in this case if I want to use it with web browser I will need a middleware server to transfer from UDP/TCP to websocket? Sorry I am not vary familiar with different transports.
     
  4. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    You just need a websocket transport.
    We have one for Mirror. It's relatively easy to convert that to DOTSNET if you want to try.
    Websocket transport is kinda slow though. Not really fast enough to keep up with DOTSNET, that's why I didn't add it yet.
     
  5. Willchenyang

    Willchenyang

    Joined:
    Jul 20, 2018
    Posts:
    14
    That will be great ! I can try it. The reason we want to use Dots is because we can increase our concurrency on server and save some cost. Latency is not our first priority so websocket should be acceptable. Thanks
     
  6. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    Websocket transport is slow, as in can't handle that much data.
    It's a starting point, but for DOTSNET we'll need a way better optimized one later.
     
  7. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    Hey guys, just a heads up.
    There seems to be a 'no available transport found' bug in builds ever since upgrading to Unity 2020.3 LTS.
    Something is different in the bootstrap process, not sure why yet.

    Testing 2020.1 again today and will downgrade if it's stable.
     
  8. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    V1.28 pending review!
    Important: downgrade to Unity 2020.1.16 again for now!
    2021-04-15_11-54-59@2x.png
     
  9. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
  10. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    V1.29 pending review: NetworkComponents
    2021-04-30_11-16-52@2x.png
     
  11. zevonbiebelbrott

    zevonbiebelbrott

    Joined:
    Feb 14, 2021
    Posts:
    4
    Is my project feasible with DOTSNET?

    500CCU, around 40k entities(enemies, nature objects, projectiles, potentially moving and colliding with each other), RPG style mmo(items, inventory, health, player stats, special abilities(area effects), anti cheat, trading, chat and loot).

    Thanks in advance.
     
  12. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    Sounds like an MMO, I have the same goal. That's what I made DOTSNET for.
    40k entities is no problem whatsoever. Millions of them are possible.
    500 CCU test is planned for some time this year. So it's not proven yet, but ECS is surely fast enough.

    Performance isn't a limitation in ECS world. It's only ease of use right now.
    For example, NetworkComponents were added just a few days ago.
    NetworkTime, Rpcs, CMDs etc. are still missing from DOTSNET. Working on it :)
     
  13. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
  14. MAeStROx

    MAeStROx

    Joined:
    Mar 20, 2015
    Posts:
    14
    Hi I have a question regarding scalability, I see the interest manager but are there plans for you to make the server scalable in a way it divides the world up into pieces so that a few machines running dotsnet server can share the load?
     
  15. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    DOTS is really fast. Ideally that would not be necessary.
    Splitting your world into multiple machines comes with a complexity & maintenance overhead, which I would personally rather avoid as an indie dev.
     
  16. data_drift

    data_drift

    Joined:
    Jun 12, 2021
    Posts:
    1
    Yes, it isn't a real concern for indie devs, but it still would be nice to have the option to increase compute capabilities of the server by horizontal scaling (i.e. throwing more machines at the problem instead of better hardware for a single server) in case one trasitions from indie to a larger project. Without this option, one would have to rewrite the whole project to accomodate higher CCU.

    I envision something like a distributed ECS, where data is automatically distributed and replicated to the server nodes where it is manipulated and read respectively, so that one does not have to take care of load balancing manually (for example via separating the world into regions for each server node). Either that or a distributed actor model like Akka would also be a good fit.
     
  17. Rekart

    Rekart

    Joined:
    Jan 13, 2020
    Posts:
    15
    Hi.

    Our team is using DOTSNET for several months, and it looks like we'll have to add the following features sometimes in near future:
    - support DynamicBuffer synchronization. We could work around this, but it feels that these workarounds are too messy. Right now we use dynamic buffers for various buffs/physical effects/etc applied to Entity. We can have multiple effects of the same type (but with different parameters) applied to same Entity, so we cant use IComponentData directly in this case
    - synchronization for slowly-changing components when component changes detected. For example, we could have several hundreds of characters, each of them having huge component CharacterMovementSettingsComponent with for example 50 floats inside. Lets say this component can change but we dont expect these changes to occur very often - once every 30 seconds for example. Sending CharacterMovementSettingsComponent every network tick would be waste of traffic. Keeping in mind that every time I change this component in some new system, I have to send network message for this component is not very reliable from developvent point of view. Right now we just ignore traffic waste.
    - synchronizatoin of slowly changing buffers - just combination of previous 2 cases

    So the questions are:
    - if there been any plans for such features support?
    - or if somebody can share good practices working around described cases using existing DOTSNET features?
     
    Last edited: Jun 17, 2021
  18. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    Yes.
    DynamicBuffer sync sounds useful.
    Reducing bandwidth for slowly changing objects as well.

    Currently spending 100% of my time on Mirror to get some major features done, which will also be backported to DOTSNET.

    It's a bit difficult to work on two networking libraries at the same time, especially with DOTS future being so uncertain.
    But we'll get there :)
     
    unity_4XmM7WgLIz0pXA and Rekart like this.
  19. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    Progress Update
    Still no DOTS status update from Unity.
    Still banned from asking questions.
    DOTS forum is nearly dead with only a handful of posts every day.

    DOTSNET development is on hold until Unity shows believable commitment to DOTS again.
    Bug fixes only for now.

    In the meantime, I'll focus on Mirror to finish the roadmap this year.
    Most of the techniques can be backported to DOTSNET once we know more.
     
    Last edited: Jul 11, 2021
  20. vis2k

    vis2k

    Joined:
    Sep 4, 2015
    Posts:
    3,929
    V1.31 pending review:
    2021-07-20_12-28-50@2x.png
     
  21. april_4_short

    april_4_short

    Joined:
    Monday
    Posts:
    67
    Thank you!

    Your talents and perseverance greatly appreciated.

    "What we see now is like a dim image in a mirror; ..." ~ Ghost in the Shell
     
    vis2k likes this.
unityunity