Archive

Posts Tagged ‘network’

Real time application sharing for virtual meetings

March 27th, 2009

realXtend platform offers a way to share live applications over the network to realXtend users. Effective virtual world meetings usually require that you can show your slides (here’s how to do that). It may also help to browse web so that others can view the same web page with you. Sometimes you may want to show how to use an application in real time.

In this example we use VNC (Virtual Network Computing – a simple and working desktop & application sharing system) to share the desktop. 

vncrex

Firefox window shared using tightVNC server and viewed in realXtend.

VNC allows also sharing the control between participants, and users can also join using a standard VNC client, if they do not want to use full virtual world to join the meeting.

In this example we use localhost, but I have tested that VNC works also over the network. In a real world situation I would set up another computer to serve as a VNC server – otherwise running the realXtend client on the same computer is a bit awkward as you need to have the shared content visible on screen to share it. Below is a screenshot how sharing the realXtend viewer window, which is looking at the shared content, causes infinite mirror -effect.

Watching your shared desktop getting shared, getting shared, ...

Watching your shared desktop getting shared, getting shared, ...

Follow these simple steps to test VNC application sharing with realXtend.

  • Install and run tightVNC server; Everything should work with other VNC servers as well, but I have tested this only using TightVNC.
  • Adjust the settings as in the following screenshots:

rexvnc_server1

Set the view-only passport, all the connecting users need to know it.

rexvnc_server2

rexvnc_server3

Be careful to have the settings exactly as here, change them after you get them to work for the first time. 

 

  • Bring a new texture to realXtend (file->upload)
  • Create a new cube (right click on ground -> create)
  • Edit cube and set the new texture on it (you can also use the texture on meshes for an interesting effect! Who doesn’t want to play doom and use a virtual sofa for the display?)
  • Edit texture properties (find it from your inventory and right click it) and edit the mediaurl:

 

vncrex_mediaurl

  • Edit the cube again and set it to play media when clicked:

vncrex_mediaplay

  • Now close the edit window and click the cube to get the VNC run, you will get a dialog asking for the password (which you defined for the server earlier):

vncrex_connectTop left dialog is the server telling that someone is connecting. 

Warning! After you hit enter, tightVNC client is launched – it is embedded to the realXtend viewer code – do not close it! Just bring your realxtend viewer to front and you see desktop sharing in action. You can use the tightVNC viewer to get the control over shared application, if the server owner grants you permission to do that.

vncrex_onmesh

Current VNC implementation is a prototype and it has known bugs. User can start one VNC session and after it is finished, the viewer needs to be restarted to be able to start a new VNC session. Users also need to be warned in advance so that they do not close the VNC viewer as it pops up after starting to view VNC.

realXtend , , , , , , , ,

Virtual Worlds, Virtual Robots, and AI: beyond gaming and social spaces

March 11th, 2009

In the last two years since Linden Lab released the source code for their client, a vibrant open source community has grown around the Second Life protocol. With projects such as the first version of realXtend, the possibility of moving beyond the limitations of that protocol are starting to be explored. Features such as inverse-kinematics-based avatar control and mesh-based prims extend the platform in ways that go beyond the capabilities of Second Life. There are also parallel open source virtual world efforts, such as Qwaq (based on Open Croquet), Sun’s Wonderland platform, and the Web3D/X3D set of formats and runtime tools.

One of my core interests in this space has been to find a way to bring some of my and other’s work in robotics, AI, and advanced simulation into this arena of shared virtual worlds. There are numerous reasons why this would be beneficial. Firstly, it would allow researchers to leverage a common set of tools, fostering collaboration and improving our ability to reproduce and critique each other’s work. Perhaps even more importantly, it could open the way for large numbers of people to interact with virtual entities (AI’s, if you prefer). This is a potentially major advance in AI research, as it represents a real-world, renewable source of training data, which many researchers think is critical for advancement in the field. It would also be ultra cool.
(Editor’s note: See also earlier article What do virtual worlds have to offer AI?)

rexrobot

