Saturday, November 17, 2007

IDTP: too early or not too late...

We had a very useful discussion yesterday with Teravus on IRC regarding my IDTP experiments.

I'll try to squeeze the guts into a RegionModule - looks like it is a very nice place, and could be made loadable by those who want it.

There's however a very interesting "philosophical" point which we discussed. The point of view that it is too early for such a thing - given that a lot of "basic" stuff does not work yet. This I totally agree with (that the basic stuff does not work), however, the areas of trust and interdomain relationships will require a lot of further thinking and experimenting - I would be naive to tell that the IDTP itself would solve the world hunger. No, IDTP merely opens up a large can of worms, and it would be a huge pain for the users if it was introduced later as an additional "feature" once the things do work. And given that everything would be hopefully solidified by that time, any incompatibilities will result in "chewing gum and matches" workarounds - which is what plagues so many RL software items - "get the features done first, and the security thing, we'll take care of it once we get the functionality done".

For my own memory, the worms in a particular order:

- the trust model - first of all, how do you ensure that John Doe from NowhereSim is really John Doe ? Do you trust that NowhereSim is NowhereSim, and not a rogue impersonation of that ? Do you trust that the sim SweetHome, to which you are going to TP, is really the SweetHome, and not EvilJerks, pretending to be SweetHome ? What do we do to avoid the need of all-to-all sim authentication (well, social network of trust seems to be the most appropriate approach to me here)

- policy enforcement glue for the grid mode - even though there the trust is largely assumed anyway - which is why in my opinion the grid mode is not workable - all it takes is a single miscreant, and the whole concept will be poisoned forever.

- the "little" detail of distributed inventory - right now the assumption is that there is a central repository, which simply pulls takes the LLUUID, and spews out the contents, or takes the contents and LLUUID and stores them somewhere. This kind of abstraction is nice and convenient, but with the growing number of agents it quickly falls apart unless given a significant financial investment for the infrastructure - this is something that I'd consider as a potential risk - the existence of the central money-sucking infrastructure.point. I'd rather think the very same amount of money should be transacted by the entities comprising the "constellation", allowing each individual owner to establish their own policies (and prices, if necessary) for the resources. Then the market would take care of itself, and if there is The Best inventory hoster, or such - eventually they would be able to come afloat and have a sustainable business model.

- micropayments - well, I do not even go there yet. it's a meta-worm - with some annoying RL tentacles.


In a nutshell - I'll start refactoring the code as the RL permits (not very promising), and will try to stick it into a regionmodule.

Dalien's top20 places to visit in SL

It's cool these days to make ratings, put up hit parade lists, and use other means to try to look like Srs Bsns. I figure I'd join the fun, and publish you a top20 list too. I'm lazy, so I just drop in the list of SLURLs here - if you are bored and feel like it, go and check them out, and tell here what this list is worth - I have no idea :)


  1. http://slurl.com/secondlife/Apollo/63/47

  2. http://slurl.com/secondlife/PhatLand/206/56

  3. http://slurl.com/secondlife/Svarga/48/96

  4. http://slurl.com/secondlife/Bare Rose/156/115

  5. http://slurl.com/secondlife/Avilion Grove/204/40

  6. http://slurl.com/secondlife/Midian City/79/12

  7. http://slurl.com/secondlife/Transylvania/186/87

  8. http://slurl.com/secondlife/Babeli/129/101

  9. http://slurl.com/secondlife/Midnight Reflections/131/52

  10. http://slurl.com/secondlife/IceDragons Playpen/181/211

  11. http://slurl.com/secondlife/Toxia/37/165

  12. http://slurl.com/secondlife/Gallii/113/57

  13. http://slurl.com/secondlife/Sanctuary Rock/164/73

  14. http://slurl.com/secondlife/Badlands/200/127

  15. http://slurl.com/secondlife/Eros Exotica/175/150

  16. http://slurl.com/secondlife/Wales/155/218

  17. http://slurl.com/secondlife/Rose Gardens/120/179

  18. http://slurl.com/secondlife/Natoma/162/68

  19. http://slurl.com/secondlife/Shinda/16/211

  20. http://slurl.com/secondlife/Isle Of Lesbos/49/113



