Welcome Guest, Not a member yet? Register   Sign In
how to keep received data between instances
#1

I need to capture the fact that i got a message which starts up a controller from a specific userid and the time. I am trying to not allow a single user to send a message twice in 10 seconds. Each of the messages starts up its own controller. I probably don't want to write to disk. Is there any Global variable that all the controllers that are spawned can read? I really don't have the language to describe this well.
proof that an old dog can learn new tricks
Reply
#2

@richb201,

You could definitely use a session variable. I don't know why you would have every message startup it's own controller instead of a controller that handles all messages?
Reply
#3

(This post was last modified: 12-20-2018, 01:54 PM by richb201.)

That is a good question. I have my application that sits there and get used by online web users. But there is a Chrome Extension written in JS that POSTS messages to myURL/Subit_backend/logger_survey which is a function within the Subit_backend controller, not the application. This file only wakes up when a message has been sent to it. It is as if it spawned.

On the session variable, lets say I have 4 of these logger survey functions running at the same time. They all need to be able to read and write to the session variable. I wonder if I should have them get access to the session variable sequentially?
proof that an old dog can learn new tricks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB