Request: A decent API
Moderator: SourceGear
Request: A decent API
The three API options available as I understand it are:
1. .NET C# DLL
2. Command line client
3. SOAP
The SOAP interface is not documented, generally unfriendly, and users are discouraged from using it.
The Command line client can be invoked from any environment, which is good. But it is dead slow. Each command takes about 5 seconds to execute. Operations consisting of 100s of commands take forever to perform.
The .NET C# DLL is limited to only be usable from within the Microsoft C# .NET environment. Calling it from any other environment is very difficult.
An API should be efficient, documented, and useable from any programming environment.
The currently available API options do not meet these basic criteria.
I'd suggest either:
1. A plain C DLL.
2. A documented TCP/IP communication protocol towards the Vault server. Telnet-style commands or XML, for example.
Both these two can be used from virtually any programming environment.
Any chance there is something like this available?
I am trying to use Vault from Borland C++ Builder, and today that does not seem to be possible within a reasonable development effort?
1. .NET C# DLL
2. Command line client
3. SOAP
The SOAP interface is not documented, generally unfriendly, and users are discouraged from using it.
The Command line client can be invoked from any environment, which is good. But it is dead slow. Each command takes about 5 seconds to execute. Operations consisting of 100s of commands take forever to perform.
The .NET C# DLL is limited to only be usable from within the Microsoft C# .NET environment. Calling it from any other environment is very difficult.
An API should be efficient, documented, and useable from any programming environment.
The currently available API options do not meet these basic criteria.
I'd suggest either:
1. A plain C DLL.
2. A documented TCP/IP communication protocol towards the Vault server. Telnet-style commands or XML, for example.
Both these two can be used from virtually any programming environment.
Any chance there is something like this available?
I am trying to use Vault from Borland C++ Builder, and today that does not seem to be possible within a reasonable development effort?
Re: Request: A decent API
On which OS are you using Borland C++ Builder?
Is there a list somewhere of the version control tools it currently supports? I could only find a line that mentioned their own version control.
I see with some of the others that a third-party tool is required (http://www.epocalipse.com/scx.htm). In the epocalipse site, it mentions working with our product SourceOffSite. If it works with that, there's a good chance it would work with Vault. Actually, I just saw further down that it mentions Vault.
I can take a feature request for integration with Borland C++ Builder.
F: 17763
Is there a list somewhere of the version control tools it currently supports? I could only find a line that mentioned their own version control.
I see with some of the others that a third-party tool is required (http://www.epocalipse.com/scx.htm). In the epocalipse site, it mentions working with our product SourceOffSite. If it works with that, there's a good chance it would work with Vault. Actually, I just saw further down that it mentions Vault.
I can take a feature request for integration with Borland C++ Builder.
F: 17763
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Request: A decent API
Borland for windows.
But I don't want to integrate Vault with Borland Builder.
I am developing a Borland C++ application which will act as a Vault client and perform certain sequences of operations on the repository.
I am currently using the command line client API, but it is horribly slow. It takes several minutes to perform the operations I need.
But I don't want to integrate Vault with Borland Builder.
I am developing a Borland C++ application which will act as a Vault client and perform certain sequences of operations on the repository.
I am currently using the command line client API, but it is horribly slow. It takes several minutes to perform the operations I need.
Re: Request: A decent API
If you try the same actions on the Vault GUI client to see if they are slow there too? If so, then we can troubleshoot this as a slowness issue.
What version of Vault are you using?
What is the end goal in performing those operations and what operations are they?
What version of Vault are you using?
What is the end goal in performing those operations and what operations are they?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Request: A decent API
Sorry for the delayed response. Vacation times...
We are using Vault version 6.1.0 (531)
Each command takes approximately 5-15 seconds to do using the command-line client.
In the GUI it is 1 second or less.
The operations I do consists of ~100 vault commands, which means one single operation takes up to 25 minutes to do.
I have done some investigations on the behaviour of the commandline client. A big chunk of the 15 seconds is spent before it actually starts talking to the vault server. (investigated using wireshark). I am guessing it reads in the local cache copy of the repository?
Since the command line client has to re-read the complete local copy of the respository for each and every command, as well as log on to the server, it is only natural that it is slow.
The goal of the operations:
We use lots of shared files between projects, and we need a simple method of pinning all shared files in a project to a certain label before compiling and releasing a project.
So the commands I am using are:
1. List all files in a selected project.
2. List all labels for each and every file in the project.
3. The user gets to select which labels to use in the project.
4. Pin each file to one of the selected labels.
We are using Vault version 6.1.0 (531)
Each command takes approximately 5-15 seconds to do using the command-line client.
In the GUI it is 1 second or less.
The operations I do consists of ~100 vault commands, which means one single operation takes up to 25 minutes to do.
I have done some investigations on the behaviour of the commandline client. A big chunk of the 15 seconds is spent before it actually starts talking to the vault server. (investigated using wireshark). I am guessing it reads in the local cache copy of the repository?
Since the command line client has to re-read the complete local copy of the respository for each and every command, as well as log on to the server, it is only natural that it is slow.
The goal of the operations:
We use lots of shared files between projects, and we need a simple method of pinning all shared files in a project to a certain label before compiling and releasing a project.
So the commands I am using are:
1. List all files in a selected project.
2. List all labels for each and every file in the project.
3. The user gets to select which labels to use in the project.
4. Pin each file to one of the selected labels.
Re: Request: A decent API
Have you tried using the Batch command with Vault? That should help it not have to do everything from scratch each time.
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Request: A decent API
I was not aware of the batch mode.
I have now changed my implementation to use batch mode, and it is certainly a bit faster. But still pretty slow.
For example, it takes about 1 second to pin 5 files in the Vault GUI. But it takes 40 seconds to pin 5 files using the command line client in batch mode.
I have now changed my implementation to use batch mode, and it is certainly a bit faster. But still pretty slow.
For example, it takes about 1 second to pin 5 files in the Vault GUI. But it takes 40 seconds to pin 5 files using the command line client in batch mode.
Re: Request: A decent API
Are all the files getting pinned to the same label?
Could you just pin at the folder level?
We have a pin power toy that could pin all the files in one operation, but that's a GUI client. Does the pin have to be run from the command line?
Could you just pin at the folder level?
We have a pin power toy that could pin all the files in one operation, but that's a GUI client. Does the pin have to be run from the command line?
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Request: A decent API
No, all files are not pinned at the same label.
That is basically why we have to create a custom tool for the job.
It does not have to be a command line utility. The custom tool I am building is a GUI tool.
In the Vault GUI client, pinning is a pretty quick operation. Any idea why it is so slow in the commandline version?
Is the "power toy" capable of pinning different files to different labels?
That is basically why we have to create a custom tool for the job.
It does not have to be a command line utility. The custom tool I am building is a GUI tool.
In the Vault GUI client, pinning is a pretty quick operation. Any idea why it is so slow in the commandline version?
Is the "power toy" capable of pinning different files to different labels?
Re: Request: A decent API
Do you know if the PIN command is being committed for each operation? To check for this, after running your BATCH, but before running COMMIT you can run the LISTCHANGESET, to see if the pin is listed there.
Although I don't think this applies to your case, but if one uses "-1" as the version, this avoids an unnecessary round trip to the server looking things up through history.
Although I don't think this applies to your case, but if one uses "-1" as the version, this avoids an unnecessary round trip to the server looking things up through history.
Jeff Clausius
SourceGear
SourceGear
Re: Request: A decent API
No, they are not committed at the moment.
I use the command like this:
PIN "$/Project/file.c" 7
If pin 29 different files using commands like above in BATCH mode, it takes 3 minutes and 40 seconds to complete.
This is really too long to have to sit and wait for.
I use the command like this:
PIN "$/Project/file.c" 7
If pin 29 different files using commands like above in BATCH mode, it takes 3 minutes and 40 seconds to complete.
This is really too long to have to sit and wait for.
Re: Request: A decent API
Understood.
If you could use the C# API, there might be a way to speed things up, but you would have to know some internal IDs (we call them object-version IDs or objverid).
Regardless, I've logged an enhancement request to optimize the PIN command from the command line to speed up performance. (F:17893). If you want, you can email support AT sourcegear DOT com and we can keep you apprised of the feature.
If you could use the C# API, there might be a way to speed things up, but you would have to know some internal IDs (we call them object-version IDs or objverid).
Regardless, I've logged an enhancement request to optimize the PIN command from the command line to speed up performance. (F:17893). If you want, you can email support AT sourcegear DOT com and we can keep you apprised of the feature.
Jeff Clausius
SourceGear
SourceGear