Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Talk:SMILA/Component Requirements/Record Binary Storage Requirements"

(didnt get that the namespace parameter wasnt part of igor's suggestion and hence misundstood JS'comment on the whole part. -> changed my comment on that to new and hopeful correct unstanding)
Line 23: Line 23:
  
 
@Igor: could you make this requirement more precise?
 
@Igor: could you make this requirement more precise?
 +
 +
[[User:Juergen.schumacher.empolis.com|Juergen.schumacher.empolis.com]] Ok. I suppose, creating one BinStorage service per "namespace" would be fine, too. So the API could be:
 +
 +
<source lang="java">
 +
void store(String id, InputStream stream);
 +
void store(String id, byte[] blob)
 +
byte[] fetchAsByte(String id)
 +
InputStream fetchAsStream(String id)
 +
void remove(String id)
 +
int fetchSize(String id)
 +
</source>

Revision as of 08:24, 20 October 2008

Tom: I wouldnt use the smila specific 'record' and 'attachment' name parts because in/out arguments are generic.

Juergen.schumacher.empolis.com Yes, indeed. There is nothing record-specific in the arguments so we do not need to talk about records and attachments. But I wonder if it would make sense to add another parameter to be able to ensure that different clients that use BinStorage for difference purposes do not have ID collisions. Otherwise one client would overwrite the BLOB of another client by accidentally using the same ID. So we could have:

void store(String namespace, String id, InputStream stream);
void store(String namespace, String id, byte[] blob)
byte[] fetchAsByte(String namespace, String id)
InputStream fetchAsStream(String namespace, String id)
void remove(String namespace, String id)
int fetchSize(String namespace, String id)

Alternatively we could require that IDs are not unstructured strings but something like "URIs" (maybe even javax.xml.namespace.QName instead of java.lang.String?)

Tom:

> namespace parameter

I had that different in mind, namely when requesting the service, the client would pass in that info. that way we could have diff. BinStoreService instances and the client wouldnt have to pass in that info each time.

> 6. The client component must use different instances of the binary store fully transparently

@Igor: could you make this requirement more precise?

Juergen.schumacher.empolis.com Ok. I suppose, creating one BinStorage service per "namespace" would be fine, too. So the API could be:

void store(String id, InputStream stream);
void store(String id, byte[] blob)
byte[] fetchAsByte(String id)
InputStream fetchAsStream(String id)
void remove(String id)
int fetchSize(String id)

Back to the top