Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

15251

January 28th, 2009 07:00

save and get files to/from a centera from/to a delphi application

Hello,

first of all i must confess that i haven't completely understood the information given on this website about how the communication with a Centera works..

Furthermore i must say, that the company i'm working for is going to buy 2 Centeras, so we don't have one yet, but i'm tasked to find out how to use it and maybe test it here.

So i'll explain what i want to do and would be glad if You could help me along:

I've written a SOAP-Server-Application in Delphi 2007 that receives all content (file & metadata) that should be archived. This Application should on the one hand save the file to the centera and getting back an ID or Hash and on the other hand sending the ID/Hash to the Centera and getting back the file.

How could i solve this?

I've read that there are a C and a JAVA API, so i might write a dll in C that i can use in my Delphi-Application but what about this XAM und VIM?

Thank You very much for Your Help !!

With best regards,

Frank

417 Posts

February 4th, 2009 04:00

Frank - you do not need to do anything with the VIM. The only libraries you will need to import are the xam.dll and (optionally) the xam_toolkit.dll.

The whole loading process is automatic so you do not need to worry about that side.

xamconnect.pea is simply another pea file that was created for writing to the xam profile. This is the one you should use.

417 Posts

January 28th, 2009 08:00

Hi Frank - you will need to write a dll that imports the relevant API calls if you are unable to use the standard C DLL or the Java JAR files that the SDK offers.

XAM is, effectively, an industry standard SDK (a SNIA initiative that is backed by EMC, Sun, HP etc) that allows you to interface to the Centera. You then use the XAM SDK and data model rather than the proprietary EMC SDK and data model. The VIM is part of the XAM "stack" so you need that as well as the XAM SDK.

As XAM is the future direction for applications connecting to CAS Stroage Devices then this is the SDK that you should use.

12 Posts

January 29th, 2009 07:00

Hello,

first of all i want to thank You for Your reply.

My head of department downloaded the SDK for me (cause downloading anything doesn't work for me) so i was able to read the PDFs and that is what i've done the whole day. I'm not yet finsihed with reading them, but i already have a question about something i didn't get.

I understood that i can implement the xam.dll and the xam_toolkit.dll in my application to use its functions that are well documented in the PDF, but i've still problems to understand the whole thing.

In the PDF about VIM it is said that "a VIM Library, which is loaded by the XAM Library when the application connects to an XSystem, enables the XAM Library to communicate directly with the storage system via the VIM API".

My question is: how? Does this happen automatically or must i also implement all the other dlls in the EMC Centera XAM VIM SDK\...\lib32-folder and how must i use the functions of them together with the xam.dll-functions? I havent read anything about VIM in the (concrete) samples given in the XAM-PDF.

Another thing:

To test the code i'm developing to communicate with a centera, i can download .pea files from this website that are named this way: ClusterName_ProfileName_CapabilitiesList.pea

But there's one that's named xamconnect.pea - what is this file for?

I'm far away from testing anything but anyways, this question came to my mind.

I'm sorry if my questions are kind of dumb but it's really hard for me to read and understand hundreds of pages written in English and the topic seems to be not so easy.

I hope You are patient enough to answer my questions, the ones i already asked as well as the ones that might come to my mind in the future.

Thank You so much.

With best regards,

Frank

417 Posts

February 4th, 2009 04:00

Th eonly thing I would change is that I always tend to "escape" the \ elements of pathnames i.e. "D:\\Centera\\..." rather than "D:\Centera\...". This may not be required but it makes me feel happier!

The C API does include XSystem_AsyncCopyXSet! See page 93 of the API Ref manual.

PEA files are supplied to you by the Centera administrator, and created using the CenteraViewer or the Centera CLI. This is part of the process of creating a pool and profile for you to use - the final step being the creation of the PEA. You cannot create these manually, the contain system-generated IDs.

12 Posts

February 4th, 2009 04:00

Hello again!

I translated the given concrete c sample about creating an XSet into delphi-code and tried to do this on one of Your online Centera-Clusters, but for some reason i'm getting back the error code for "connection failed".

This might either be our firewall (our Admin is out today, so i can't verify that) or my XRI isn't valid.

Can You please check my XRI?:

XRI:='snia-xam://centera_vim!128.221.200.58?D:\Centera\emea1_profile1_rdqeDcw.pea';

I copied the vim-dlls into the folder of my application because i've not yet found out where to enter the path of them.

I got 2 more questions:

Why does the java-xam-api include a function called XSystem_AsyncCopyXSet and the c-xam-api doesn't?

And about these pea-Files:

I can download a pea-File to use it for a connect to an online centera cluster. But how can i create a .pea-File on my own for a communication with a local centera later? Is there any documentation where i can read how a pea-File is structured?

Thank You very much.

With best regards,

Frank

12 Posts

February 4th, 2009 05:00

Thank You very much for Your fast reply and good morning to America

Do You want me to use the xamconnect.pea instead of the one i'm currently using?

About the function:

According to a Programm called DependencyWalker that i'm using to see the functions of a dll, there is no C-function XSystem_AsyncCopyXSet in the xam.dll although this function is mentioned in the xam_c_api.pdf.

With best Regards,

Frank

417 Posts

February 4th, 2009 06:00

Actually it should be "Good afternoon to Scotland".

xamconnect.pea was created when there was only one public cluster that supported xam so you don't have to use it now as most (if not all) have been updated.

Strange - XSystem_AsyncCopyXSet is definitely there. Do a "strings" on the DLL and you will see it listed. I have also imported it successfully when I implemented the OpenSource .NET wrapper on CodePlex.

136 Posts

February 4th, 2009 09:00

You can review the white paper on EMC Centera Virtual Pools which briefly talks about creating pools and profiles. Alternatively you can download and install the Centera Tools which includes Centera Online Help documentation for creating pools and profiles.

12 Posts

February 7th, 2009 11:00

Hello again,

i tested my application at home today because our admin don't want to open a port for me.

Here are my results:

- I wasn't able to connect using the xamconnect.pea. I got the error "authentication failed".

- I was able to connect using the emea1_profile1_rdqeDcw.pea.

- Creating an Xset as well as creating a string/integer/double/boolean/xstream field worked.

- Closing the Xset and the XSystem worked too.

- XSet_commit didn't work. I got the error "FP_OPERATION_NOT_ALLOWED". Do You have an idea what might be the reason? I'll check my code on Monday, maybe there's a mistake in it.

- Couldn't test the get and set methods due to commit didn't work.

Have a nice weekend!

With best regards,

Frank

136 Posts

February 7th, 2009 11:00

Hi Frank,

I just tested xamconnect.pea with US2 from my home and it is working. Which IP did you use? Try using either 128.221.200.60, 128.221.200.61, 128.221.200.63 and xamconnect.pea

12 Posts

February 8th, 2009 23:00

Hello!

I'm using 128.221.200.58

About this error i'm getting when i try to commit an XSet:

I defined a xam_string as array [0..511] of char and i'm assigning a value the following way:

value:='lalala';

Must it be

value:='lalala'+#0; ?

Or must i set the length of the char-array to the length of the string i'm assigning? Because now i'm transfering an array with a length of 512 where only the first fields contain something...

I've read today that other people translate the c-code

char name[40];

into delphi-code

name : string;

I don't know if this is correct because the char-array starts at position 0 and the delphi-string starts at position 1 because the first byte (0) contains the size of the string.

Could this be the problem or what might be the reason for the error "FP OPERATION NOT ALLOWED"?

And another question:

What's the differnce between setautodelete and setshred? I mean, why must/can i shred an XSet that's already deleted? When it's deleted, it doesn't exist anymore, does it?

With best regards,

Frank

5 Practitioner

 • 

274.2K Posts

February 9th, 2009 17:00

Hi Frank,

Have you ever been able to Commit an XSet to this Centera:  128.221.200.58?  This cluster is running version 4.0 of the Centera software.  To use XAM, you should be connecting to a Centera running 4.0.1.  Try another one of our online clusters running 4.0.1 and see if the Commit operation still gives you problems.

Data shredding provides a deeper level of deletion than a standard delete operation.  When a standard delete operation is performed, internally, the object is deleted off the file-system (i.e. the file reference pointer is removed from the file-system).  Low-level file-system recovery tools could be used to retrieve the data.  However, if the bytes which represented the file are changed by zeroing them out (or some other data obscuring operation), the data can never be recovered.  This is how shred operates.

Auto-delete allows a piece of data to be automatically deleted once a retention policy has been satisfied.

Incidentally, the Centera implementation of XAM does not support shredding or auto-delete functionality.

12 Posts

February 10th, 2009 05:00

Yeah, commit worked with 60, 61 and 63

Only problem was: i'm not getting back a xuid, but i think i know the reason:

The only binding fields were a boolean and an xstream with a length of 0 Bytes because something went wrong during the writing process, i need to log that step by step, it should be a mistake in my code.

I guess the Centera is adding the Bytes of all binding fields and generating the Hash of this Byte-chain and therefor a minimum number of bytes is required and just 1 is not enough..

I want to thank You very much for Your help, this is really a good support !!!

With best regards,

Frank

5 Practitioner

 • 

274.2K Posts

February 10th, 2009 09:00

XAM does not prevent you from creating an XSet and successfully commit it without adding any fields to it.  There doesn't need to be any user-created fields in the XSet to successfully commit and generate a XUID.

Try committing a brand new XSet on one of our online clusters running Centera software 4.0.1.

-Weston

12 Posts

February 11th, 2009 05:00

Hello!

Sorry, i've been wrong, i got a xuid back, i just tried to show it with showmessage(string(xuid)) like i can do it with a xam_string and this, of course, didn't work.

Now i'm transfering it into a memorystream and after i'm transfering it into a base64-string and then i can show it..

I think now i can do everything i want to do with a Centera.

But i still got 2 questions:

- I noticed that it is possible to delete an XSet that's opened. It's no problem because i can just commit the XSet instance and it'll be there again, but i think it's like deleting a file that's opened by an application and this is not allowed in Windows. So i wonder if this is how it should be. (?)

- Is it possible to hold the connection to the Centera? I mean using xamlibrary_connect once and never use xsystem_close?

Thanks again for helping me to understand how saving data on a Centera works !!!

Have a nice day.

With best regards,

Frank

No Events found!

Top