Configuring a Hibernate second-level cache in AWS is something of a challenge, as the EhCache multicast discovery mechanism doesn't work there. JGroups is another option, but can be difficult to configure. Here's how I got it working.
I'm using the very nice JGroups-AWS project https://github.com/meltmedia/jgroups-aws. In my configuration, you can see that I use "tags=Env,Role". This means that any given server will query EC2 to find out the values of those tags for itself. For example, suppose the server wakes up and finds that it has Env=Production and Role=API_Server. It will look for other servers with the same tag values (using the AWS webservice endpoints) and form a cluster with them. It checks back periodically so that if servers enter or leave the group it will adjust periodically. Very nice.
The 1.3.0 jgroups-aws uses JGroups 3.1.0, which is a bit out of date. I have not tried forcing a later version in the POM yet. I also cannot completely vouch for all the protocols set up in the ehcache.
| (function() { | |
| function hashchange() { | |
| if (!location.hash) { | |
| return; | |
| } | |
| // Don't do anything if the current target exists. | |
| if (document.querySelector(":target")) { | |
| return; | |
| } | |
| var name = "user-content-" + decodeURIComponent(location.hash.slice(1)); |
Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.
My top contenders, mostly based on popularity / community etc:
- Angular
- Backbone
- React
- Ember
Mostly about MVC (or derivatives, MVP / MVVM).
| <!doctype html> | |
| <html ng-app="Demo"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title> | |
| Multiple Isolate-Scopes Cannot Be Applied To The Same Element In AngularJS | |
| </title> | |
| </head> | |
| <body> |
| /** | |
| * Author: Mathias Bak Bertelsen | |
| * Email: [email protected] | |
| * Date: 03-08-2014 | |
| * | |
| * A very simple implementation of a generic FIFO queue. | |
| */ | |
| public class Queue<T> { | |
| /** | |
| * Method to get all bytes from a file. | |
| * | |
| * @param path | |
| * @return | |
| * @throws IOException | |
| */ | |
| public static byte[] getFileContent(String path) throws IOException { | |
| FileConnection file = null; | |
| sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo | |
| sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo | |
| sudo yum install -y apache-maven | |
| mvn --version |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |