Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Product updating

Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-26-2008 13:09
What's the simplest way to do a product update. I need an object to check (proably once a day, and on rez) to see if there's an updated product, and then deliver that product update to the user. Thanks in advance.
Laurence Corleone
Registered User
Join date: 12 Oct 2006
Posts: 126
03-26-2008 13:47
The following requires 1 prim as a "server" that will never be taken back into inventory as it relies on that prim's UUID to never change, which it will if it is ever rerezzed.

http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryProductUpdateServer

With a bit of coding you could have the server send it's UUID to a MySQL database or store it in a flat file and have the client check this database or flat file to retrieve the UUID.
_____________________
There are no stupid questions, just stupid people.
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-26-2008 14:23
From: Laurence Corleone
The following requires 1 prim as a "server" that will never be taken back into inventory as it relies on that prim's UUID to never change, which it will if it is ever rerezzed.

http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryProductUpdateServer

With a bit of coding you could have the server send it's UUID to a MySQL database or store it in a flat file and have the client check this database or flat file to retrieve the UUID.


That would be ok if servers never rebooted, but with server crashes and updates and such, it's impossible to rely on a prim's instance id since even if I never de-rez it, the UUID will change when the server is rebooted upon crash or update... but thanks anyways...
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
03-26-2008 16:25
From: someone
the UUID will change when the server is rebooted upon crash or update


AFAIK, it's not supposed to, but your point is still valid, it's probably not safe to rely on a UUID being fixed. You need to have some fixed information in your products though, or this can't work. I used to do it with an email address, so my products would send an email to a fixed address (off-world), which would then forward the email to the 1-prim server (in-world). If the UUID changed, I updated the email forwarder. This will work as long as the email address stays valid.

These days I use a URL as the fixed piece of information. The products check in once a day, and the information is stored in a MySQL database. When I need to send out an update, another script walks the database, finds the people who have that product, and send them the update. This will work as long as my domain name does not go away.
Tyken Hightower
Automagical
Join date: 15 Feb 2006
Posts: 472
03-26-2008 16:27
From: Johan Laurasia
That would be ok if servers never rebooted, but with server crashes and updates and such, it's impossible to rely on a prim's instance id since even if I never de-rez it, the UUID will change when the server is rebooted upon crash or update... but thanks anyways...

I highly recommend this method, actually, because if you want something different you're going to need to set up your own external server, and get into PHP for it aside from the LSL scripts required. Even if the sim crashes, your object will retain its UUID and resume its state with no problems. The only way it fails is if you pick up the server object, however, you can still attach it and drop it in a new sim to move it without changing its UUID. It's relied upon by a great many serious products.
_____________________
Johan Laurasia
Fully Rezzed
Join date: 31 Oct 2006
Posts: 1,394
03-27-2008 22:07
Oh? I was under the impression that wasnt the case... I'll give it a try and see... Thanks, because I really dont want to get into PHP and MySQL because I dont have a domain to work with that allows me to run PHP.

Thanks again.