Within the last week I’ve learned a few interesting and strange things:
-
Given the right connectors, R and PostgreSQL can work with each other to produce graphs, and use each other’s functions. I believe that the strongest use forthesetoolsare: to create windowing functions that aren’t already provided in PostgreSQL and to generate charts directly from the database.
-
R can operate within PostgreSQL with the Pl/R module. This means that you can create a graph from an SQL query. In addition, with Pl/R, you can make R functions callable from SQL. For an example on getting Pl/R to work, and generate a graph see this. One example, is that R can provide an aggregate function, that PostGreSQL does not contain: median. Warning: At this time, PostgreSQL 9.1 is the most recent supported DB for Pl/R.
-
R can work with PostgreSQL with the RPostGresSQL driver. This is pretty cool, as that the data it brings in is an ordinary data frame, in-which you can perform any R related function as if it came from any other source. Instructions can be found on it’s project page.
-
This may sound crazy, but the lack of random numbers on Linux may cause WebLogic to double the time needed to start. My own personal test has confirmed this to be the case. This is typically an issue with Linux, /dev/random’s behavior, and WebLogic’s usage of SecureRandom [Java]. Under Linux, SecureRandom uses /dev/random for its default source of random numbers. However, under Linux /dev/random blocks until it can get the next random number, and the numbers are based on activity from system drivers. Within a VM, the performance of /dev/random is exacerbated by a lack of driver noise. As of the time of writing, the only hypervisor to provide a driver to assist in this issue is KVM; VMware and Xen do not provide a driver. The solutions provided by Go-Integral are: redirect /dev/random to urandom(not advisable), use a hardware key, use a broker, or use the hypervisor driver (if it exists).
- TL;DR: Using VMs and plan on generating lots of random numbers for SSL and/or crypto? Use a hardware key, entropy broker, or a hypervisor driver if you’re using KVM.
-
Recently, a lower powered box that I own refused to operate. This was due to a fan underperforming, and would let the box get too hot, to the point that the BIOS just halted the machine from running. Instead of replacing a functional fan, I found out that a little machine oil [for sewing machines] can actually fix the issue. Oiling the fan should be in every computer user’s periodic maintenance schedule along with backing up their data, and cleaning out the dust. Due to fan size this is incredibly important on laptops and GPUs.
-
If you need numbering for groups within a PostgreSQL query, you should use the rank function. It is a Windowing function, that will give you the number for that particular group, based on a criteria. See the documentation yourself for a better explanation.
-