p.s. a few of those appear to be offline on closer examination... The names are still there though, so maybe it is temporary..

p.p.s. How this list was constructed, will be revealed in an appropriate time frame, if ever.

Tuesday, November 13, 2007

Git as a local tool for "staged commits"

Very interesting. I am using the git locally to help with my own "mess management" (i.e. to allow me to backtrack to the last "known good state"), and was wondering about reasonable way to actually perform the commits to SVN from it.

So, here it goes: http://ropeonfire.blogspot.com/2007/10/using-git-svn-with-mono.html

The open question though is, whether it is really a good idea to squash a few small commits for the subtasks into a single large one... From the understanding perspective of each individual commit - no, it's better to have smaller commits. From the perspective of having less "noise" in the log, it would be nice to have bigger chunks though. (Assuming they do not overlap).

Hmm... maybe it is a convention thing... Just create a unique prefix for each "task", and start the commit logs with it. Then it will be possible to view the smaller commits logically grouped together.

Git on windows

I must say that I start to like git more and more - it was very handy with the IDTP coding.

Now, there is opinion that it is unfriendly for windows users... Well.. I think I found a nice fork off it, which does not require cygwin..

http://code.google.com/p/msysgit/ - indeed no warranties, and all... :)

Interdomain teleports, revised.

This is going to be one hell of a geeky post :)

Ok, after a lot of bloody experiments (blood was mine, that is), I have the interdomain teleports working.

Needless to say, I will need to completely rewrite it, but at now I have a pretty solid proof it works :)

So, the first edition of the architecture is below. (when I talk "grid" further on, the standalone setup works exactly the same).

Suppose we have a sim in the local grid (LS), where we are, and sim on the remote grid (RS), where we want to get. The grid coordinates can be the same for the two. Also, each of the two grids defines two regions, I call them "Area51" - they are being used as a transit area for the teleports. Hence the name :) Let's denote them "A51L1", "A51L2", "A51R1", A51R2". If we consider the teleport from LS to RS, we can forget for a moment about the A51R1/2 - they are not needed, only local transit areas are used.

The RS has the URL, "http(s)://x.x.x.x:pppp/sim/RS-name" - where x.x.x.x is the address of the http listener holding the RS. (the one you would use in loginuri). We denote this "RS-TP-URI" (as belonging to the RS).
There is also another URL used for the interdomain teleport to the RS, "http(s)://x.x.x.x:pppp/interdomain-teleport/RS-name" - we denote it as "RS-ID-URI"


The process is as follows.

1) The user brings up the "Map" window while being on LS, and in the "name" editor pastes the RS-TP-URI. The flag "ID teleport pending" for this client is reset to "false"

2) LS detects that it is an URI-based simname, and does not do the local search, instead falls back to the next step.

3) LS fills in the XML data structure, denoting the key of the user requesting teleport, RS-TP-URI, possibly the credentials from the user/source sim, and performs an HTTP POST request to the RS-TP-URI. This happens in the background while the user is awaiting for the search result to pop up.

4) RS receives the request, verifies that the domain where it is allows the interdomain teleports, and fills in the reply - echoing the agentID, also the following info: RS-ID-URI, RS's name/location/external endpoint, regionID, regionHandle, and also the cookie - which will be used subsequently for verification that the request is not spoofed. Also can include the map of the sim for showing on the map.

5) LS checks the grid coordinates of the RS, and picks one of the two A51L's - the one that does not overlap with RS in grid coordinates. Let it be A51L1. After that, it formats the map block with coordinates of A51L1, and sends it to the user. At the same time, the structure InterdomainTeleport is being created, which holds the reply for further use, and the flag "ID Teleport pending" for this client is set to true.

6) The user selects the desired location on the RS's picture, and clicks "teleport".

