Archive

Archive for June, 2011

Delving deeper into Jconsole and VisualVm

June 27th, 2011 1 comment

Jconsole and visual VM help monitor java applications in any environment. Here are a few additional details that can help you monitor your java applications better

Jconsole and permissions:

Jconsole lists the PIDs of local java applications when you start it. But what if there are java applications that are running under a different user ? Jconsole will not display those java PIDs that do not belong to the user who started Jconsole. The JConsole FAQ lists a few troubleshooting tips to get around this problem. You can alternatively expose the Jconsole connection through a remote port using the -Dcom.sun.management.jmxremote.port property. Securing the remote JMX URL with a username and password should do the trick.

Viewing Jconsole / JMC Beans with VisualVm:

Categories: java Tags: , ,

Protobufs and other custom formats

June 13th, 2011 No comments
Developers on the web increasingly deal with remote APIs. SOAP Web services / REST rest services are consumed by a myriad of consumers. What format this communication should be carried on is a matter of debate. Each format has its own pros and cons. Inevitably any format that is sent / received from the service needs to be serialized and deserialized. There is a cost associated with this process and the bulky nature of payloads (XML is pretty verbose for example) becomes a factor too. To address these problems you can switch to alternate formats such as google protobufs and message pack.


Pros of using custom formats:
  • A lighter payload
  • Better serialization / deserialization performance
  • Payload is not verbose
Cons:
  • Lack of tooling / plugins can be a cause for concern
  • Debugging the format over the wire can prove troublesome
Categories: java Tags: , , , ,