I am currently making some reaching for the MinIO. I wonder if there is the object ID concept in MinIO that we can identify the object uniquely.
or the only way is through the bucket name and file name to identify the stored object.
Related
Because lambdas are stateless and multiple instances can run at the same time it might be a bad idea to generate ids based on timestamps. I am currently using UUIDv1. I know the chance of generating the same IDs with the same timestamp already literally impossible. It's also enough unique enough for my application. Out of curiosity I'm thinking of ways to generate truly mathematically unique ids on aws lambda.
UUID v1 uses a node to distinct ids generated with the same timestamp. Random numbers or MAC-Adresses (bad idea for virtual instances) are used to create node ids.
If I had a unique id for my active lambda instance I would be able to generate truly unique ids. There is a awsRequestId inside the context object but it just seems like another timestamp based UUID.
Maybe you guys have more ideas?
AWS lambda:
System.getenv("AWS_LAMBDA_LOG_STREAM_NAME").replaceFirst(".*?(?=\\w+$)", EMPTY)
Defined runtime environment variables
AWS EC2:
httpGet http://169.254.169.254/latest/meta-data/instance-id
Instance metadata and user data
AWS ECS:
httpGet http://localhost:51678/v1/metadata
How to get Task ID from within ECS container?
Unique within subnet
String executableId = ManagementFactory.getRuntimeMXBean().getName();
I have a logic app which polls for files does some things with them, succeeds or fails then ends. It will run every 5 minutes and poll for a file.
If it finds a file I can create a blob storage with a date time suffix eg LogutcNow('s').txt
I want to append to this file various messages generated from the logic app eg if steps succeed or fail.
Is Blob storage the best way to put a file in my Azure storage account?
Since the name of the blob depends on the date time, how do I append to it?
It may be that the logic app does not write anything to the log file. In that case I want to delete it.
I want to create the blob at the beginning of my logic app then update it. If there are no updates then I want to delete it. In the update action it seems to require me to specify the name of the blob. Since I haven't create the blob yet this is impossible. One thing I also tried was initialising a string variable to the current date and time and putting that variable into the filename.
Suppose your main problem is after you create a blob with dynamic name and could not get the blob name to do other actions. If that you could just set the blob name with dynamic content Path, if it doesn't shown the dynamic content just set the expression body('Create_blob')?['Path'].
I keep doing google of how to store object data in Laravel.
I have an Model object which is using among functions and the Model data will not be changed indeed. So I want to store it into the global area for access.
I think it should be stored in something like the ServletContext(Application Scope) in tomcat. But I can't find such concept in Laravel at all.
Could anyone help?
Thanks!
If you want to store it for the current session, just store it in session. That will be the easiest way to share it between methods.
I wanted to get a record from the aerospike. So, I was using the Client.Get method.
However, whenever I do a Get I also want to refresh the TTL of the record. So, usually we use a WritePolicy which allows us to set a ttl. But then the Get method accepts only a BasePolicy
Is the following way correct or is there a better way of doing this?
client.Get(nil, key, bin)
client.Touch(myWritePolicy, key)
Do it within an operate() command, you can touch() as well as get() in the same lock, one network trip. Note, if your record is stored on disk, updating TTL, however you do it, will entail a new write of the record to a different location on the disk because TTL info is stored in the record metadata.
Let’s say I have a managed object context whose persistent store coordinator have two (or more) persistent stores.
Which persistent store will Core Data use to fetch or save managed objects when executing a fetch request, or saving the context?
If you have more than one configuration in the data model, and different configurations have different entities, a newly inserted object goes into whatever persistent store is associated with the object's entity. This is the purpose of the configuration option when you call addPersistentStoreWithType:configuration:URL:options:error:. You're telling the persistent store coordinator that the new persistent store uses a specific configuration. As a result, the persistent store only uses the entity types that the configuration contains.
If you have multiple persistent stores that can all save the same entities (they use the same configuration, or they have different configurations that overlap for some entities), then you have the option to tell the managed object context which persistent store to use. After inserting the object, but before saving changes, call assignObject:toPersistentStore: to tell it which one you want it to use. If you don't call that method, it's undefined which persistent store is used, but it's probably the last one that you added.