Lasso 9 - global variable replacement

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Lasso 9 - global variable replacement

Steven McIntosh
I was reading the documentation on threads, and um - yeah, didn’t understand it.

I have a situation where I store quite a bit of info in the session variables for users of an intranet site (example: a list of all staff is stored so it can be quickly pulled by a get with the employee id). There are quite a few (and some only store a small bit of info). The problem I’m having is that an administrator might go in and change a key piece of information and I need each user on the site to be able to reload those session variables from scratch if there has been a change to the data.

Previously, I would have stored a timestamp in a global variable like ($staff_loaded), and then I can just check that against a session variable for the last time that variable was updated from the database and reload the data if necessary.

Could someone recommend a method for doing this in Lasso 9?

I started creating an sql table with a stamp for each type of data to be loaded, but that would mean doing several extra data lookups each time a page loaded.



#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 9 - global variable replacement

Jonathan Guthrie-3
One way of doing that would be:

        define myglobalvar => 'a cool string'

Define that in your lasso startup, then change the definition as you need.

Was that what you meant?


On Jul 23, 2014, at 5:23 PM, Steven McIntosh <[hidden email]> wrote:

> I was reading the documentation on threads, and um - yeah, didn’t understand it.
>
> I have a situation where I store quite a bit of info in the session variables for users of an intranet site (example: a list of all staff is stored so it can be quickly pulled by a get with the employee id). There are quite a few (and some only store a small bit of info). The problem I’m having is that an administrator might go in and change a key piece of information and I need each user on the site to be able to reload those session variables from scratch if there has been a change to the data.
>
> Previously, I would have stored a timestamp in a global variable like ($staff_loaded), and then I can just check that against a session variable for the last time that variable was updated from the database and reload the data if necessary.
>
> Could someone recommend a method for doing this in Lasso 9?
>
> I started creating an sql table with a stamp for each type of data to be loaded, but that would mean doing several extra data lookups each time a page loaded.



Jono

----------------------------
Jonathan Guthrie
[hidden email]
@iamjono
LassoSoft Inc.
AIM Chatroom: lassochat

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 9 - global variable replacement

stevepiercy
In reply to this post by Steven McIntosh
Assuming the amount of data to store is not ginormous, I'd use a
single thread and a map.  Update the thread when needed.  Users
access the thread in real-time.

See:
http://lasso.2283332.n4.nabble.com/Global-variables-global-threads-configuration-tt4174284.html

--steve


On 7/23/14 at 4:23 PM, [hidden email] (Steven McIntosh) pronounced:

>I was reading the documentation on threads, and um - yeah, didn’t understand it.
>
>I have a situation where I store quite a bit of info in the
>session variables for users of an intranet site (example: a
>list of all staff is stored so it can be quickly pulled by a
>get with the employee id). There are quite a few (and some only
>store a small bit of info). The problem I’m having is that an
>administrator might go in and change a key piece of information
>and I need each user on the site to be able to reload those
>session variables from scratch if there has been a change to
>the data.
>
>Previously, I would have stored a timestamp in a global
>variable like ($staff_loaded), and then I can just check that
>against a session variable for the last time that variable was
>updated from the database and reload the data if necessary.
>
>Could someone recommend a method for doing this in Lasso 9?
>
>I started creating an sql table with a stamp for each type of
>data to be loaded, but that would mean doing several extra data
>lookups each time a page loaded.
>
>
>
>#############################################################
>Attend the Lasso Developer Conference 2014!
>October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
>http://www.lassosoft.com/LDC-newmarket-2014
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.StevePiercy.com/>

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 9 - global variable replacement

Steven McIntosh
In reply to this post by Jonathan Guthrie-3
Possibly—I’ve never tried some of these things.

I would need to change the lasso startup item when it changes? Would I then also need to restart the instance for the change to take affect?

I’d like to be able to have the initial value checked from a database, but then be able to change the value periodically by script.


On Jul 23, 2014, at 4:38 PM, Jonathan Guthrie <[hidden email]> wrote:

> One way of doing that would be:
>
> define myglobalvar => 'a cool string'
>
> Define that in your lasso startup, then change the definition as you need.
>
> Was that what you meant?
>
>
> On Jul 23, 2014, at 5:23 PM, Steven McIntosh <[hidden email]> wrote:
>
>> I was reading the documentation on threads, and um - yeah, didn’t understand it.
>>
>> I have a situation where I store quite a bit of info in the session variables for users of an intranet site (example: a list of all staff is stored so it can be quickly pulled by a get with the employee id). There are quite a few (and some only store a small bit of info). The problem I’m having is that an administrator might go in and change a key piece of information and I need each user on the site to be able to reload those session variables from scratch if there has been a change to the data.
>>
>> Previously, I would have stored a timestamp in a global variable like ($staff_loaded), and then I can just check that against a session variable for the last time that variable was updated from the database and reload the data if necessary.
>>
>> Could someone recommend a method for doing this in Lasso 9?
>>
>> I started creating an sql table with a stamp for each type of data to be loaded, but that would mean doing several extra data lookups each time a page loaded.
>
>
>
> Jono
>
> ----------------------------
> Jonathan Guthrie
> [hidden email]
> @iamjono
> LassoSoft Inc.
> AIM Chatroom: lassochat
>
> #############################################################
> Attend the Lasso Developer Conference 2014!
> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
> http://www.lassosoft.com/LDC-newmarket-2014
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Lasso 9 - global variable replacement

Steven McIntosh
In reply to this post by stevepiercy
I’ll read this (a few times) - thanks!


On Jul 23, 2014, at 4:44 PM, Steve Piercy - Website Builder <[hidden email]> wrote:

> Assuming the amount of data to store is not ginormous, I'd use a single thread and a map.  Update the thread when needed.  Users access the thread in real-time.
>
> See:
> http://lasso.2283332.n4.nabble.com/Global-variables-global-threads-configuration-tt4174284.html
>
> --steve
>
>
> On 7/23/14 at 4:23 PM, [hidden email] (Steven McIntosh) pronounced:
>
>> I was reading the documentation on threads, and um - yeah, didn’t understand it.
>>
>> I have a situation where I store quite a bit of info in the session variables for users of an intranet site (example: a list of all staff is stored so it can be quickly pulled by a get with the employee id). There are quite a few (and some only store a small bit of info). The problem I’m having is that an administrator might go in and change a key piece of information and I need each user on the site to be able to reload those session variables from scratch if there has been a change to the data.
>>
>> Previously, I would have stored a timestamp in a global variable like ($staff_loaded), and then I can just check that against a session variable for the last time that variable was updated from the database and reload the data if necessary.
>>
>> Could someone recommend a method for doing this in Lasso 9?
>>
>> I started creating an sql table with a stamp for each type of data to be loaded, but that would mean doing several extra data lookups each time a page loaded.
>>
>>
>>
>> #############################################################
>> Attend the Lasso Developer Conference 2014!
>> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
>> http://www.lassosoft.com/LDC-newmarket-2014
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy              Website Builder              Soquel, CA
> <[hidden email]>               <http://www.StevePiercy.com/>
>
> #############################################################
> Attend the Lasso Developer Conference 2014!
> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
> http://www.lassosoft.com/LDC-newmarket-2014
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>