7) The regular teleport function checks, if the "ID TP pending" flag is set. If it is set, some more info is stuffed into the "InterdomainTeleport" structure - namely, delegate functions for running before/after TP, position, and lookAt values.

8) The teleport proceeds as normal - note, that since we've specified the coordinates of A51L1, we're going to land there first.

9) There's a hook on the "UseCircuitCode" function, which checks, whether there is a pending IDTP. It would be reached (I think:) once we have successfully landed on the A51L1. If there is a pending IDTP, then the control is passed to the IDTP module. (also, since there can be more than one of these messages, ensure to react only on the first one).

10) IDTP module calls the "before TP" delegate, and then fills in the TeleportRequest, which it submits via HTTP POST to the RS-TP-URI - we have received it in step 5. Also it sends the "Start teleport" to the client. The Teleportrequest is basically the same idea as in the gridmode/standalone mode - request for the RS to start accepting the client packets.

11) RS checks the cookie, and if everything is ok, prepares itself, and sends the positive reply.

12) LS receives the reply, sends the "teleport" request to the client with the grid coordinates of the RS, and the IP endpoint of it. Then it sends another POST request to the RS-TP-URI with the additional parameter "final" - which will not return until the RS sees the client (i.e. "UseCircuitCode" seen by the RS). In the prototype version it is just a delay.

13) when the reply from RS is received, the LS knows that the client is already hanging "one foot" on the other grid, so now is the time to clean up. LS triggers the "SimDisable" messages for the sims on local grid, and (since they do not seem to do jack, apparently), also triggers the forceful disconnect of all the client's agent connections to the local grid.

14) At this stage the client is fully sitting on the remote grid, so the LS can delete the "InterdomainTeleport" structure and return to initial state.


Some observations:

1) If you think that the function which is called "CloseConnection" closes the connection to the client - no way. It does not :)

2) There's no good infrastructure for doing REST-like talk. The built-in library is dead buggy on mono - passes away after a few HTTP requests... So I had to hack around the ObjectPoster class - by implementing a callback method. (so 12 is a callback, and 13 is a callback upon the request done by a first callback :) Also made a couple of few methods to simplify the work with the XML-encoded requests and replies.

Notes:

1) The "post + dual post" is deliberate. It allows to hook something else onto the GET handler (i.e. if the user just navigates to the RS-TP-URI with a browser, and also will allow to "jump out" of the firewalled or non-interdomain-enabled sims, if necessary.

2) There is currently possibly a bug when the client jams into the already existing circuit - everything is normal, except you are walking in the middle of the sea. Since I finally managed to fully disconnect the client upon the teleport, normally it should be no big deal.

With my experimental code (no selection of A51, no access control check), I've fired up 3 standalone sims, and had been jumping around with 2 clients. Did around 10 hops or so - seems to work.

3) physics when TP-ing can play funny tricks :) be careful.

Sunday, November 11, 2007

Artificial ants: simple rules and complex behaviours

And now that I am on the youtube raid... one more interesting video I've found:

The neat part is that each ant has very simple set of rules, yet the system as a whole gives the impression of "purposeful" behaviour. Strangely enough, with humans the tendency seems to be the opposite.


Immersive environments... with a tongue in the cheek

:) Make sure you watch the other episodes as well.

Opensim Physics tests on osgrid.org

Ok, today there we had a lot of fun.

First, we logged in:

Snapshot_001

Then we started chatting a bit:

Snapshot_002

Then someone from the folks put up a pile of colorful cubes with physics, and dropped a huge ball on it, so the things started to fly all over sim:

Snapshot_003

Then we throw a few bombs, to cover up (thanks nebanon for the video!):




And finally, there was a huge mess, so we put it up for sale. It's cool and colorful. So it's worth a lot of money!

Snapshot_004

Any buyers ? :)

Saturday, November 10, 2007

A few interesting comparisons of Mercurial and git

Being a curious and lazy beast at the same time as I am, I was wondering what the world has to say about another distributed SCM - Mercurial (hg). And as the traits are best seen in contrast, I was looking for the "Mercurial vs git" info.

