Tim Moores

Saloon Keeper
+ Follow
since Sep 21, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tim Moores

Throttling means only to allow a limited number of client threads to be active at any given time. That might mean limiting the number of server threads available to this service, and having all other client requests wait. That ensures that requests that do get serviced finish in a reasonable time (because you're avoiding overloading the server infrastructure). It doesn't mean that overall throughput rises, though, because in addition to the servicing time requests now also spend time waiting for a server thread to become available.
9 hours ago
What is the difference between java application and into runnable? A runnable jar file would seem to constitute a Java application.
11 hours ago
Assuming the calls are legitimate, you may need to throttle the service so that no more than N requests are serviced at any one time. If there's no chance to speed up the code, you could move the service to its own server, so that it's not impacted by whatever else is going on on that server.
3 days ago
The code that deals with reading the file, just like you did with the previous code.
3 days ago

if (a.equals(fis))

This line does not make sense. Nothing in the file can be equal to the FileInputStream. You need to read an item from "ois" (which is currently unused) and compare it to that.
3 days ago
That file format looks like serialized Java objects, in which case you will need to find a description of what was serialized in it, and how. Or, much better, find the code that wrote it - if it contains classes other than those in the Java class libraries, you will need those as well.

Be aware that serializing Java objects can fail if the JVMs doing the writing and reading are not of the same version. (That's why serialization should not be used for long-term storage.)
3 days ago

I am stuck at the start how to read

Have you done Java file I/O before? If not, start reading here: https://docs.oracle.com/javase/tutorial/essential/io/

What does the file format look like?
3 days ago
What do you have so far, and where are you stuck making progress?

I suggest to start with the code that reads the file, and then stores it into appropriate data structures. Only once that works, think about how to structure the GUI.
3 days ago
Yes, if a view is returned, you wouldn't consider it a REST request/response. Of course, plenty of web sites -particularly those implementing SPA- return the data from which the view is constructed as response to an XHR request - those could be considered REST as well. But if the view is constructed fully on the server, HTML and all, and replaces the current view, then it's not.
3 days ago
Depends on which attack vectors you're trying to guard against (and of course on whether using the encrypted or unencrypted string is the more common operation).

Is keeping strings encrypted in RAM a reasonable precaution given the kinds of attacks you're trying to prevent? In other words, does keeping the strings from someone who has access to the RAM of the machine make sense, given if that attacker has penetrated the machine so profoundly? Keeping them encrypted in RAM only makes sense if the password to decrypt them is not in the RAM at the same time, and preferable not even on the same machine, given that it would be so deeply penetrated.
5 days ago

Lakshman Arun wrote:Is your API depends on more IO and more computation needs (complex logic), then would suggest Java, for simple rest apis Node JS is good
With some example, for apis like which gets product description/user review comments Node JS is a better candidate. For APIs like, getOrderTotal Java Rest is a better choice

Both these have low complexity, and low I/O and CPU needs, so I don't see much of a difference. Not that I think a complex logic argues for using one language over the other, mind you.
5 days ago
Welcome to the Ranch. What ideas have you had?
6 days ago
VisualVM does everything JConcole does, and much more, so the latter is not much of an option. The first drawback is that it requires the JMX ports to be open, which may or may not be an issue for you. The bigger drawback is that it's a GUI tool, so it requires someone to spend time using it. Don't get me wrong, it's a great tool, but for continuous monitoring you need something automated. https://github.com/psi-probe/psi-probe is another tool I like for monitoring servlet containers (and which I use in production).

For automation you could create background jobs that use JMX to gather relevant data, and which trigger emails, SMS and/or other alerts as warranted.

BTW, J2EE is a VERY outdated name, it's been called JEE since version 5 came out in 2006 - 12 years ago!
6 days ago