…MongoDB. The combination of schema-less document storage and ad-hoc queries is fantastic. The JSON format fits Clojure's data structures well, and the mongo-java-driver is high quality and maintained. Congomongo is fairly light-weight — its main goal is to make interacting with the database from Clojure convenient and idiomatic.
Thank you Andrew. In case you have any queries and/or questions, kindly post your questions here (as comments to this blog post) and Andrew would be …
…way of publishing transaction data, but it shouldn't be the only way. There also needs to be json and microformats. XML and in particular heavily namespaced XML is not very popular today with developers outside the enterprise. The datamodel isn't too bad but I think it is too complex. There are too many data elements:
AtomPub for payments
To create a payment you POST a chunk of atom xml to a URL creating an entry. I'm glad it follows HTTP conventions. I'm …
…Ruby. In some cases, these extensions have been written to improve performance, like the various json libraries. Some of that performance could be less of a concern under Ruby 1.9, but it's hard to claim that any implementation will be able to run Ruby as fast as C for general-purpose libraries any time soon.
However, a large number of extensions - perhaps a majority of extensions - exist only to wrap a well-known and well-trusted C library. Nokogiri, for example, wraps the excellent …
…X-TraceUrl, Speed Tracer makes a request for the server-side trace, parses the JSON and surface it in the UI. This means that the server-side data is brought in on demand and does not affect the actual load times of your resources, and also that you need a mechanism to record, store, and serve these traces later.
Server side tracing with Rack & Ruby
The original announcement at Google IO demoed this new functionality on top of GWT and the Spring TC server . However, …
…easy to use, no patching the vm, detailed (file/line) object contents, refs between objects, simple json output @ tmm1 # RubyMidwest
RT: @ samullen I feel more smarter just by listening to @ tmm1 # rubymidwest
See what he did there? They bring the wit here in the heartland.
http://memprof.com/ has gotten better since I last looked at. Nice visualizations of where your memory is going @ tmm1 # RubyMidwest
http://memprof.com/ is built using Mongo @ tmm1 # RubyMidwest…
The data object may be the response in JSON of an Ajax request, and you need to populate your form:
var data = {}
data.personal = {};
data.personal.name = " Castilho";
var field_name = "personal[name]";
document.getElementsByName(field_name)[0].value=find_attr(data, field_name);
Also works with arrays and an indefinite number of levels:
data.company = [];
data.company[0] = {};
data.company[ 0].name = " FBCO";
find_attr(data, "company[0][name]"); …
…Visualizer : A Code Project project to see visualize results from JSON services like Facebook
PEX for Fun : use PEX to automatically solve puzzles
Phone7 Action Pack : Open source set of utilities for Windows Phone 7 development
The episode also features Dan's and Brian's picks of the week:
Dan had two picks this week:
The Archivist : An application that lets you save and store Tweets over time for later analysis, …
The configuration for a replica set is a JSON object that specifies which hosts are members of the set (you can find example configuration in the docs, or in Dwight's slides). Pass the config to the server like this: > use admin > db.runCommand({replSetInitiate: cfg})
When you start mongod you can seed the list of hostnames on the command line: $ mongod --replSet setname/host1,host2
Check the status of your set with the {replSetGetStatus: 1} command, or check http://localhost:28017/replSetGetStatus?text …
…TcpTrace you should see the request and the response containing the serialized user in JSON format:
In IRB you should also see the returned user instance, deserialized from JSON:
At this stage, our service can provide authentication via the Sessions resource using either an XML or JSON protocol.
I will leave the HTML implementation for the reader. The approach would include re-using the existing Login controller,
but the login view would be moved to the …
…http://localhost:28017/_status to see the same data that db.serverStatus() returns, but in JSON format.
Investigating performance issues
Run mongostat to get a list of useful performance stats by unit time.
If you want to load test a database you'll probably find that mongod isn't the bottleneck; the tool you're using to load the database could well be. So run your load testing tool on a different machine.
Keep an eye on the output of iostat -x 2 , which (amongst …