Skip to content

Instantly share code, notes, and snippets.

@digitalwm
digitalwm / gist:062b4b24773453bc785d
Created July 22, 2014 12:04
Load test a mongoDB instalation
db.foo.insert( { _id : 1 } )
ops = [{ op : "findOne" , ns : "test.foo" , query : { _id : 1 } }, { op : "update" , ns : "test.foo" , query : { _id : 1 } , update : { $inc : { x : 1 } } } ]
for ( x = 1; x<=128; x*=2){
res = benchRun( { parallel : x ,
seconds : 5 ,
ops : ops
} )
print( "threads: " + x + "\t queries/sec: " + res.query )
}
@digitalwm
digitalwm / Part 1
Last active December 12, 2015 01:38
SaaS made simple
I had many attempts to start writing stuff, and I guess will still have in the future, but for now I decided to try to write something about SaaS and how things can be done simple. I will try to provide use cases and examples of what can be good and what can be bad based on my previous experiences and my current ones.
I tried to read and look for this type of documentation for a long period of time and I could not find one, that was pure and simple. Most of them were focused on fancy terms, or specific examples to some programming languages or specific platforms. So I decide to provide a different approach, not very academic but now also "for dummy" approach.
What do I expect from any reader to know?
Well this is a very interesting question. I would expect for people to know what internet is, what is a web server, what is XML or JSON, what is a socket and mostly basic IT knowledge. But even so, when you don't understand something, would recommend to try to look it up on Google or Wikipedia.
What would you