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
4
votes
0 answers

Which is better static function return widget or stateless widget

As it clear from title, which one approach is better, static function in class returns custom widget, or stateless widget class? example for static function returns custom widget: class FormComponent { static Widget defaultFromField( …
Shady Boshra
  • 2,521
  • 3
  • 23
  • 35
4
votes
2 answers

If HTTP is stateless why do I need to close a database connection?

A commonly problem I see in lots of web languages is that database connections need to be closed otherwise the number of total connections gradually increases and then it grinds to a halt in whatever form. HTTP is stateless, when the request has…
Tom Gullen
  • 61,249
  • 84
  • 283
  • 456
4
votes
1 answer

How stateless server can keep session state on server side?

I'me reading Marting Fowler's famous book Patterns of enterprise application architecture to systematize my knowledge. I've read chapter Session and States and I a bit confused. In the first part of the chapter author recommend to use stateless…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
4
votes
1 answer

keras lstm difference stateless and stateful

I am trying to understand the concept of LSTM layers in Keras. I just want to confirm some behavior of LSTM and check if i understand it correctly. Assuming that I have 1000 samples and this samples have 1 time step and i have a batch size of 1…
D.Luipers
  • 127
  • 1
  • 11
4
votes
5 answers

Java Persistance Application Stateless vs. Stateful

I am new in JPA and I can't understand the use and the difference between stateless and stateful. Any experiences? regards, Haythem
Haythem
  • 417
  • 4
  • 13
  • 20
4
votes
1 answer

SignalR AspNetCore Unable to connect to the remote server ---> System.Net.WebException

I am facing a problem while connecting to SignalRHub from my SignalR client application, below given is the error log- info: Microsoft.AspNetCore.Sockets.Client.WebSocketsTransport[0] 02/01/2018 15:20:13: Connection Id…
4
votes
1 answer

Can someone explain the difference between @Remote / @Local or only @Stateless in ejb?

I guess the topic says it. I have tried googling this, but havent gotten the answer I am looking for. I have many EJB's with only @Stateless. And sometimes I put @Local on them withouth really knowing why, and the benefits/cons. I also know I can…
Shervin Asgari
  • 23,901
  • 30
  • 103
  • 143
4
votes
1 answer

Stateless Micro services and database

We have a requirement of building stateless micro services which rely on a database cluster to persist data. What is the approach that is recommended for redundant stateless micro services(for high availability and scalability) using the database…
4
votes
3 answers

Use ehcache for application deployed via docker against the stateless rule

I have an spring-boot application which I would like to deploy it into multiple docker instances and there is a load balance before the instances. However, the application uses ehcache to cache some data from a database. It makes the application…
alan
  • 69
  • 6
4
votes
1 answer

React Stateless components - performance and PureRender

Everyone says that it uses stateless components will improve application performance. I noticed, however, that the use of stateless component in the wrong place can really reduce application performance. This happens because the stateless…
Piotr Białek
  • 2,569
  • 1
  • 17
  • 26
4
votes
1 answer

HttpServletRequest injection on RequestScoped bean CDI

I'm looking for a way in order to inject a @RequestScoped custom class into my @Stateless JAX-RS endpoint: I want each time the application receives a request my custom class is injected in my JAX-RS endpoint. Custom class: @RequestScoped public…
Jordi
  • 20,868
  • 39
  • 149
  • 333
4
votes
1 answer

Indicating kmodule.xml to drools

I am developing an application using Drools 6.1.0. I create a stateless session: KieServices kieServices = KieServices.Factory.get(); KieContainer kContainer = kieServices.getKieClasspathContainer(); kSession =…
Luisetelo
  • 106
  • 2
  • 9
4
votes
2 answers

REST URIs for a Rule Engine (stateless engine)

I need some guidance for designing REST URIs for a rule engine. There are a set of rules defined and stored in the back-end system in the form of XML files. These rules are grouped into various categories and a set of rules get executed based on the…
dinup24
  • 1,652
  • 3
  • 16
  • 26
4
votes
1 answer

Does session-based authentication break the stateless architecture constraint of a REST web API?

I'm designing a REST web API using Django REST Framework and I'm using session-based (for AJAX) and token-based authentication for mobile clients (Android). But I'm wondering wether the session-based authentication isn't breaking the RESTful…
Braek
  • 581
  • 5
  • 22
4
votes
2 answers

Stateless Objects good practice or not

This is my understanding about stateless objects:Any object created from class that doesn't have class variables is a stateless object. My question is when should we write stateless classes. Is it a good habit to have stateless objects.
user2990315
  • 271
  • 1
  • 5
  • 11