Questions tagged [stateless]

Stateless apps don't expose any information about what has happened or changed since it started running

Stateless apps don't expose any information about what has happened or changed since it started running. They give the same response to the same request, function or method call, every time. HTTP is stateless in its raw form - if you do a GET to a particular URL, you get (theoretically) the same response every time. The exception of course is when we start adding statefulness on top, e.g. with ASP.NET web apps :) But if you think of a static website with only HTML files and images, you'll know what I mean.

521 questions
3
votes
1 answer

Auto scale Service Fabric Stateless Service?

Is there any way to set up auto scaling of stateless services in Service Fabric? I know you can add more nodes to the cluster using Scale sets and auto scaling, but what about adding more instances of a service to the cluster as traffic…
Nick
  • 99
  • 7
3
votes
2 answers

Stateless component to toggle boolean

What is the proper way of converting the following codes to stateless component? export default class About extends Component { state = { showKitten: false } handleToggleKitten = () => this.setState({ showKitten: !this.state.showKitten…
Yen Sheng
  • 695
  • 1
  • 12
  • 28
3
votes
1 answer

observer design pattern in rest aplications

I'm trying to learn design patterns, and I have come with the Observer pattern. I think I understand the concept itself, but I don't see when to use it. I try to explain myself. I work mostly with web applications, so, stateless applications.…
Albert Cortada
  • 737
  • 3
  • 10
  • 25
3
votes
1 answer

Better debug console output for errors in react StatelessComponent

The new react 0.14 StatelessComponent is nice. However, when there is an error in its render method, react only prints this to the console: Uncaught Error: Invariant Violation: Objects are not valid as a React child (found: Mon Nov 23 2015 06:00:00…
philk
  • 2,009
  • 1
  • 23
  • 36
3
votes
1 answer

What happens to transaction if SessionScoped and Stateless method calls are mixed

What happens in following scenario if error occurred in DStateless.method4() or BSession.method2()? I want that CStateless.method3() and DStateless.method4() share the same transaction. Is it permitted to make such calls in EJB and CDI…
Tony
  • 2,266
  • 4
  • 33
  • 54
3
votes
1 answer

Can i have both ISession and IStatelessSession side by side?

Consider a transaction-per-view model where with an IHttpModule i open a transaction using a standard ISession. Now, i have a page where i want to do some batch operations. Since IStatelessSession is preferred for batch operations: Can i have both…
Jaguar
  • 5,929
  • 34
  • 48
3
votes
1 answer

Does stateless only transfers client's state to somewhere else?

I have spent a whole day understanding what stateless architecture is. I read many posts and answers like Can My Web App Implement User Login and Remain Stateless? Pros and Cons of Sticky Session / Session Affinity load blancing strategy?…
JaskeyLam
  • 15,405
  • 21
  • 114
  • 149
3
votes
2 answers

When working with stateless objects, is there still a performance benefit to marking them const?

Among other things, one reason for liberal use of const that I've seen is that, by ensuring that the value won't change, the compiler can more effectively optimize the resulting code. This seems reasonable (but I've also heard that the benefits of…
Kevin
  • 1,870
  • 2
  • 20
  • 22
3
votes
2 answers

How to invalidate user session on inactivity in a stateless server?

I'm building a stateless RESTful server backend in Java, that will be used by an AngularJS frontend. Since it should be stateless, I don't create sessions but generate access tokens, more precisely JSON web tokens, the client has to present on every…
Tim Büthe
  • 62,884
  • 17
  • 92
  • 129
3
votes
1 answer

PHP : Understand and implement a token-based authentication system

I have read a lot about it but i still don't completely get it. I may use a library of an existing solution in the future but i want to understand and implement my own system right now. In order to be stateless and scalable I think i mustn't store…
Exayy
  • 558
  • 4
  • 10
3
votes
0 answers

Is it acceptable to introduce volatile state into singleton beans?

I want to create proper stateless services, i.e., beans with singleton scope, but sometimes state creeps in. Current candidates in the application I work on are caching data keeping Futures for scheduled tasks around to be able to cancel them on…
musiKk
  • 14,751
  • 4
  • 55
  • 82
3
votes
1 answer

Can Castle ActiveRecord open a stateless session?

Real simply question: can Castle ActiveRecord open a stateless session? If so, how would I do it? And if not, how would I go about opening a stateless session without it?
Daniel T.
  • 37,212
  • 36
  • 139
  • 206
3
votes
1 answer

Any existing way to make sure beans defined in spring xml are stateless?

Working on a large size project, we started to use spring to manage our dependency injection. Since most dev are migrate from coding stateful class, we found some of stateless bean actually contain instance variables which themself are…
bing
  • 31
  • 1
3
votes
1 answer

Stateless incremental file hashing context resume

Question in short How can one "resume hash_context" in PHP? Background & Current Situation The software's goal is to receive big file chunk by chunk (synchronously), calculate both MD5 and SHA1 of that file and generate a download link (of the full…
George
  • 1,466
  • 3
  • 12
  • 30
3
votes
1 answer

Play framework How to reconcile Stateless with Session & Cache

I'm novice in Play framework, We said that Play 2 is fully RESTful - there is no Java EE session per connection. However, we can save data in different ways: Session, Flash or Cache! Does not exist any contradiction?! or I misunderstood…
Momog
  • 567
  • 7
  • 27