Before I describe this work and the unique requirements it presents, let’s clarify some of the jargon. Linden Labs uses the term ’sim’, short for simulator, to signify a portion of virtual space supported by Linden’s servers. Opensim, the open-source, mostly Second Life-compatible server, inherits this usage. When I talk about simulation and simulators, I mean something quite different. In my work in robotics, I build software to simulate complex robots. This software uses some of the same underlying components as a Second Life or Opensim simulator – a physics engine, 3D representation of objects, and so on. However, the level of detail is quite different. The simulators I use in my robotics work are generally operating at a much higher degree of realism than a realXtend or SecondLife vehicle or avatar. They require proportionally greater resources in terms of CPU and memory, and of course the development time to get a simulation of this sort working is considerable.

While my own work in robotics requires a high degree of physical realism, there is work being done in this field that may have different requirements, such as robot swarms, where navigation and interaction are more important than physical realism. There is also a body of AI research into subjects such as language comprehension that may not need physical realism at all. However, my work is on physically realistic simulation, so I will be focused on that specific issue in this article.

There are several related issues that come up in the course of attempting to integrate ’serious’ simulation into the Second Life-derived model:

Basic Architecture

In Second Life (and related platforms), the user’s visual representation of the world consists of three major parts: the background (land, sky, sea); a set of objects (called ‘prims’ in Second Life); and avatars, representing the human (or possibly scripted) players. These three major elements have very different architectures, and present an almost mutually exclusive set of features to the system. Putting aside the background elements, let’s look at the prim and avatar systems.

Prims

Prims are physical objects that are described as a primitive shape (cube, cylinder, pyramid, sphere etc.), with various possible modifications such as cuts, tapers, skews, and hollows. Prims are controlled by the server software. Static prims, which generally don’t move unless they are being edited, make up architectural elements such as walls and other building elements. Other prims are allowed to move around the environment. They can be controlled by the physics engine (balls that roll), scripts (doors), or both (vehicles). They can have arbitrary textures, but do not have the ability to utilize deformable meshes, skeletons, or client-side animation.

Avatars

