Embracing the Messiness in Search of Epic Solutions

Month: August 2015

  • Akka: Spring Integration

    PROBLEM To create Spring-managed prototype-scoped actors. SOLUTION The key to this solution is to create a custom implementation of IndirectActorProducer. From the documentation:- “…This interface defines a class of actor creation strategies deviating from the usual default of just reflectively instantiating the Actor subclass. It can be used to allow a dependency injection framework to… Read More…

  • Neo4j: WHERE Clause vs Curly Braces in MATCH Clause

    PROBLEM With Cypher Query Language, you can write similar queries that yield the same result. For example:- … AND … … returns the same result. So, which one is better in terms of performance? SOLUTION Neo4j provides a very helpful command called EXPLAIN that allows us to do some investigation ourselves. The EXPLAIN command displays… Read More…

  • Neo4j: Playing with Cypher Query Language

    PROBLEM Every week, my shitty coworkers struggle to reach consensus on where to go for lunches and what beverages to order in the morning. SOLUTION To further understand the phenomenon of this first world problem, here’s a shitty graph database powered by Neo4j to visualize the love/hate relationship between my shitty coworkers and the shitty… Read More…

  • Spring Data Neo4J: Requested a entity of type ‘X’, but the entity is of type ‘Y’

    PROBLEM Let’s assume we have a node entity like this:- When saving this entity, we get this exception:- SOLUTION This problem occurs because relationship likes is being used by both Restaurant entity and Beverage entity. To fix it, we need to enforce the target type. Read More…

  • Windows 10 Was NOT My Idea, But It Was Free

    So, I decided to make use of the complimentary upgrade from my current Windows 7 running on VirtualBox to Windows 10. Not exactly the smoothest process, but I got it working after 5 days. I’m listing all the problems I encountered and the solutions I applied to get my free toy that I rarely use.… Read More…

  • Maven Archetype Plugin: Velocity Variable Substitutions Not Resolving

    PROBLEM Let’s assume we have the following package.json in our archetype:- When creating a project from this archetype, the Velocity variable substitution for ${rootArtifactId} doesn’t resolve at all. SOLUTION After reading Maven Archetype Plugin’s source code here and here, the Velocity variable substitutions are only performed on the following file extensions:- In another word, if… Read More…