Jump to content

What is the best way to communicate between 2 objects?


Kaylan Draken
 Share

You are about to reply to a thread that has been inactive for 4785 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi all, I have a question about communication between prims. What function can be used to communicate between 2 prims in 2 different sims without using a external server? i did read somewhere (but cant find it anymore) that it can be done with llEmail but thats its not reliable.
Link to comment
Share on other sites

If they are within 96m you can llShout() across the sim border.

Failing that making one (or both) of them HTTP Servers is the most reliable means of communicating between sims.  (See llRequestURL(), llReleaseURL(), llHTTPRequest() and llHTTPResponse() in the wiki)

Email is ok, but slower.  It does sometimes seem to 'stall' until the script is reset.  Solution to that is to have your script deliberately reset itself every now and again.  As the email address is the object's key it won't change.  If you tried the same trick with HTTP your URLs would be released and you'd be stuck

  • Like 2
Link to comment
Share on other sites

it's actually fairly reliable, although there used to be occasional isues with e-mail going down for a region.

the caveat is that unless you use some external service to update the e-mail address, you can never de rez the recieving object, because it's key will change... you can however move it accross region borders safely.

ETA:
I would not depend on it for mission critical communications.... although you can do quite a bit to ensure that it's being recieved.

  • Like 1
Link to comment
Share on other sites

The only ways that I'm aware of are, as you mentioned, a remote server or llEmail(). The linked page mentions that there is a bug (jira link says that this bug will not be fixed) that makes llEmail() unreliable for inter-region messaging.

So, basically, you'll either have to deal with the unreliability, or get an external server.

There are many sites out there that provide free hosting with a sizable amount of bandwidth and server-side scripting support (most notably PHP), so don't write off external servers due to cost.

Link to comment
Share on other sites

I have almost never had problems with E-mail.  Once in a very great while, SL's e-mail service will hang up, but that is infrequent in my experience.  I take care to be sure that at least one of the communicating prims is locked and no mod, and I tend to make it transparent and bury it in something else if I want prying eyes to be unaware of its existence. That one can act as a server for others that might be less permanent.  If one of the other communicating objects does need to be re-rezzed occasionally, you can have it send a "Here I am" message to the other (hidden, secure) one on rez, updating its UUID and re-establishing 2-way communication.  I've done that where I need to have HUDs able to communicate across sim lines.

Link to comment
Share on other sites

actually there is one other way to do entirely inworld interregion communications.... although it can get pretty complex....

http with e-mail moderated DDNS....

it works like this:

you have a single prim that acts as a DDNS server... it proccess emails, and returns the desired address via http... when a nodes http address changes, the node fires a message via email to the DDNS prim. the DDNS sends confirmation back via http, and if successful, updates the nodes address. other objects can request a node via email, and the DDNS server will try to send the information back to the requester (using a return address specified in the request, could be email, http, or even region say), and the requester SHOULD store that, and continu using it until it fails, before requesting an update.

you can add some more checks in there to report region outages, or even set up your own network of routed messages.

  • Like 2
Link to comment
Share on other sites

I looked at the external DNS options and they certainly seemed kludgy and add a third party or expense (if you want to do it yourself).

How does Linden expect this to work? Obviously, the design document considerred this use case.

How do I find a server off somewhere in the world without going out of grid?

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4785 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...