Avatars are always defined as skeletons with deformable mesh (skin and clothes). Their motion is usually controlled by the user’s input (walk, run, fly etc). They do react to the physics engine, but in a rudimentary way: avatars are represented at the physical level as ‘capsules’, egg or pill-shaped shells that provide basic collision with walls and other avatars. This is an important point: there is no physical representation of, say, your arm extending out and touching an object. Complex avatar motion is achieved through client-side animation, which in our case is based on the .bvh file format (see http://en.wikipedia.org/wiki/Biovision_Hierarchy). Again, it’s important to realize that the animation of an avatar is not reflected at the physics layer, at least not in the present implementation of Opensim.

There is one more subtle but critical point to keep in mind about avatars vs. prims: avatars, by definition, are associated with a user account. Users have abilities that go outside the physical and graphic simulation layer – they can buy and sell things; they can chat with each other, join groups, get banned for TOS violations, and so forth. They represent an entity within the social network of Second Life (or one of the Opensim grids, or the emerging hypergrid). There are complexities – avatars can have ‘prim’-based attachments – but fundamentally, if you want to be part of the Second Life society, you need an avatar.

Users

Users, through their avatars, can interact with each other (chat, give/receive items…). They can interact with prims, by creating and editing them (if they have the permissions), or through menus and scripts. It may seem obvious, but it’s worth pointing out the heirarchy: Prims cannot create or edit avatars (!); they cannot buy, sell, give, or receive assets on their own behalf. They are, by definition, owned and controlled by at least one user, which is by definition represented by a single avatar.

The problems this heirarchy and separation of capabilities poses to those of us working in AI is hopefully becoming evident. If I design a robot using prims, scripts, and physics, there is no obvious way to give that entity the same rights and privileges of a “real” user. I also can’t take advantage of graphics abilities such as skeletons, deformable skin, or animations. On the other hand, if I design a robot in the typical ‘bot’ fashion, by pretending to be a user (using libsecondlife for instance), right at the start I must accept a number of constraints that may not be desirable: I need to look roughly human (because of skeleton constraints); I must have skin; I can’t interact physically at a fine-grained level with the rest of the system; and my behavior must be animated – I cannot generate low-level behavior on-the-fly.

Distributed simulation and synchronization

Second Life started as a proprietary system run by Linden on a local server farm. They made the choice to divide up the simulation by geography; in essence, each 256×256 meter region of land is assigned its own processing stack (set of CPU threads), and operates in parallel with all the other regions. Interactions between region modules are achieved through network communication.

There are obvious objections to this model, the main one being that popular sims get overloaded, and sparsely visited sims waste resources. Some of this can be addressed with load balancing and clever thread management, but in my opinion it represents a fundamental flaw in the Second Life architecture. Putting the resource issue aside for the moment, there is a deeper flaw in this state of affairs. To build a useful and reliable simulated world for AI research, it is critical that you not introduce major defects (artifacts) into the simulation. Learning algorithms are notorious for finding devious ways to “cheat” researcher’s goals. If something in the simulation is non-physical, you can pretty much bet that your genetic algorithm or neural network will find that defect and use it to its advantage, avoiding the more difficult, “honest” approach you are trying to develop.

Boundaries between regions in Second Life, especially in the case where the regions are separated by network lag, are places where the physics of the simulation break down in nasty and difficult to predict ways. One reason for this is that events in Second Life have no concept of operative time. An event is sent over the wire, and the receiving node assumes that this event is happening ‘now’, in relation to that node’s local concept of time. This creates some issues on the client side (perhaps I’ll post about that later), but more fundamentally, it’s a problem at the server level. Region modules in Opensim pass messages back and forth between each other, for instance posting the position, rotation, linear and angular velocity of objects, so that you can visualize what is happening across region boundaries. Since these messages are subject to server lag, each sim in effect has its own version of reality. In my sim, your objects are delayed by the average network lag time between our sims; in your sim, my objects are similarly delayed. Clearly this is not acceptible if our goal is to have a coherent, realistic, detailed simulation of the environment.

Open Croquet, an alternative virtual world platform, has developed a concept of distributed, synchronized simulation that sounds pretty good to me (I haven’t actually deployed it, so I’m taking some of this on faith. Decide for yourself: http://www.opencroquet.org/index.php/TeaTime_Architecture).

In summary, I hope I’ve managed to outline some of the features and requirements that need to be considered for the development of sophisticated, high-fidelity simulated worlds in the context of a massively distributed, shared environment. In the future, I hope to post some ideas on what we can do to support these concepts in future releases of Opensim and realXtend.

Artificial Intelligence, OpenSim, realXtend , , , , , , , , , , , , , , ,

Mix virtual and real with some SHASPA

February 23rd, 2009
Comments Off

CTN wrote last week that SHASPA was launched, now we have more information to share.

SHASPA is an innovative platform and set of services that a blend of emerging technologies such as wireless sensors, social networks, virtual worlds and electronic games can plug into to create applications which integrate, visualise, monitor and manage the physical and virtual environment.

shaspa_1

SHASPA has been devised by a partnership between Swiss entrepreneur Oliver Goh and the Serious games Institute at Coventry University. Today’s technologies in 3D immersive environments enable us to better visualise and understand the world around us and the SHASPA platform provides creative developers working on the integration of physical and virtual worlds to develop and share new applications which foster better energy management, greater understanding of physical processes and the creation of intelligent shared spaces capable of delivering high value services to individuals working in those spaces. Over the next coming weeks, SHASPA will be announcing a number of showcases across the globe.

shaspa_2

I am going to install SHASPA to my own home as soon as I get the needed hardware in place and I will report the results here. The installation means that the home as a physical place will get a virtual counterpart. The virtual home should not be mixed with mirror reality systems, where the virtual space is meant to be an exact copy of the real space.

shaspa_3

The aim of the installation is to have a SHASPA powered home that will be:

  • connected with other SHASPA homes (using the Opensim grid mode – I can pay a virtual visit to my friend’s home)
  • controlled and observed from the virtual world, or from my mobile phone (how much use this is depends on how well the house is sensored)
  • sending a twitter feed on important events. (temperature dropped below recommended minimum, etc)

shaspa_4

SHASPA is not limited to home use. The target group contains also enterprises, offices and basically any real estate. CTN is going to write more about SHASPA in the near future.

Download SHASPA presentation slides here (20 Mb).

OpenSim , , , , ,

Shaspa Opensim grid launched

February 18th, 2009

shaspa-logo-512-whiteSHASPA is an intelligent shared space. Intelligent shared spaces are locations (physical or virtual) which deliver a set of highly personalised services to and build / manage relationships between entities (individuals, devices, systems, agents or combinations of these) active in those locations. Intelligent shared spaces act as hubs to social and business networks and support their sustainable development both environmentally and commercially.

Shaspa was launched just last week. I am in talks with Shaspa and I expect to soon post more info about what it is.

OpenSim, Uncategorized , , , , ,

Green Phosphor gives CICP to Public Domain

February 16th, 2009
Comments Off

The purpose of this article is to publish a provisional patent application I filed back in March 2008. The provisional covers Content Injection and Control Protocol, which I created to allow Green Phosphor’s data visualization application to interface with virtual world platforms (see previous article on CICP here).

I recently asked the Slashdot readership whether I should fork out the additional $10k it would take to properly complete the app, since I am releasing CICP to the public domain anyway. Despite a large number of trolls saying I was stupid to ask such a question on Slashdot, I received a lot of very good advice; and it sums up to this: publish the work, and as prior art it protects the protocol. I think this is important. Not only is CICP useful for business applications to produce 3D user interfaces within virtual worlds; it is a predecessor to MXP (see previous article on MXP here). MXP has the potential to tie together many worlds and programs into one metaverse. The MXP project is seeking developers… go to http://www.bubblecloud.org.

Without further ado, here’s the publishing of the provisional patent application for CICP. CICP is for all.

Darkstar, OpenSim, realXtend , , , , , , , , ,

sim on demand – Part 2

February 15th, 2009
Comments Off

To give you an impression before your own first try, here is a straightforward “from zero to sim” recipe.

Step 1 – signup

Start at http://simondemand.ec29.com/index.html.


start

Create a new account or login to your existing one:

amazon-login

After subscribing, save/print this page for reference:

amazon-startinfo-mit-key

Step 2 – start the launcher

Download simondemand following the link on the pages (it is version r4 right now).
Download and unzip to a local folder.
You will need Mozilla firefox. If it is not installed, now is the righ time to install it.
You will find a batch-file wich is used to start up the “launcher”.
If you have trouble and are running a 64bit Windows, edit the .cmd-file. Instructions what you need to change are inside the file.  

starten

start2-runbat

You get this info for your amazon account at https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&action=access-key

 Step 3 – choose/configure sim
Open the launcher.
Choose region numer, standalone vs. grid name prefix and details as you want.

launcher

Hit “open sesame”

launcher2-key

 

There you are…. 
You have all login details, as well as the hostname used to login e.g. for vnc/ssh.
And – wonder (it did choose free coordinates on its own), they are online:

regions

and yes, we can teleport there:

region

Step 4 – login into server

A cool solution is the web embedded vnc-viewer.  You use it with a link like:
http://ec2-12-345-67-89.compute-1.amazonaws.com:5800/ultrasigned.vnc
where ec2-12-345-67-89.compute-1.amazonaws.com is the name of your amazon instance you got by the launcher.

web-vnc

The initial password is  the one of the “avatar” you used for creating the regions.
You can use regular vnc on port 5801, as well.  The cool part of the webvnc is the integrated filetransfer, so a terrainfile or oar-file transfer is quite simple.

filetransfer

Step 5 – some content please 

So, we stand on this empty region

oar-1

Now just upload a .oar using the web-vnc tools.

oar-2

and load-oar….  and – amazing fast – content is in place

oar-3

And with the upcomming viewer extension to handle oar… that will be even easier..  :-)

 All done

I hope you did like the small intro. Try it yourself. Upload a oar-file, rename the region – just play with it.
And pause and resume as you want.
On demand.
Remember: make sure your instance is stopped (pause), if you do not want to have the (paid) service up and running.

Cheers,

Ralf

Article represents personal opinion – trademarks apply – www.ralf-haifisch.biz

Links:

http://sim.ec29.com/Features.html  - features and some technical “how to connect” info.

OSGrid, OpenSim , , , , , , , ,

Experiences from Operating a 3D Region Server in OSGrid – Part 2

January 31st, 2009
Comments Off

This part covers the networking.

I already wrote about Sizing and other perspectives in Part 1, but the networking was the part that did need the most investigation before coming to the conclusions.

Network uplink

The network connection quality is one of the main factors for the user experience. The user experience is likely to be bad, and the reason is probably the lack of knowledge of how the internet interconnections are organized (I talk about AS, BGP and other, VLAN´s, VPNs). I want to give some figures on data collected, and some rules of thumb:

  • Over 50ms lag is not good enough, over 80ms is really bad. Latency really matters. 
  • (number of avatars * number of avatars)*30kbit is about the slowest acceptable uplink speed (slow rezzing after tp, slow display of changes in region)

aufzeichnen2

aufzeichnen3

In total, Opensim does not cause much traffic. A usual hosting offers more traffic than memory, in terms of what Opensim needs. Very important is the latency to the main peers.

Main peers are typically the Grid server (at Electrip Sheep Company for OSGrid), maybe the plaza´s (at cari.net), your own regions, neighbors and the potential users. For german region operator the connection to t-com (wich has the biggest customer base via t-online) is very important. For everyone, a performant uplink to Level3 covers grid and plazas. So a fast Level3 and T-com uplink at your host location will almost guarantee a good user experience for german and most US-based users).