Well, the harvesting did bring some interesting results.
http://www.jukie.net/~bart/blog/git-vs-hg shows an interesting comparison alongside with a few more links, which I won't reproduce here - go and read for yourself.

From what it seems, neither is terribly superior to the other, probably more a matter of personal preference.

I very much like the fine-grained modularity of git - it goes very well with my own philosophy that instead of having a single entity that attempts to do everything, one is much better off with a lot of small tools, each doing only one thing, and doing it well.

But since so far I've used it just as a local version management control tool, hard to say.. Well, I guess the time will show.

Friday, November 9, 2007

Git impressions, part 1

To give some news on git (as I said, I started playing with it):

I've pulled in the opensim repository with the changes via git-svn (the whole business is around 200mb - not sure if the SVN storage is much better), branched off the release where my previous experimental code was, put the diff there, and rebased that branch off the latest version (200+ commits ahead). RL things do take their time, so the resolution of the merge conflicts (around 5-6 places) was merely into successful compile - rather than something working. But the whole process was very quick.

Given that the "commits" into the git go locally - IMHO this makes it very viable at the very least as a local "helper" platform for better flexibility, complementary to SVN. One can do many tasks at once in separate branches - switching between them is a breeze.

As a wholesale deal - I've also installed some beast called "qgit" - the gui to browse/search commits (separate package). allows to browse the changes fairly quickly.

I am quite pleased so far - although this is indeed quite basic usage, will need to see bit more how it works out.

