Project

General

Profile

ANN v0.5.0, dev diary

Added by Josip Almasi about 1 year ago

v0.5.0 is out

...with major changes, in short
  • VRSpace galaxy is new world where your servers advertise themself, because you asked for it ;)
  • protocol changes
  • data structure and database changes
  • websocket improvements
  • bug fixes

Long story AKA dev diary

We have over 1.5k users registered here, and 800-900 daily visitors to the main site, up to 40 git clones per day. For a while now I was wondering what all these people do; I don't know unless they come to me explicitly. Those that did, do good stuff!
So how about we show off this good stuff somehow? Like, let's connect, and at least some of these hundred(s) daily visitors will pour over to you guys.
To that end, the server now by default opens websocket to vrspace.org main site, enters galaxy space, and remains there while active. While there, it has a portal for avatar. This is new kind of portal, essentially a hyperlink, that you can easily configure in your local application.properties, or simply turn off the entire feature.
But the feature brought up a number of interesting challenges, like
  • this may be an easy way to bring down the entire network
    To ensure this does not happen, servers do no set up their scene, i.e. don't listen to active objects, so do not receive any events. We may use this channel for something useful, like announcing code changes, or replication.
  • we have multiple client types now
    One being user with a web browser, and another being a java server. We may have more in time, bots seem a likely 3rd type. So they connect to a different websocket path now: /vrspace/client and /vrspace/server. There's another change to the protocol, Welcome message now contains client type in addition to client id. This broke pretty much everything on the client side, hopefully everything is fixed, as networking code is well encapsulated.
  • how to arrange an arbitrary large number of objects?
    I was thinking a circle with radius increasing with number of gates, like main entrance, but then again, how about a spiral? And then this space was ugly, so I made a galaxy-like particle system with 20k particles, fully parameterized. May look weird, but is another handy code example. All that sounds a lot like ansible galaxy, IT automation community, thus, enter VRSpace Galaxy! ;)

While at it, I've encountered multiple synchronization issues on the server. The only way I could get rid of Neo4J deadlock exceptions during enter-world process was breaking down VRObject-World relationship. So if you built your world with vrspace world editor, it's going to disappear. You should be able to save it from world editor, and load it after the upgrade.
A side effect is performance improvement.
Furthermore, this required websocket improvements, specifically utilization of ping-pong messages to keep the connection up, and to detect when it breaks down. This hopefully makes ping-pong contribution by Tero obsolete, but it's still there just in case, just commented out.
Last but not least, I spotted and fixed a bug related to character cloning: two users using the same avatar would not see each other :)

That's all folks, have fun :)


Replies (8)

RE: ANN v0.5.0, dev diary - Added by Josip Almasi about 1 year ago

Oh wait that's not all :)
You may have noticed that VRObject has script property. Well it's being utilized now for web portals, but it's very experimental.
Currently, the script is
  • loaded by client dynamically
  • passed world and world manager
  • executed

This web-portal.js script for example creates and controls new portal, but in general, a scripts could load hordes of zombies to attack your users, or whatever.
Obviously, there's high potential for cross-site scripting attacks, so the property is read-only, and can be only set on server. Somehow. Currently only with a property.
Worse yet, this isn't exactly single-page-app-friendly, a SPA bundles everything into a single 'executable' and there's no dynamic loading.
While I figure this out you're welcome to play with it, but be advised this is going to change for sure.
And of course, let me know what you think.

RE: ANN v0.5.0, dev diary - Added by Nate Lager about 1 year ago

This is great progress! I'm going to work on updating the container I've been (rather laggedly) maintaining.

RE: ANN v0.5.0, dev diary - Added by Josip Almasi about 1 year ago

Thanks Nate.
Also feel free to update wiki to point to your repo :) Or readme, whatever fits.
https://redmine.vrspace.org/projects/vrspace-org/wiki#Running-in-docker

I just had a quick look at ans... err, vrspace galaxy ;) And there's two gates there, i.e. two servers out there running v0.5.0, and I hope to see more and more.

RE: ANN v0.5.0, dev diary - Added by Nate Lager about 1 year ago

added!

I stood up a machine in my lab to run vrspace, it should i think, be advertising to galaxy, but I'm not certain if my ISP is allowing the traffic in. Can you access HTTP://vrspace.undrground.org:8080 ? (ill get https setup eventually).

RE: ANN v0.5.0, dev diary - Added by Josip Almasi about 1 year ago

Yes I can, and dang it still shows white error page :)
Not sure what to do about it, like use babylon/avatar-selection.html as index, what do you think?
Thing that I want to avoid is people just using vrspace.org home page as their landing page. On the other hand, I want something that maintains itself ;)

RE: ANN v0.5.0, dev diary - Added by Nate Lager about 1 year ago

Oh good. now i need to figure out vidu, I've never been able to get that working. I need to read through the setup more closely I think.

as for the landing page, I agree, I've always thought it should take you right to avatar-selection, is there a reason it shouldn't that I'm not aware of?

If i travel to the galaxy from my instance, should it get me to the shared galaxy? or is that local?

RE: ANN v0.5.0, dev diary - Added by Josip Almasi about 1 year ago

Nate Lager wrote:

Oh good. now i need to figure out vidu, I've never been able to get that working. I need to read through the setup more closely I think.

Getting both running behind reverse proxy on the same host is quite tricky: https://redmine.vrspace.org/projects/vrspace-devops/wiki#OpenVidu
(this is in devops project that is not public, has not been peer-reviewed yet so I'm not sure publishing it is safe)

as for the landing page, I agree, I've always thought it should take you right to avatar-selection, is there a reason it shouldn't that I'm not aware of?

Nothing really. There's a misleading 'login' button on that page that leads to a feature that I can't properly support - Oauth2 authentication with github,fb,google.

If i travel to the galaxy from my instance, should it get me to the shared galaxy? or is that local?

Your local galaxy isn't going to lead you anywhere, unless some other host connects to your host somehow.
But you can set up your host to advertise in galaxy on vrspace.org. By default, you're advertising as developer at localhost :) And the gate is closed, of course.
This is configured in application.properties, as everything else, defaults are

# server parameters
# these are your own server parameters to be advertised
org.vrspace.server.description=developer
org.vrspace.server.url=localhost
org.vrspace.server.thumbnail=/content/worlds/galaxy.jpg
org.vrspace.server.available=false
org.vrspace.server.advertise=true

So change url to your url, available to true, and we should be able to enter from vrspace.org galaxy into your world.
There's some hack in place that should allow you to keep your current avatar.
Changing thumbnail url should change picture on the portal, and description is displayed above the portal.

For the time I can't say how any of this is safe and secure. Nobody should be able to bring down the network or XSS, but that's pretty much all. Like, please don't display porn on your portal ;) Advice and/or opinion appreciated.

RE: ANN v0.5.0, dev diary - Added by Nate Lager about 1 year ago

hm, thats interesting, i thought I had changed those options. Ill have to make sure the config file is being read as I expect it to be.

Thanks!

    (1-8/8)