Zachary Witte:
When you have the instance basically set, go back into the AWS control panel, right click the instance and choose Create Image. You can start up any number of these for the replica set, but you need to change the /etc/hostname and /etc/hosts file to reflect the individual IP address and hostname of the bot (db1, db2, db3, etc.)
Before you set up MongoDB on EC2 make sure you understand the various aspects of running MongoDB in the Amazon cloud:
References
- MongoDB on Amazon EC2 with EBS Volumes
- Yet Another Validation for NoSQL World
- MongoDB Case Study: From MySQL to MongoDB at GameChanger
- Railo Cache Benchmark - CouchDB, MongoDB, RAM
- Full text indexing with MongoDB
- Terrastore: A Consistent, Partitioned and Elastic Document Database
- MongoDB: A ToDo App with Ruby and PHP
- MongoDB Sharding Explained
- Quick Guide to Zend and MongoDB on MongoHq
- MongoDB Videos from MongoSV
- MongoDB in the Amazon Cloud
- MongoDB on EC2
'Brain Trainning > NoSQL' 카테고리의 다른 글
[NOSQL] 101 Questions To Ask When Considering A NoSQL Database (펌글) (0) | 2011.06.17 |
---|---|
[MongoDB] Auto Increment with MongoDB (0) | 2011.04.04 |
[MongoDB] Replication Set Connection 방법 (0) | 2011.03.31 |
[MongoDB] 트위터 Collections... (0) | 2011.03.31 |
[MongoDB] Config 파일 옵션 (0) | 2011.03.09 |
The last two you are mentioning (GuicyData and Sculptor) are covered here:http://nosql.mypopescu.com/post/816470307/tutorial-mongodb-in-java
You are using the low-level mapping capabilities of morphia instead of the much nicer datastore, or DAO interfaces. There should be no need to use the driver DBCollection object. You can remove most of your code by using the higher-level abstractions. Also, all the annotations (except @Id) are optional in your example.
@Before
public void setUp() throws UnknownHostException {
ds = new Morphia().createDatastore("test");
}
public void storePersonThroughMorphiaMapping () {
Person test = new Person(new Address("Josefines gate", "0401", "Oslo", "Norge") );
test.setName("Knut Haugen");
ds.save(test);
Person test2 = ds.get(Person.class, test.getId());
assertNotNull(test2.getId());
}