The rebase today (reapplying the changes I made yesterday, onto the today's fresh checkout) went without any need for manual intervention, with a single command:

$ git-checkout teleport
Switched to branch "teleport"
$ git-svn rebase
M OpenSim/Region/ClientStack/ClientView.API.cs
M OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs
M OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
r2304 = 23102815f47624d6f0cba0274302e11e010d9245 (git-svn)
M bin/OpenSimAssetSet.xml
r2305 = 1739baaedcd750ff768014289470f89769d625d7 (git-svn)
M bin/OpenSimAssetSet.xml
r2306 = 19566b7e39ec001b572e1bb730b5a9878e486b48 (git-svn)
M OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
M OpenSim/Region/Physics/Manager/PhysicsActor.cs
M OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
M OpenSim/Region/Environment/Scenes/ScenePresence.cs
r2307 = 1cf771ea6af379fd6ea461f91c640551313298fc (git-svn)
M OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
r2308 = 78ea566a282cd58a91a29d0d1f24db2a282dc70e (git-svn)
M OpenSim/Region/ClientStack/ClientView.PacketQueue.cs
r2309 = a693db9165ca881b94e971df25754c3eda6ab557 (git-svn)
M OpenSim/Framework/Communications/LoginService.cs
r2310 = d05e6d59e7fe4562f18f227caf72ae7b200de0ae (git-svn)
M OpenSim/Framework/Communications/LoginService.cs
r2311 = fe0cbbc15634d38380c25314990d23ccab26dc3c (git-svn)
M OpenSim/Region/ClientStack/ClientView.cs
r2312 = 8796cd87cd32b4c38ee34db5cd2674f3c25457cc (git-svn)
M OpenSim/Region/ClientStack/ClientView.cs
r2313 = 6cbec5269c486c0f502c55e665a62dd93f78bc33 (git-svn)
M OpenSim/Region/ClientStack/ClientView.cs
r2314 = 6ed08cd9f685740920ccb3f252571dd19ed71db5 (git-svn)
M OpenSim/Region/ClientStack/ClientView.cs
r2315 = 6ffbf70e55f31ae30e834ed947c27b9012f8af0c (git-svn)
M OpenSim/Region/ClientStack/ClientView.cs
r2316 = 87155e023edd3d9ae6482bd4cbf1c1a606b6a824 (git-svn)
First, rewinding head to replay your work on top of it...
HEAD is now at 87155e0... * Protip: Commit AFTER compiling.

Applying Some teleport code

Adds trailing whitespace.
.dotest/patch:25: public IInterDomainCommunications InterDomain
Adds trailing whitespace.
.dotest/patch:71:*
Adds trailing whitespace.
.dotest/patch:136: *
Adds trailing whitespace.
.dotest/patch:173: public bool InformOfArrival(string magicCookie, ulong regionHandle, AgentCircuitData agentData, LLVector3 position, bool isFlying)
Adds trailing whitespace.
.dotest/patch:175: if (OnArrival != null)
warning: squelched 7 whitespace errors
warning: 12 lines add whitespace errors.
Wrote tree 515a3b62544b5313f4693e3b00a4b778f3a36714
Committed: cfcc3fc5b25dc25f18caa1c9295c7eceac77c44b

Applying Fix the failed build (restructured namespace)

Wrote tree 3768941bd8fd7d2d1e8f0a240f3cc34433b59348
Committed: bb5771d7e1ec4901e737bab48d3cbe8a0eb79e49
$

(this little log also highlights some git cleverness about the whitespace changes - which is very good thing to have).

Tuesday, November 6, 2007

Trying out git...

Thanks to Sean Dague for mentioning git on the opensim-dev maillist.

It's been long time I wanted to try it out, but watching Torvalds' video gave it a new kick.

Apparently it is somewhat similar conceptually to some self-written hack I've been using for a while now. So, the hack will now be buried - the funerals will be quick and modest.

I'll write more once I have more impressions.

A random noise about common sense, but without any trace of it

Reading the comment of Taran on the post on virtuallyblind about the agelock, I thought - indeed, if all was done with a common sense in mind, it would all be so much easier...

But the reality is, everyone has his own "common" sense - and the laws are merely an attempt to formalize this in a way which would look "common sense enough". Note, that with the time this sense does change.

With the internet village in mind, this brings a funny construct - a law system, which would be automatically constructed, based on the, say, the average of all of the "locally acceptable" behavioral spaces, as defined by everyone in the village. The results would be collected and automatically processed, forming the "lawful" behaviour for the next time interval.

Could be a good idea to adjoin it with the tax collection - which can be much less in that case, since the lawmaking function is essentially automated.

But since making the personal copy of the laws is going to be even more boring than filing up the tax form, there would be a set of outsourcing companies which would help to offload this function.. You come, you consult them, and get your copy of the law to be submitted.

In the simplest case, with application of the exactly the same strategy for all the customers of any given "lawmaking consult", all of them get the same kind of "personal law". So, it would be pretty much exactly the same as the current political parties.

And they can sell their "lawmaking product" to the citizens, who would then advertize the brilliant qualities of it on the internet. Now, of course, in order to be effective, they would need to not only have a good package, but also have a bulk of the customers - to have enough weight.

Which would be achieved the same way it is done in any business - by good price and good quality.
This way the incompetence will automatically go out of business just by means of normal economic competition.

Now, that was an easy case. Consider the scenario when the "lawmaking co." is offering the custom services to each customer. The results of such an exercise at large would be the end behavioural space which is closest to what the majority desires - i.e. a perfect law system.

Now, we just have to learn how to capture and encode these acceptable behavioral spaces from everyone within their lifetime, at least.

Sunday, November 4, 2007

A geek comic...

Stubled across Peter Stindberg's blog and via the link of the map of the internet (entertaining by itself), came onto the xkcd.com. (As you know, I am very ignorant when it comes to comics, so do not know anything besides Dilbert).

This is hilarious. And the vast majority of the other ones.

Getting rid of an UFO over the parcel...

Yesterday I had some quite interesting experience which I would like to share - maybe it helps someone.

There's a piece of land where I can do some stuff, but I do not have the ownership of it. The permissions on land are quite relaxed - scripting is enabled, building is enabled as well, however, to avoid the littering-by-ignorance, the land is set to autoreturn in 120 minutes.

Note, that as I am a member of the group the land is set to - so the autoreturn does not affect my stuff. (It's mostly only me who plays around on that plot, anyway).

I've not been spending the time on SL for quite a while, and last time noticed there was some strange particle effect over the parcel. "Hmmm... I've set it to autoreturn! Let's check..."

Indeed the land is set to autoreturn, and yet the small blue clouds of smoke are directly over the parcel. Not catastrophic at all, but a little bit annoying - somehow the autoreturn has been circumvented...

Selecting my object which sits in the corner of the parcel, and then extending the selection over the area reveals the secret - there's a flying transparent ball, which has the particle effects inside.

And, on each cycle, it flies *outside* of the parcel, so the autoreturn timer gets reset. Amusingly clever, I say. Although probably it is just a result of a random ignorance. From my experience, when the other people seem evil, it's about 1% of the time they are really evil, all the rest 99% they're just happily ignorant. But, let's see what we can do.

The first thought is to try to build a hollow cube to contain the movements of this little evil thing. Alas - the little evil thing, besides being transparent, is also physical and phantom, so it flies through the cube without any trouble.

Next lazy thing is to try to IM the owner - well, no reply... Writing angry blog about griefers putting the junk over my parcel ? that wouldn't help at all... filing an AR ? That's too boring. Let's be creative and think...

Ahha! I remember, that when this UFO was selected, it *stopped* moving. So, the plan is clear: select the object while it is over "my" parcel, and patiently wait for 2 hours :)

First part was very easy, the second part proved to be a bit more difficult - as I did not login to SL for quite a while, there were a couple of friends willing to show their new stuff, so I lost the focus. Nonetheless, finally I told myself "I am not moving until 2 hours elapses. Let me sacrifice myself for the sake of science".

Then I left the SL for a while "editing" that object, then a good friend IMed me and we spent quite some time discussing the geeky stuff. So the 2 hours had passed. The object does not disappear. Bummer. The friend tells it is a nice known feature. Well, after more thinking this feature indeed seems logical - you would not like the object to disappear from your nose in the sandbox or such.

So, let's try the luck - and release the edit... and - puff.

The UFO vanishes from the airspace above the parcel - maybe gets returned to owner, maybe decides to fly back to the stars.

Great. The goal is achieved, and no martians have been hurt in the process.

Saturday, November 3, 2007

Prokrastination

This would describe the day pretty well. Instead of doing something planned to have been done, the day is spent in some typing. Oh well, I'm a fast typist, the process and the results were incredibly amusing, and my random generator now has a lot of fresh entropy - so it is good on all fronts.

But I should probably keep an eye on this hobby - or at least find the ways to monetize the entropy.

SL travels: Rose Gardens

Some quick exploration...

Rose Gardens/153/129/26

Nice piece of work. Although I suspect the guy would not feel really too convenient... but hey, it's art nonetheless. :) Lots of trees, colors, and such. Nice music, dance balls.

place: Rose Gardens/120/179/26

Friday, November 2, 2007

My celebrity lookalikes...

Funny. There must've been a reason I experimented with a girly avatar for a few days a long while ago :). Most of them match around 50%. I wonder which 50% do they match of the two :)

Via M is for Myg.



p.s. in case you wondered, my RL looks are slightly photoshopped to match the size of the face of the avatar.

LA flights are now flying in SL

Stumbled on the secondrussia.ru (the text is in russian). One of the possible sources - SLNN.

Basically, seems like now the folks from SL can look at the airspace above the LAX (Los Angeles International airport) inworld, almost realtime.

Although the pic on the russian site does show the 3d view of the airspace, and the SLNN article mentions the "zooming" on the aircraft - I wonder whether this kind of location is the most practical form :)

Flying all around the sim, trying to find the aircraft is more of an entertainment value, than practical use. At least they should provide a convenient billboard which would TP the interested avatar into the current location of the plane, so they do not have to search for it :)

The next step is to equip the airplanes with built-in translucent LCD screens in the windows - so the passengers could see the glazing avatars on the outside :) But this is much more expensive. And there might be some nervous types out there who might not like it :)