codecentric

International #TableTopDay at codecentric

TableTopDay_200x200

All the geeks at codecentric were pretty excited about TableTopDay, a table top board gaming holiday invented by the fine folks at GeekAndSundry, Felica Day and Wil Wheaton. As response to their extremly successful YouTube Show “TableTop”, which accumulated already over 8.5 million views, they proclaimed March 30th to be International TableTopDay. Over 2500 groups registered their event on tabletopday.com and so did we.

While I expected only codecentrics to attend, we ended with one guy working for one of our customers, one random guy who registered on our Google+ Event page and 4 strangers who showed up without any notice. But also all the codecentrics brought their families. It was successful and fun event, for us and for all board game nerds worldwide, as proven by the hashtag #TableTopDay, which was trending on Twitter the whole Saturday, and many people posting pictures or even livestreaming their event.

(read more…)

Fabian Lange

 

The CenterDevice Cloud Architecture

In this post I want to give you an insight into the architecture of CenterDevice, a document management and collaboration tool for the enterprise hosted in our own cloud datacenter in Germany. CenterDevice is a startup of codecentric, with a few codecentrics working full or part time on it.

Let me start with a screenshot from our AppDynamics monitoring.
centerdevice-architecture
(read more…)

Fabian Lange

 

Save Memory by Using String Intern in Java

During Attila Szegedis talk about “lessons learned about the JVM” at QCon London, I was surprised that he emphasized the importance of knowing the amount of data you store in memory. It is not common to be concerned about object size in enterprise Java programming, but he gave a good example of what they had to do Twitter.

Recap: Memory Footprint of Data

Question: How much memory does the String “Hello World” consume?
Answer: 62/86 Bytes (32/64 bit Java)!
This breaks down into 8/16 (Object Header for String) + 11 * 2 (characters) + [8/16 (Object Header char Array) + 4 (array length) padded to 16/24] + 4 (Offset) + 4 (Count) + 4 (HashCode) + 4/8 (Reference to char Array). [On 64Bit the size of String Object is padded to 40].

The Problem

Imagine you have a lot of Locations attached to tweets in your data store. The implementation of the location as a Java class could look like this

class Location {
	String city;
	String region;
	String countryCode;
	double long;
	double lat;
}

So if you load all the locations of tweets ever made, it is quite obvious that you load a lot of String objects, and at the scale Twitter has, there are for sure a lot of duplicate Strings. Attila said that this data did not fit into a 32 GB heap. So the question is: can we reduce memory consumption, so that all Locations fit into memory?
(read more…)

Fabian Lange