Code
snippets from a software engineer
RSS

Calculating time differences in MySQL

By tpp On December 17, 2013 · Add Comment ·
I need to calculate the average completion time of an operation for something I’m working on at the moment. We’re using MariaDB. The natural way to do this is: [crayon-683babff05d29465347595/] However, the values of the Time data type in MySQL can only range between ‘-838:59:59’ to ‘838:59:59’. This becomes an issue if you have to [...]
[Continue Reading...]

Simple Services Monitor using Google Docs

By tpp On November 20, 2012 · Add Comment ·
We’re using a handful of web services with RESTful APIs serving JSON over HTTP at work to serve content to different client applications. The services all expose the same status interface that spits out statistics and status information about the service. The representation of the status interface is uniform across all the services. Nagios uses [...]
[Continue Reading...]

Working around a neo4j-spatial / Spring Data for Neo4j bug

By tpp On September 21, 2012 · Add Comment ·
There’s a some sort of race condition / thread safety issue either with neo4j-spatial and/or Spring Data for Neo4j that causes the data kept by the Spatial Index Provider to get corrupted. Specifically, a spatial node is only supposed to have one incoming relationship of type RTREE_REFERENCE. However, under some circumstances more than one relationship [...]
[Continue Reading...]

IDEs are nice, but command line is for efficiency

By tpp On September 14, 2012 · Add Comment ·
I recently had to switch some caches from Memcached to Redis, and was trying to figure out how to best achieve that on a live production server. On a staging server we would’ve just deleted the database, deployed the latest service version, restarted the service and re-imported the data using the service API. That would’ve [...]
[Continue Reading...]

Neo4j BatchInserterIndexProvider implementations for Memcached, Redis and MongoDB

By tpp On June 4, 2012 · Add Comment ·
https://github.com/gorbachev/neo4j-batchinserterprovider-contrib The Neo4j graph database has a batch insertion facility that allows users to insert large amounts of data quickly into a neo4j database. The BatchInserter uses the BatchInserterIndexProvider and BatchInserterIndex interfaces to manage the neo4j indexes. Neo4j default implementation is using Lucene. The contributed BatchInserterIndexProvider implementations contain Memcached, Redis and MongoDB backed index providers.
[Continue Reading...]

Neo4j BatchInserter and Spring Data for Neo4j

By tpp On April 5, 2012 · 7 Comments ·
I’ve been working on migrating an application using MySQL to using Neo4j, a graph database for the few past months. The new application uses Neo4j as its primary data store. The application accesses the Neo4j database through the Spring Data for Neo4j framework (SDN). SDN is built on top of Spring and Spring Data and [...]
[Continue Reading...]
  • Recent Posts

    • Calculating time differences in MySQL
    • Simple Services Monitor using Google Docs
    • Working around a neo4j-spatial / Spring Data for Neo4j bug
    • IDEs are nice, but command line is for efficiency
    • Neo4j BatchInserterIndexProvider implementations for Memcached, Redis and MongoDB
  • Tags

    BatchInserter cli underscore Google Apps Google Docs java JavaScript JSON memcached mongodb monitor MySQL neo4j neo4j-spatial redis SOA Spring Data for Neo4j Spring Framework SQL timediff time functions
  • Posts

    • December 2013 (1)
    • November 2012 (1)
    • September 2012 (2)
    • June 2012 (1)
    • April 2012 (1)

Code

Pages

The Latest

  • Calculating time differences in MySQL
    I need to calculate the average completion time of an operation for […]

More

© 2012 Code