This example is from one of my production servers, it´s hosted at serverloft. It holds 9 Simulators with 30 regions. The Sharkland regions are well known, at least in the german community and cover 2 sandboxes, of witch one updates to new SVN builds 2 times a day, so there is quite some traffic. I did data collection up to 2 weeks, but this one is a very goog example, because I was on travel and there is not to much influence by updates and managent of the server. There is , however, http traffic (getting new SVN version) and ftp-traffic (pushing this versions to a hidden archive after compile and testrun) you will see in the detail charts. My regions are LSL-Email enabled, that is why you see the email traffic.

aufzeichnen4

aufzeichnen5

Traffic that is not needed for this purposes is blocked by a firewall, so it does not influence the statistics. Click pictures to see them better!

aufzeichnen6
aufzeichnen7

Very interesting to me is, that we have siginificant amount of traffic with 9 and more hops (~50%).  Latency will get a more and more important topic in 3D web and maybe lead to a redesign, but IPv6 slowly taking over now will have impact on this as well (ahem, do we have IPv6 support in server/viewer?).

Main content transport is by TCP (handshake), but much of the traffic is fast (blind unsecured) UDP traffic.

This is not to bad from a speed perspective, if there are re-sync mechanism for the recovery after failing to receive some packets. That is in the center of interest in a heterogonous network. We have seen this with the teleport problems in OSGrid as it is a very heterogenous network. These problems do not occur in a homogenous network like second life or some commercial closed Opensim networks. Diva did some nice work on that and for my impression, the REST-style interregion comms is a good decision.

