Improbable Icon

Newer dependencies


#1

Hi, I would like to be able to force install spatial.

I have Unity 2017 and Java 9.


#2

Hey @marc, the recommended dependency versions for SpatialOS 12.0.1 (the latest version) are Unity 5.6.0 and JDK 8. Unless you have a good reason not to, I’d recommend using these for the best development experience and support.

We are actively certifying Unity 2017 for SpatialOS development but there are currently no plans to upgrade to JDK 9. Java has historically been (for the most part) backwards compatible, so it should just work.

If you run into any specific issues setting up your spatial project with Unity 2017 and JDK 9.let me know here and I’ll try my best to resolve them :slight_smile: .


#3

Yes, but I can’t progress in the installation.

“spatial.exe diagnose” fails

I’m not going to install older software (Java 8 and Unity 5.6.0).

Can I download SpatialOS in a zip or anything simple?


#4

Hey @marc,

I’m assuming that you downloaded SpatialOS using the download link in Manual setup guide for Windows?

spatial diagnose provides information regarding the suitability of your development environment as per your installed spatial version’s recommended dependency versions, however, its failing or throwing errors does not necessarily mean you will be unable to develop a SpatialOS application.

If the only failures you’re receiving when you spatial diagnose are Unity and Java related, then it’s likely you’re all set to develop. Indeed, the fact that spatial diagnose runs suggests that SpatialOS itself has installed correctly.

I’m going to look into improving spatial diagnose so that it warns (as opposed to throwing a fatal error) when dependencies are not present, my apologies for that confusing messaging.

Let me know if you have any question or run into any other errors.


#5

Aha! So the only dependency I need to fix is the Microsoft Visual C++ (MSVC) Redistributable one?

  • The installed Microsoft Visual C++ Redistributable version 14.11.25325 is in
    compatible with the required 14.0.0 version.

Is this the one I need?

https://www.microsoft.com/en-us/download/details.aspx?id=48145

Error 0x80070666: Cannot install a product when a newer version is installed.

Ok, so I need to uninstall a newer version… this is madness.

BTW unity 2017 comes with VS that has this newer C++ thing, this looks like a showstopper to me.


#6

No, you shouldn’t have to do that. This is the same situation as for Unity and JDK. spatial diagnose is effectively saying “this version does not match the one I expect”, but that does not mean that it won’t work. Like JDK, the Microsoft Visual C++ (MSVC) Redistributable is also (for the most part) backwards compatible, so it should just work.

The reason spatial diagnose exists is to point to likely causes of development issues, and to encourage you to use SpatialOS in conjunction with dependency versions that we can guarantee work correctly. I agree it’s frustrating that we have yet to certify the latest versions of our dependencies, and you’re not the only one using the latest versions while we certify them.

@philg ran into a similar error and was able to safely ignore it here. If that does not work for you I can confirm that uninstalling the earlier version does work.

Thanks for noting this, we are aware and will be ensuring compatibility with this bundled version of Visual Studio when we certify Unity 2017. As noted above, this will hopefully not block you.


#7

Ahaaa, it’s just me that is unable to follow instructions…

spatial worker build UnityWorker UnityClient --target=development

was the command I was looking for… thx for the excellent support though.

again sorry for not just trying the next step in the tutorial…

edit: just changing the wording from fail to warning and the color from red to orange would solve this problem I think!


#8

Just out of curiosity, why does spatial.exe need Java? And why did you build one big blob called spatial.exe instead of many small .exe files for each purpose?

Edit: Aha, it only downloads the runtime once you run:

spatial local launch

Will dig around more…

But spatialOS is all Java?!?!

I built a similar solution in Java which is only ~200KB: https://github.com/tinspin/fuse

It also scales over many threads async. with NIO and has a built-in distributed database.

I will evaluate spatial, but 80MB seems a bit bloated to me.

For those looking to know what spatial is under the hood it’s akka and spray, you should just write that on the “about” page of your website to save people the trouble.

Why are you making it so hard to run this code when you don’t even obfuscate it? Just open-source the damn thing!?

The platform ran 400% cpu on a Skylake 6600 with like 20 fishes… for a demo that’s very disconcerting, maybe because of Java 9?

Edit: A friend pointed out this post sounded a bit like /r/iamverysmart/, and I agree, I’m a pretentious douche, that doesn’t make spatial any better though.

