Service Concepts

From Intrument Element Wiki

Jump to: navigation, search

The service on this page is used to describe the process of accessing an endpoint through the methods provided by Instrument Element library programming abstractions, for example, when connecting to an endpoint and invoking commands it provides. The client is the component invoking an instrument through IE, and the server is the IE implementation.

Service lifecycle

What are the steps in using an endpoint through Instrument Element (setup, use, teardown)?

You need to start a session to be able to use any of the services provided. Why is this session needed?

What does it represent to the system?

When should you close a session, and when should you open one?

Should you have only one session per endpoint or can you have more?

Is there some benefit to having many sessions?

What should be taken into account when freeing resources while disconnecting from an endpoint whose services you will no longer use?

Service concepts

Invoking a service always requires providing the session, but also requires providing a reference to something called a "top instrument manager." What is this? What is it used for? How is it created and what should be considered in using it?

How does one acquire the references?

One way seems to be the ie.getAllTopInstrumentManagers(sessionId). What does it mean to get all of them? Can you request just one?

Apparently getting "all" of them means there can be more than one. What is the use of one? And how does the user know which one to pick since there can be many?

When creating a service, how does one create his or her own top managers and what should they do? What can you use them for as a client?

The services exposed by IE include parameters, attributes, commands, griduicommands, etc. What are these?

For example, when you get parameters with ie.getAllParameters(sessionId, managerId), you can further get the parameters of the parameters with parameter.getParameters(). So the parameters can recursively have any level of nested parameters? What does this mean?

Similarly, please explain all the concepts of other API calls, such as (but not limited to):

You can use ie.create() to create IEs. If you connect to an IE, does it not exist already? Why would you then create one? And so on with other API calls...

What is a job that can be submitted? Must the Instrument and the user know about the job and know how to execute it with a known id string?

What is a context that the IE API defines and how does one use it? What does it represent and when is it relevant to the client/server?

What is a Resource Service? Who provides one and how should it be used by client/server? And so on with all the rest of the concepts for the client/server APIs...

Personal tools