Can I append or overwrite some bytes to an existin

2019-07-05 05:16发布

I need to append some bytes to an existing object stored in Openstack Swift, say like a log file object and constantly append new logs to it. Is this possible?

Moreover, can I change (overwrite) some bytes (specify with offset and length) to an existing object?

2条回答
聊天终结者
2楼-- · 2019-07-05 05:31

tl;dr: There's no append support currently in Swift.

There's a blueprint for Swift append support: https://blueprints.launchpad.net/swift/+spec/object-append. It doesn't look very active.

user2195538 is correct. Using ZeroVM + Swift (using the ZeroCloud middleware for Swift) you could get a performance boost on large-ish objects by sending deltas to a ZeroVM app and process them in place. Of course you still have to read/update/write the file, but you can do it in place. You don't need to pipe the entire file over the network, which could/would be costly for large files.

Disclaimer: I also work for Rackspace, and I work on ZeroVM for my day job.

查看更多
甜甜的少女心
3楼-- · 2019-07-05 05:37

I believe ZeroVM (zerovm.org) would be perfect for doing this.

Disclaimer: I work for Rackspace, who owns ZeroVM. Opinions are mine and mine alone.

查看更多
登录 后发表回答