codecentric Blog

blog.codecentric.de · Company blog · on HN since 2011

The engineering team at German consultancy codecentric writes about Java, JVM internals, databases, infrastructure debugging and software practices.

What HN saysHN links it for JVM memory and pointer-compression details, the OpenStack debugging story, Apple's goto fail bug, and GraphQL security. Commenters treat it as a useful technical reference.
70HN people shared it
14linked it in comments
275stories submitted
835story points
4 years agolast shared
2011people per year2026

Most-shared posts

  1. 1
    String Deduplication – A new feature in Java 8 Update 20
    5 people · 105 points · first shared 2014 · 39 comments on HN
  2. 2
    Dish-O-TRON – AI to detect dirty dishes in the sink
    3 people · 22 points · first shared 2020 · 5 comments on HN
  3. 3
    35gb heap less 32gb java jvm memory oddities
    3 people · first shared 2017
  4. 4
  5. 5
  6. 6
    MongoDB Text Search Explained
    2 people · 6 points · first shared 2013 · discussion on HN
  7. 7
    SMACK stack from the trenches
    2 people · 5 points · first shared 2017 · discussion on HN
  8. 8
  9. 9
    Application Performance Tuning Tips
    2 people · 4 points · first shared 2012 · discussion on HN
  10. 10
    Ad hoc polymorphism in Scala for the mere mortals
    2 people · 4 points · first shared 2017 · discussion on HN
  11. 11
    Running Spring Boot Apps as GraalVM Native Images
    2 people · 3 points · first shared 2020 · discussion on HN
  12. 12
    How to secure a GraphQL service using persisted queries
    2 people · 3 points · first shared 2020 · discussion on HN
  13. 13
    The broken promise of re-use
    2 people · 3 points · first shared 2015 · discussion on HN
  14. 14
    A Walkthrough of Data Version Control
    2 people · 3 points · first shared 2019 · discussion on HN
  15. 15
    Microservices with Nomad and Consul
    2 people · 3 points · first shared 2017 · discussion on HN

What HN people wrote when they linked it

MaxBarraclough · 2019-12-20
I believe JVMs were the first to use pointer-compression. A good summary is at https://stackoverflow.com/a/25120926/ Also worth reading: https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-me…
Mathnerd314 · 2017-07-01
Present courses often have a great deal of unrecognized uncertainty and risk too: https://blog.codecentric.de/en/2013/12/never-change-running-system-wro… Decision theory generally proceeds as follows: map out all possible outcomes, all possible courses of action, estimate probabilities of each action leading to each outcome, and choose the action with best outcome distribution. So far I haven't seen anybody argue against it directly... the problem instead is availability, most people aren't aware of it and can't or don't use it on a daily basis.
IncRnd · 2023-01-27
A log doesn't clarify whether a bug is intentional or unintentional. See the Apple goto fail security bug. [1] It's not known whether that bug was intentional or a bad programming mistake. [1] https://blog.codecentric.de/curly-braces
timsuchanek · 2021-06-17
Many production GraphQL apps these days use persisted queries [0] via GET requests. So the HTTP caching itself is not an issue in GraphQL anymore. [0] https://blog.codecentric.de/en/2020/05/how-to-secure-a-graphql-service…
83457 · 2018-11-11
Not sure if intentional but that is the second episode. Here is the first episode https://blog.codecentric.de/en/2014/09/openstack-crime-story-solved-tc…
archi42 · 2018-09-19
I wonder why the author doesn't call this construct by its name: Lambda functions? I'm not using Java anymore, but this write up seemed nice: https://blog.codecentric.de/2013/10/java-8-erste-schritte-mit-lambdas-… It's in German, though - I couldn't find a similar nice English write-up with 2 minutes of googling.
jug · 2018-02-25
A variant of that one led to quite a security bug for Apple: https://blog.codecentric.de/en/2014/02/curly-braces/
MrBuddyCasino · 2017-12-11
A colleague of mine made a tutorial for GoMock, maybe its helpful: https://blog.codecentric.de/en/2017/08/gomock-tutorial/
FRex · 2017-11-05
The compiler cannot reorder the fields. This stuff comes up occasionally in optimizing layout of language VM structures, compilers, in the Linux kernel and other low level situations. I.e. JVM compressed object pointers rely on the alignment and the native objects representation is definitely well laid out to not waste space due to alignment: https://stackoverflow.com/a/25120926 https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-me… Lua implementation similarly cares about alignment in some cases: http://lua-users.org/lists/lua-l/2009-02/msg00305.html This is not exactly 'struct packing' but alignment is closely connected to padding so its part of a wider interconnected topic.
masklinn · 2017-03-10
I don't believe that's the case (an other commenter notes they run solr processes up to 160GB), however they may have run into the compressed oops optimisation, or more precisely the end of it: because Java is a very pointer-heavy language, if the maximum heap size is under 32GB many 64b JVMs use a variant of tagged pointers where they have 35 bit pointers stored in 32 bits (since the lower 3 bits are always empty they can shift them in/out). Except once you breach the 32GB limit, your 32 bit pointers grow to 64, and depending on your application you might need to grow your maximum heap into the high 40s to get room for new objects: https://blog.codecentric.de/en/2014/02/35gb-heap-less-32gb-java-jvm-me…
pron · 2015-07-10
OTOH, Java 8u20 added string deduplication in the GC: https://blog.codecentric.de/en/2014/08/string-deduplication-new-featur…
Tepix · 2014-03-12
Using the super cheap 433mhz wirelessly switchable power plugs using the raspberry pi is also super low cost, it's just not secure against tampering. https://blog.codecentric.de/en/2013/03/home-automation-with-angularjs-… has some details.
bcg1 · 2015-07-10
Can't understand why people in this thread seem so ticked about this. The author's observation is interesting and useful to know, but this is an edge case that is easily fixable and actually kind of the fault of user code, not the implementation or the spec. Its not so simple to just say "I can't believe they changed the performance of xyz"... the author's article is about just one usage pattern, and there is no evidence presented to show it is very common compared to others. Developers needing specific behavior for this pattern could easily have used java.nio.CharBuffer which makes allocation/copying/access to the underlying array/etc explicit, and just happens to implement CharSequence. No reimplementation of String necessary. In general, Java is not C or C++, and has never been billed as a platform where you could rely on the internal representation of anything unless it is specified as such. Even the same bytecode running on the same platform on the same machine can run differently if the hotspot compiler says Make It So. That of course assumes you are even using Oracle's JVM or OpenJDK... there are in fact other implementations of both the JVM and the standard library that are free to implement things however they want. Even within the Oracle/OpenJDK sphere - there are 4 different garbage collectors which all could affect this pattern differently. There is even a new String dedup feature that would have an impact on the internal behavior of…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close