serverside javascript - server side Mongodb GridFS file copying -
per business requirements need provide possibility copy content of file on gridfs. of course can done on domain-specific layer. in case can see overhead:
- take stream mongo-server
- allocate memory on business-layer
- read
- place mongo-server
obvious solution write mongo-side javascript perform copying in bound of single server. questions:
- where description of api manage gridfs on javascript?
- is there issues if gridfs sharded?
- is there issues if gridfs replicated?
thank in advance
you never need copy gridfs file within single server, because gridfs files immutable: can create, read, or delete them, not modify them. there's no reason make copy.
copying 1 server should done via driver; there's no built-in support copying directly mongodb server another.
Comments
Post a Comment