Questions tagged [stateful]

A stateful app is one that stores information about what has happened or changed since it started running

A stateful app is one that stores information about what has happened or changed since it started running. Any public info about what "mode" it is in, or how many records is has processed, or whatever, makes it stateful.

489 questions
117
votes
8 answers

Stateless vs Stateful

I'm interested in articles which have some concrete information about stateless and stateful design in programming. I'm interested because I want to learn more about it, but I really can't find any good articles about it. I've read dozens of…
Team-JoKi
  • 1,766
  • 3
  • 15
  • 23
51
votes
3 answers

How to dispose of my Stateful Widget completely?

I call my stateful widget page and get some info from the server. If no info found it warns the user that there isn't any info. From the drawer back button, I go back to the previous page. If I keep repeat back and forth very fast I get an error on…
Nick
  • 4,163
  • 13
  • 38
  • 63
34
votes
4 answers

ReactJS difference between stateful and stateless

I am trying to understand the exact difference between React's stateful and stateless components. Ok, stateless components just do something, but remember nothing, while stateful components may do the same, but they remember stuff within this.state.…
Socrates
  • 8,724
  • 25
  • 66
  • 113
29
votes
2 answers

TensorFlow: Remember LSTM state for next batch (stateful LSTM)

Given a trained LSTM model I want to perform inference for single timesteps, i.e. seq_length = 1 in the example below. After each timestep the internal LSTM (memory and hidden) states need to be remembered for the next 'batch'. For the very…
verified.human
  • 1,287
  • 3
  • 17
  • 26
22
votes
4 answers

Difference Between Deactivate and Dispose?

In Flutter, StatefulWidget has dispose() and deactivate(). How are they different?
Michael Yuwono
  • 2,452
  • 1
  • 14
  • 32
21
votes
2 answers

Akka Streams: State in a flow

I want to read multiple big files using Akka Streams to process each line. Imagine that each key consists of an (identifier -> value). If a new identifier is found, I want to save it and its value in the database; otherwise, if the identifier has…
vicaba
  • 2,836
  • 1
  • 27
  • 45
20
votes
4 answers

Stateful LSTM and stream predictions

I've trained an LSTM model (built with Keras and TF) on multiple batches of 7 samples with 3 features each, with a shape the like below sample (numbers below are just placeholders for the purpose of explanation), each batch is labeled 0 or…
Shlomi Schwartz
  • 8,693
  • 29
  • 109
  • 186
19
votes
1 answer

Understanding stateful LSTM

I'm going through this tutorial on RNNs/LSTMs and I'm having quite a hard time understanding stateful LSTMs. My questions are as follows : 1. Training batching size In the Keras docs on RNNs, I found out that the hidden state of the sample in i-th…
H.M.
  • 261
  • 3
  • 8
19
votes
5 answers

How good and/or necessary are Stateful Web Services?

What kind of server do you people see in real projects? 1) Web Services MUST be stateless: Basically you must send username/password with every request, every request must use HTTPS and I will authenticate and load the User object everytime if…
TraderJoeChicago
  • 6,205
  • 8
  • 50
  • 54
16
votes
2 answers

Using a Stateful Session Bean to track an user's session

it's my first question here and I hope that I'm doing it right. I need to work on a Java EE project, so, before starting, I'm trying to do something simple and see if I can do that. I'm stuck with Stateful Session Beans. Here's the question : How…
StepTNT
  • 3,867
  • 7
  • 41
  • 82
15
votes
3 answers

Meta programming: Declare a new struct on the fly

Is it possible to declare a new type (an empty struct , or a struct without an implementation) on the fly? E.g. constexpr auto make_new_type() -> ???; using A = decltype(make_new_type()); using B = decltype(make_new_type()); using C =…
Kijewski
  • 25,517
  • 12
  • 101
  • 143
15
votes
1 answer

Stateful EJBs in web application?

I never used stateful EJBs. I understand that a stateful EJB can be useful with a java client. But i wonder: in which case to use them on a web application? And how? Should we put these stateful beans in Session (because of stateless http)? Is it…
Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419
13
votes
3 answers

Java: Tracking a user login session - Session EJBs vs HTTPSession

If I want to keep track of a conversational state with each client using my web application, which is the better alternative - a Session Bean or a HTTP Session - to use? Using HTTP Session: //request is a variable of the class…
bguiz
  • 27,371
  • 47
  • 154
  • 243
13
votes
3 answers

Stateful vs. Stateless Webservices

Imagine a more complex CRUD application which has a three-tier-architecture and communicates over webservices. The client starts a conversation to the server and doing some wizard like stuff. To process the wizard the client needs feedback given by…
Christopher Klewes
  • 11,181
  • 18
  • 74
  • 102
13
votes
1 answer

Differences : @SessionScoped vs @Stateful and @ApplicationScoped vs @Singleton

I would like to know, what are the principal differences between : javax.enterprise.context.SessionScoped and javax.ejb.Stateful javax.enterprise.context.ApplicationScoped and javax.ejb.Singleton I know that a @SessionScoped and a @Stateful allows…
gokan
  • 1,028
  • 1
  • 14
  • 30
1
2 3
32 33