stateful

Are WCF services stateless by default?

匆匆过客 提交于 2019-11-29 09:57:32
I've got a simple WCF service that lets clients/consumer applications log in by providing a username and password. If both the username and password are correct, the WCF service provides the client with a GUID. The GUID and the username are then stored as a key/value pair within the WCF service. From here onwards, the client sends their GUID with every request as a means of identification. Since I'm storing the key/value pair in a Dictionary/Hashmap, this approach would only work if the WCF service is stateful. Question is, are they stateful by default or is there something I have to do to

Stateful vs. Stateless Webservices

蓝咒 提交于 2019-11-29 09:21:07
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 the server. We started a discussion about stateful or stateless webservices for this approach. I made some research combined with my own experience, which points me to the question mentioned later. Stateless webservices having the following properties (in our case): + high scalability + high availability + high speed + rapid testing - bloated

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

别等时光非礼了梦想. 提交于 2019-11-28 23:30:42
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 javax.servlet.http.HttpServletRequest //UserState is a POJO HttpSession session = request.getSession(true); UserState state = (UserState)(session.getAttribute("UserState")); if (state == null) { //create default value .. } String uid = state.getUID(); //now do things with the user id Using Session EJB: In the implementation of ServletContextListener registered as a Web

Can I assume allocators don't hold their memory pool directly (and can therefore be copied)?

你。 提交于 2019-11-28 10:11:08
I'm writing a container and would like to permit the user to use custom allocators, but I can't tell if I should pass allocators around by reference or by value. Is it guaranteed (or at least, a reasonable assumption to make) that an allocator object will not contain its memory pool directly, and hence it would be OK to copy an allocator and expect the memory pools of the allocators to be cross-compatible? Or do I always need to pass allocators by reference? (I have found that passing by reference harms performance by a factor of > 2 because the compiler starts worrying about aliasing, so it

Stateful Web Services

流过昼夜 提交于 2019-11-28 05:54:22
问题 I'm building a java/spring application, and i may need to incorporate a stateful web service call. Any opinions if i should totally run away from a stateful services call, or it can be done and is enterprise ready? 回答1: Stateful web services are a pain to maintain. The mechanism I have seen for them is to have the first call return an id (basically a transaction id) that is used in subsequent calls. A problem with that is that the web service isn't really stateful so it has to load all the

Are WCF services stateless by default?

你。 提交于 2019-11-28 03:15:33
问题 I've got a simple WCF service that lets clients/consumer applications log in by providing a username and password. If both the username and password are correct, the WCF service provides the client with a GUID. The GUID and the username are then stored as a key/value pair within the WCF service. From here onwards, the client sends their GUID with every request as a means of identification. Since I'm storing the key/value pair in a Dictionary/Hashmap, this approach would only work if the WCF

Why is it bad programming to use a stateful webservice and why would it be allowed?

北战南征 提交于 2019-11-28 01:53:17
I have a need for a stateful webservice in our organization. However, everywhere I read online says that building a stateful webservice is bad programming but nothing ever says why. I guess I don't understand what is so bad about it. I also don't really understand why they would give a work around to allow you to have state in a webservice. So I guess that my question is, why is it bad programming to use a stateful webservice and why would it be allowed? The whole purpose of a web service is to deliver a piece of functionality in one transaction in a way that is highly scalable. This means

Understanding stateful LSTM

守給你的承諾、 提交于 2019-11-27 20:41:08
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 position within the batch will be fed as input hidden state for the sample in i -th position in the next batch. Does that mean that if we want to pass the hidden state from sample to sample we have to use batches of size 1 and therefore perform online gradient descent? Is there a way to pass the hidden state within a batch of size >1 and perform

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

折月煮酒 提交于 2019-11-27 14:49:42
问题 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 javax.servlet.http.HttpServletRequest //UserState is a POJO HttpSession session = request.getSession(true); UserState state = (UserState)(session.getAttribute("UserState")); if (state == null) { //create default value .. } String uid = state.getUID(); //now do things

Stateful EJBs in web application?

泄露秘密 提交于 2019-11-27 11:58:54
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 a good practice? (without debating too much about stateful vs stateless) ewernli Funny enough, it's a 2nd question on SFSB and web app for the day, while this topic is usually not that common. in which case to use them on a web application? The traditional example of SFSB and web app is the shopping cart. But at the same time, you can do the same with