Skip to main content

Posts

Showing posts from 2014

Node vs. Java - Web Service Performance

Summary I recently did some comparative testing of web service implementations for a simple in-memory cache. I built functionally equivalent interfaces in Java ( REST + SOAP ) and Node.js (REST only) for the cache.  As expected, the Node implementation outperformed the Java variants significantly (>100% faster response times). Cache Implementation Figure 1 depicts the high-level structure of this cache application.  The cache supports inserts, fetches, and deletes of key/value pairs. Figure 1 Figure 2 depicts a bit more detail on the physical layout of the application. In the cases of the REST variants for Java and Node, cache operations are implemented as HTTP verbs (Insert = PUT, Fetch = GET, Remove = DELETE).  Stale entries are cleared from the cache using timeouts with Node and scheduled threads in Java.  Additionally, cache redundancy (loose coherence) is supported simply by utilizing REST calls between the server peers (PUT's and DELETE's).

PowerShell: Equivalent to UNIX find/grep

Product: Windows PowerShell I was trying to find out the PowerShell command that equivalent to following UNIX command to search through all files for a particular text (or regular expression) find . | grep -i "family_picture" The PowerShell equivalent is Get-ChildItem -recurse | select-string -pattern "family_picture" Default is not case sensitive, so no need to map "grep -i" parameter. If needed case sensitive, then it will be Get-ChildItem -recurse | select-string -pattern "family_picture" -casesensitive