[ome-devel] Shoola-back-end consistency issues

Josh Moore josh.moore at gmx.de
Thu Jul 7 16:18:57 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ilya Goldberg wrote:

> This sounds interesting. Let's finally get around to some use cases.  For
>  _what_ do you want to get the SessionKey and mex_id? I was assuming
> something along the lines of:
> 
>  getSpotsAsCSV(int imageId);
> 
>> Well, this kind of call would need a VBA library if you want to issue 
>> it from Excel.  The URL above can be pasted into a Web Query and 
>> doesn't need VBA.  Excel doesn't implement cookies (at least not in my 
>> version), so some other way to exchange session tokens has to exist.  
>> You can do several queries to get a SessionKey (by doing a POST query 
>> with typed-in parameters for username/password), then get mex_id, etc.
>> Remember versioning?  What version of the image's spots are you after?  
>> That's why you need the mex_id.

Alright. Basically you want a REST web service on top of whatever server
architecture we have. The VBA library to do the above would just have:

def getSpotsAsCSV(int imageId){

KEY=get("http://blah.blah/getSessionKey?username=&password=") (or POST)
MEX=get("http://blah.blah/getLatestMexForImageId?imageId=imageId&key=KEY")
SHEET=get("http://blah.blah/getSpotAsCSV?imagedId=imageId&mex=MEX")
setSheet(SHEET)

}

Super. We have a plan for making VBA/Excel work. That makes us cool.
Having a REST API sit on top of something else isn't hard. Otherway
around sucks.


>> I don't know what I want in the API.  I'm pretending to be Joe-user 
>> over here.  I know how to use Excel.  I probably don't know squat about 
>> VBA or APIs or anything of the sort.  I want my Find spots data in 
>> Excel, simple as that.  By any means necessary.

Then on top of the VBA we have an excel function. Imagine a little "="
bar up top. User types "=getSpots(A12,NameOfTargetSheet)". Spots imported!


>> VBA would be fine to pretty this up a bit.  But then we need to provide 
>> example spreadsheets with all that stuff.  I couldn't even figure out 
>> how to do a URL request in VBA.  That's how dumb I am.

See below for what I found.


>> That's fine Josh.  Everyone's a critic.  How about some suggestions for 
>> what you think might work better?  I'm not saying what we have is 
>> perfect, its just better than anything else on the table.  Calling the 
>> same thing by different names seems like a bad idea unless you have 
>> some really good suggestion how to handle it.

Knowing its a possibility it a good start. As soon as I have the
solution, you'll know.


> This is less my concern than having clients make arbitrary API calls
> without being entangled with the AE.
> 
>> Well, if they screw it up by making arbitrary API calls, the DB should 
>> return an error as a last resort.  Better if the error is caught both 
>> at the API level and the DB level.
> 
>> As far as entanglement in the AE, this is an area of our API that can 
>> definitely stand some sprucing up.

Ditto.

- -josh.

==========================


- From http://www.dicks-blog.com/archives/category/vba-advanced/ :
Sub get(URL As String)
   Dim xmlObj As Object 'XMLHTTP
   Set xmlObj = CreateObject("Microsoft.XMLHTTP")
   xmlObj.Open "GET", URL, False
   xmlObj.Send

   If xmlObj.StatusText = "OK" Then
	// PARSE
   End If
   Set xmlObj = Nothing
End Sub
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCzUfgIwpkR5bKmAsRApZbAKCsK2Wyqo57g5fcdDY8FDm3g4e+lgCeN1pa
qNtcbYiBvc+33/raK8ZOs5U=
=PS7j
-----END PGP SIGNATURE-----


More information about the ome-devel mailing list