java - Best way to design web service, which have to store data from requests in list or similar structure -
My goal is to create a Java EE web service, which will take concurrent thousands (or more in future) requests and store data From the request in the list or similar structure, I want to store the objects in memory with the request, but it is not mandatory that some objects will be removed from every request and the selected data will be added to the structure. Web service will have two operations: Add framework and remove it from the structure. Removal requests will include values of object instance variables. I would probably have unique IDs or other one or more example variables to always delete an object (or 0 if the request is not valid) will have an equal value with the variable variable (s) Will be removed.
My idea is to use two EJBs first to be highlighted as a stable and web service, this will remove the object from the request and call the other EJB to add or remove the requested object from the data structure. . The second will be EJB @ Sittington and in the examples the steps to be removed from the requests will be the step arrelist & lt;> as I said it is not absolutely elite or a list.
I also thought about using an EJB, which should be @WebSharvi @ Sissington, but the document says that this combination is possible "but ... this definition is not defined by. "
Earning, your requirement is not completely clear. Assuming that you are preparing a high load application> I request 1000 per second:
Servlet-Processing
- Separate "Object" Datacenters In each user's http session (if http session is available)
- You add a synchronized list to http session and work on a synchronized private list on every request And add web client details to this http < P> Singleton EJB
- Li> Type your object type of type of extracted / filtered / processed object
- Add a list field to
- Based on a second archive for the HTTP-session references and unfiltered but the synchronized list
Timer EJB
- Create Timer EJB to run from time to time
- This function references all the referenced lists in the middle Will go through and will extract the necessary items and filters and ensure the cleanliness of the http session lists. The solution to the solution:
- Hold the memory load of users in your sessions
- Synchronizing / Mute speakers at very high loads, because you work with your timer EJB only on central and filtered lists in singleton bean.
- As long as you are able to last, your sessions are short lived
- There may be a CPU-intensive solution to filter and release of filtered objects. To keep IO intensive solutions are out of client requests and the client will not face a display problem.
- Timer schedule changes according to your needs
- A little more complexity
- You must clear your references in your refocus lists off the ssions from the HTC SE. Either by giving sessions and references to the list of sessions in the contemporary class or any other custom solution. If you do not clean, your heap will be blown in the context of lists of "killed" http sessions already.
Drawback:
Comments
Post a Comment