aufzeichnen8
aufzeichnen9

aufzeichnen91

aufzeichnen92aufzeichnen93

OSGrid is maybe the best place for RL-companys to test their new ideas.  If you expect prompt customer service and ideal user experience for gaming, its maybe not. If you are into the 3D-market (for content, hosting or other service), it seems to be a very good choice.

For private user and organizations, considering an opensim -expirienced region-hoster is the way to a good user experience. For development, learning and testing, home hosted regions are still a good choice.

A very interesting thread about server sizing and avatar costs on resources and why its not a linear calculcation can be found at the OSGrid forums. http://osgrid.org/forums/viewtopic.php?f=9&t=710&start=0&st=0&sk=t&sd=a

Cheers,

Ralf

OSGrid, OpenSim , , , ,

Experiences from Operating a 3D Region Server in OSGrid – Part 1

January 28th, 2009
Comments Off

As I outline in the last post, OSGrid is an open grid – servers and user are located on different connections to the internet. While this is very common to the internet, it is quite uncommon to the 3D gaming/virtual world communites.

digitalworld_600

OSGrid is comparable to the real life usage of the internet. There are users with different locations and connection types (http://osgrid.org/forums/viewtopic.php?f=3&t=694). The servers are spread over the world, some clustered (like my rental regions and the rental regions next door are at the same provider) – some even hosted from homes (comparable to a company VPN). What are the differences?

Influences on operating a 3D Internet service based on Opensim

  • Skills of service operators

I guess, you know good and bad webhosts. Servers with high and low speed, websites that are up almost all the time – and a website, which is down every 10th visit. Maybe even a forum that loses all the content after a crash. We will see all this in the near 3D future, since many people with low to none server operations skills and knowledge try to make revenue.

  • Selecting suitable hardware for a region server

After tests with ~ 15 hosting providers, where I chose different setups, I can say: Memory matters. CPU affects scripts and avatar count. Network affects stability, teleport/border crossing, avatar count and loading times of objects/textures – maybe the highest impact on user experience.

Memory has influence on possible script and item loading and to avatar count. I do not want to point on speed after beginning to swap. Do not think of opensim as a apache. “Memory burst” will not work on VPS systems – only guaranteed memory can be counted. In general, direct access memory (like in Hyper-V, Xen) is faster than VPS. A interesting discussion in view of memory is the “memory leak”, witch I judge to be not bigger than in outlook. There are dead process witch can count up, but I have seen systems with hundreds of “zombies” running for months in former times. The memory leak (if there is a significant one) can be easily handled by a daily restart, it is a good idea to have for doing a backup (closes files and finishes transactions) anyway. There IS a rising memory usage – but opensim does cache objects in the region – so to be sure whether it is a leak, a developer has to be involved in monitoring.

aufzeichnen1

One point I did find but could not drill down: memory usage is changing as avatars come in and out. However if there are less than 200MB of free RAM, systems tend to get instable – block teleports and all sorts of weird things. (tracked with system monitor on Windows and monit on linux).

Operating System & CLR-Framework

I want go into depth here, because this tends to get into a religious kind of discussion. I have no personal preference, besides I prefer an easy to use, comfortable and affordable desktop/laptop.

Finally the systems based in Windows Server 2008, Vista, Server 2003 and XP with the .Net framework 3.5 did make the most points. I did NOT yet test Windows 7, still need to play with my download. J On the Linux side, OpenSuSe 11.1 with no modification did run perfectly stable (32bit and 64bit) and was performing well. Windows vs Linux must be a decision based on the operators administrative knowledge. There are people running linux system with no firewall and maleware protection and discuss content theft in forums. If a company would do, they would have trouble based on a compliance audit (BSI Grundschutz, ISO 27000x – I don´t even think about PCI if it comes to payment systems) and maybe even legal problems (3rd party rights).

Database

For the everlasting discussion on sqlite vs. Mysql I just want to give a short statement. I did read all(!) database related articles from last 2 months in OSGrid forums and run some benchmarks with both databases. Mysql is faster. Mysql needs own resources (memory) to be fast. Mysql has more well known tools. SQLite needs no setup. SQLite is self contained and robust. If you are a starter to opensim or regions should be as portable/easy to handle as possible, sqlite is your friend. If you run multiple regions on a well equipped server and have maybe some Mysql background, use Mysql. I did not test MSSQL, but would think of results comparable to Mysql, at least.

The second part to this article covers the networking perspective – wich is a much bigger issue.

Cheers,

Ralf

Data collection did include public information requests, testing cloned regions for user experience while monitored, monitoring of CPU/RAM/uptimes, Monitoring of network traffic, comparison of stability/performance based on 32 vs 64bit, different operating systems and different hosting providers.

Article represents personal opinion – trademarks apply – www.ralf-haifisch.biz

OSGrid, OpenSim , , , , ,