vso programmatic interface

25
VSO Programmatic Interface Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team

Upload: armand-dyer

Post on 02-Jan-2016

41 views

Category:

Documents


1 download

DESCRIPTION

VSO Programmatic Interface. Authors: Igor Suárez Solá Joe Hourclé Alisdair Davey VSO Team. VSO Basics VSO GUI and underlying XML correspondence VSO Programmatic interface WSDL stub generation Java C IDL VSO Perl interface VSO Advance Querying. - PowerPoint PPT Presentation

TRANSCRIPT

VSO Programmatic Interface

Authors:Igor Suárez Solá

Joe HourcléAlisdair Davey

VSO Team

• VSO Basics– VSO GUI and underlying XML

correspondence• VSO Programmatic interface– WSDL stub generation

• Java• C

– IDL VSO– Perl interface

• VSO Advance QueryingThe documentation on this talk can be found in:

http://docs.virtualsolar.org/wsdl

Some Jargon

• Metadata: attributes that define a specific observation.– E.g.

– Time,instrument,observable,spectral range,provider, fileid, etc

• Data: a reference to actual data, such as a url:– E.g.

– http://vso.tuc.noao.edu/cgi-bin/drms_test/drms_export.cgi?series=aia_lev1;compress=rice;record=1700_1059741042-1059741042

The VSO only has two operations:

•Metadata Query

• GetData Query

http://virtualsolar.org

http://virtualsolar.org

Check box you want to sort by

Select view type to display additional

columns

Sorts based on order the table

column was ticked

VSO programmatic interface

• Why using the VSO in a programmatic way?Because you can:– Embed VSO calls in existing code– perform complex queries– Query on fields that the GUI might not implement.– Engage in querying providers that offer specific

extended interfaces. E.g. XRT

What’s a WSDL?

• Web Service Description Language– A document that describes how the message

interaction between client and server takes place.– It describes:• The message structure• Implemented operations• Protocol• Network connection (or end-point)

– The client is your program or application– The server is a VSO Core implementation

How does a WSDL helps you?

• There are libraries / packages out there are able to generate code that allows you to manipulate the transaction client/server in a effective way.

• Axis2 JAVA and C• JWS• C#

Axis2

• http://ws.apache.org/axis2/• Generate java client stubs code:

export JAVA_HOME=/usr/local/javaexport AXIS2_HOME=/usr/local/axis2-1.5.1export PATH=$AXIS2_HOME/bin:$PATHwsdl2java.sh -s -S ./src -uri VSOi_rpc_literal.wsdl

• Generate C client stubs codeWSDL2C.sh -uri VSOi_rpc_literal.wsdl -d adb –u

• See client code inhttp://docs.virtualsolar.org/wsdl

Java sample code

IDL VSOSSW (SolarSoftWare)

• Just two IDL routines– vso_search• To search on metadataE.g.

aia_lev1 = vso_search( '2010-09-01', '2010-09-01 01:00', inst='aia’)

– vso_get• To bring the urls for the data• E.g.

status = vso_get( aia_lev1 )

Download from http://www.lmsal.com/solarsoft/

IDL VSOFurther Documentation can be found at:

http://sdo1.nascom.nasa.gov/drms/idl/vso_search.pro

Perl interface

• The simplest one (Native interface)– Just needs SOAP::Lite– An end point– A perl structure

• Example:my $client = SOAP::Lite-> proxy(’http://sdac.virtualsolar.org/cgi-bin/vsoi')-> uri('http://virtualsolar.org/VSO/VSOi')my $results = $client->Query({ version=>’1.0’, block => { provider=>’jsoc’, instrument=>’aia’, time=>{ start=>’20100701000000’,

end=> ’20100701000000’ } } });

Specific Querying• Sampling: returns records per “sampling” period

Sampling is in secondsE.g. Get records every hour– Xml:

• <sample>3600</sample>

– IDL• sample=3600

• Near querying: returns records closest to specified timeSpecify the time you want the closest product to be:

– XML:• <near>20100909001001</near>

– IDL:• near_time=“20100909001001”

– Last record• You can get the last record by setting the start time a couple of hours in the past and the end time

and near time to be now or slightly in the future.• IDL:

– This is achieve simply by setting the flag : /latest

Specific Querying

• Other filters– Requesting data by :• Processing level: level• Pixel resolution : pixels• Resolution: resolution• Pixel Scale: pscale• Detector: dectector• Layout : layout

Summary

• Programmatic interface in place

• Support for multiple programming languages

• Standardized interface

• http://docs.virtualsolar.org/wsdl