Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Web initiated events -> objects? (push, not poll)

bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
03-13-2009 07:36
I am looking to control some in-world objects via clicks on the in-world or external web browser (not web on a prim).

What I have read about XML-RPC is 'forget it' :)

Are there good methods to initiate a connection to in-world objects from the web server side? I realize objects could poll a web server every 5 - 10 seconds, etc, but would rather see if the web side can "push" to given UUIDs... The application needs to be very interactive, so I am trying to avoid the delays that could come from a lengthy poll duration.
_____________________
Bucky Barkley -- Mammal, Scripter, Builder, Lover
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-13-2009 07:47
Quite right. XML-RPC...forget it. In server version 1.27 we should get HTTP-In which will allow HTTP calls to LSL scripts (with the help of some kind of URL registration service). You might just have to hold out until then.

It IS possible to use XML-RPC as a kind of unreliable notification mechanism. That is, a RPC call simply gives the script a hint about when to poll for data. However, you'll still want to poll occasionally without receiving RPC calls just in case. I'm not entirely sure if XML-RPC is working at all right now or if it is just really flaky, so you might want to test whether you can get ANY call through before implementing a full solution. And whether you want to mess with this when HTTP-In is "right around the corner" might be a tough call. I wouldn't. I haven't. Polling has so far been a better option, and I'm holding out.
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
03-13-2009 08:34
I think the implementation of XMLRPC itself actually works fine. The problem is that it is tricky to use. I have experienced problems where an RPC seemed to fail because there was an ampersand character (&) in the text. When it was encoded to the HTML entity (&) it worked fine. Similarly, any angle brackets (< >) unsurprisingly cause the same kinds of problems.

Beyond discovering and working around those issues, I've never had a problem with it. Granted, I've never used it for really high-volume stuff, which is maybe where the problem comes in for other people. It does work though.
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
03-13-2009 08:50
I agree..like Pedro, I haven't used RPC with real high-volume, but I haven't actually ever had a problem with it working. I AM looking forward to HTTP-In however lol, I'm just not sure whether to trust that it will show up on time, or be working when it shows ;)
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-13-2009 11:05
I'm very curious why XmlRpc is being called unreliable here. I'm using it for several things and have never seen any problems at all. I'm not trying to use it for high-volume communications, but for what I use it for it seems to be reliable and reasonably performant.

If I just wanted to use it to trigger periodic events on an in-world objects, I'd use it without reservation. I probably wouldn't try to use it for anything that required more than a few requests per minute, though.

.
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
03-13-2009 22:13
The Lindens themselves speak of it in pretty disparaging terms, and the flakiness of XML-RPC is supposed to be one of the big motivators for HTTP-In.
ElQ Homewood
Sleeps Professionally
Join date: 25 Apr 2007
Posts: 280
03-14-2009 03:30
From: RobbyRacoon Olmstead
I'm very curious why XmlRpc is being called unreliable here.

.


Well, I've always figured the people that have such a problem with it are into real high-volume use, lots of data coming in, constant flow in-world stuff. Myself, I may continue to use XMLRPC, if it's available, even when HTTP-In gets here. I've just never had it flake on me I guess, and will probably feel differently once it does LOL
Cryas Tokhes
Great Googley Moogley...
Join date: 8 Feb 2006
Posts: 124
03-17-2009 08:01
The best method that I have found is that if you are using php for your webside scripting, then you simply use an email function in php to send an email to the object in world.


It's best if you had a mysql database that stored the object's key in-world, then the php script pulls the information from that on what it needs. Putting together something like that is extremely easy. If you have gotten this far to know what you are looking for, the rest should fall into place.

Look at: http://us3.php.net/manual/en/function.mb-send-mail.php

Remember that emails can be delayed on your webserver up to 30-45 seconds on bad days. However my average is about 4-5 seconds.
bucky Barkley
Registered User
Join date: 15 May 2006
Posts: 200
03-17-2009 08:09
From: Cryas Tokhes
The best method that I have found is that if you are using php for your webside scripting, then you simply use an email function in php to send an email to the object in world.


Yep, I am aware of llEmail(). The key word in my OP is "interactive" :-) - the app has a web component that needs to launch some functionality inworld.

I am looking forward to seeing the http-in functionality on the main grid in 1.27. This will be very significant.

Bucky (SL) / Daniel
_____________________
Bucky Barkley -- Mammal, Scripter, Builder, Lover
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-17-2009 08:27
From: bucky Barkley
Yep, I am aware of llEmail(). The key word in my OP is "interactive" :-) - the app has a web component that needs to launch some functionality inworld.

I am looking forward to seeing the http-in functionality on the main grid in 1.27. This will be very significant.

Bucky (SL) / Daniel

e-mail could be used to launch inworld functionality, it's all in the parsing.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Love Hastings
#66666
Join date: 21 Aug 2007
Posts: 4,094
04-27-2009 23:06
From: Hewee Zetkin
In server version 1.27 we should get HTTP-In which will allow HTTP calls to LSL scripts (with the help of some kind of URL registration service). You might just have to hold out until then.


Is it confirmed to be in that version? Any idea when it rolls out?
_____________________
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
04-28-2009 09:18
From: Love Hastings
Is it confirmed to be in that version? Any idea when it rolls out?

So we've been told. As for getting a timeframe for the server roll-out, when are we EVER given that?
Love Hastings
#66666
Join date: 21 Aug 2007
Posts: 4,094
04-28-2009 09:26
From: Hewee Zetkin
So we've been told. As for getting a timeframe for the server roll-out, when are we EVER given that?


Heh. No vague hand waving though? Weeks? Months? Years?
_____________________