[ 
http://jira.amdatu.org/jira/browse/AMDATU-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11705#comment-11705
 ] 

Paul Bakker commented on AMDATU-428:
------------------------------------

Marcel, I'm not sure if it's the best idea to put everything in an Amdatu 
Storage subproject. As I understand it a subproject has it's own release cycle, 
so wouldn't it be better to separate blob storage and other kind of storage 
abstractions in their own sub projects? Their APIs will be completely separate 
anyway.
                
> Blob Store support
> ------------------
>
>                 Key: AMDATU-428
>                 URL: http://jira.amdatu.org/jira/browse/AMDATU-428
>             Project: Amdatu
>          Issue Type: New Feature
>            Reporter: Paul Bakker
>         Attachments: TestContext.patch
>
>
> We need some way to work with Blob Store providers such as Amazon S3. 
> I've implemented this and checked in to the sandbox: 
> https://subversion.amdatu.org/svn/amdatu/sandbox/paulb
> The service is built on jclouds, so any Blob Store support by jclouds can be 
> used. The service exposes the jclouds API directly. Jcloud already is an 
> abstraction so it doesn't make sense to create another abstraction on top of 
> this. If we would provide our own abstraction we would either copy the 
> jclouds API or loose a lot of jcloud's functionality. If we need to support 
> additional stores we can add them to jclouds.
> The jclouds API is exposed via an OSGI service (BlobStoreService). Jclouds 
> has to be configured with a username/password etc. to work with a specific 
> blob store. For this I have created a Managed Service Factory. As soon as the 
> Factory finds configuration for a specific store it instantiates a service 
> specifically for that store. To use this service you have to go through the 
> following steps:
> -Add configuration (using Config Admin) for the provider containing: 
> provider, identity and secret. The provider must be one of the providers 
> supported by jclouds.
> -Lookup the service
> {code}
> dependencyManager.add(createComponent().setImplementation(BlobStoreClient.class)
>                 
> .add(createServiceDependency().setService(BlobStoreService.class, 
> BlobStoreService.Providers.AWS_S3.getAsServiceFilter()).setRequired(true)));
> {code}
> From there you just use the jclouds API, for example:
> {code}
> BlobStoreContext blobStoreContext = blobStoreService.getContext();
> BlobStore blobStore = blobStoreContext.getBlobStore();
> PageSet<? extends StorageMetadata> amdatu = blobStore.list("amdatu");
> for (StorageMetadata storageMetadata : amdatu) {
>       System.out.println(storageMetadata.getName());
> }
> {code}
> Let me know what you think!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers

Reply via email to