I like that you built in flamegraphs!

Part of your problem is the fabric.internal stuff… a whole lot of over-engineering going on there.

So without looking, I’m curious, how do you do loadbalancing between nodes… because cloud services don’t have multicast UDP! Sharding?


#10

Hi marc. I thought I’d answer some of your questions about the runtime (aka “fabric”).

But spatialOS is all Java?!?!

The runtime is (mostly) Java and Scala.

For those looking to know what spatial is under the hood it’s akka and spray, you should just write that on the “about” page of your website to save people the trouble.

There are quite a few things under the hood!
Akka we have largely stopped using in favour of gRPC. We made the change about a year and a half ago and so there are still some legacy bits and pieces that haven’t migrated over.
We barely use spray (I think it’s only used for the stream of entity positions in the inspector, and a cpu sampling debug tool we have).
I’m sure if you keep digging you’ll find other interesting things.

Why are you making it so hard to run this code when you don’t even obfuscate it? Just open-source the damn thing!?

The runtime needs to work with our other internal services and maintain compatibility with our worker protocol. This would make it logistically difficult to open source. We’re not actively trying to hide anything (otherwise wouldn’t be making this forum post!).

I like that you built in flamegraphs!

Yeah they’re neat :slight_smile:

Part of your problem is the fabric.internal stuff… a whole lot of over-engineering going on there.

That’s all generated code from protobuf files.

So without looking, I’m curious, how do you do loadbalancing between nodes… because cloud services don’t have multicast UDP! Sharding?

It depends on what we’re trying to loadbalance. For example: things like entities, worker runners, and worker connections to the runtime have a lot of spatial locality-based sharding to minimise traffic between nodes. We’ve used various systems for cross-node communication and fan-out.


#11

Hi Charlie,

Great stuff, just wanted to thank you for answering before I go through all the answers. Very thankful!

That’s great, I will look into https://grpc.io and “keep digging to find other interesting things”.

Too bad you can’t go deeper into the loadbalancing stuff because that’s where the ball is at right now.

I hope you have some time to look at fuse, I’m sure there are “interesting things” you can learn from me too. hopefully. :S

I would like to compare performance with you guys, do you have any numbers… for example my platform can handle 2000 incoming messages (~80 bytes) per second at 50-to-50 so 100.000 messages outgoing per second with 80% out of 200% (so 40% on each core) CPU on a AWS M4 Large with 200 microseconds avg. internal latency (edit: this was wrong, only on the update request, the whole 50 broadcast likely takes much longer, my bad!).

Edit: So what is gRPC using, Netty?


#12

Edit: So what is gRPC using, Netty?

The Java gRPC implementation uses Netty. gRPC itself is ‘universal’, if you’re interested in how the other implementations are backed, it’s open-source: https://github.com/grpc.

I would like to compare performance with you guys, do you have any numbers…

There are many, many metrics you can use to measure the performance of a platform like SpatialOS. There are also many metrics that other platforms could use to measure their own performance. Unfortunately, these metrics tend to not match up because everyone tries to measure how their own system performs, which is often based on either internal implementation details, or based on the fundamental concepts of their own platform. For example: in SpatialOS we care a lot about entities and workers, but we don’t really use the concept of messages much.
We encourage people to try out SpatialOS and compare it to alternatives in the use-case they specifically care about. If there’s some specific gameplay element you want to investigate and ask the question “Should I be using SpatialOS or tool X to build this?”, you’ll get the most accurate results by giving it a very rough try on each system rather than trying to figure it out from a table of numbers. One of the reasons we provide ‘Open Platform’ access is to give devs a tool to do this.


#13

Agreed, my proposition is to benchmark on the RPi 1&2 then you get a comparative performance from the hardware point of view and single vs multi -core! You are right the focus is different for different games. But I would argue that the most crucial metric is how many concurrent players/actors/workers/thingies/sockets you can handle in the same real-time world, specially now post Moore’s law.

I’m pretty proud that fuse actually beats WoW in raw CCU, but my protocol is cheating since I only send one message per key input, so analogue input (mouse/analog stick) needs “chunking”, for example dividing rotation by pies of 15 degrees. Also that means only “one shooters” for FPS for example, no spraying…

From my “non business”/“open source” PoW we’re all in this journey towards the “low poly” matrix together.

Good luck!