General Questions after installation

18 views
Skip to first unread message

nmrod

unread,
Feb 13, 2011, 2:26:37 PM2/13/11
to Reef Users Group
Hi all,

After successfully installing Reef, I would like to as a few
questions:

- Do you have any manuals/tutorials that can help me developing a
Service which reads a message coming from the Qpid broker?
- How DNP3 is connected with Reef? It delivers meter reads to the Reef
system through the broker? Writes everything on the database and Reefs
picks the reads?
- How can I test the system by entering reads? Can I use the
Simulator? How?
- Do you have any documentation explaining how the Reef modules are
connected? Something that better explains the architecture diagram
presented in http://reef.totalgrid.org/documentation/architecture.

Nuno

Daniel Evans

unread,
Feb 13, 2011, 10:31:15 PM2/13/11
to reef-...@googlegroups.com
Hi Nuno, thanks for your interest.

In regards to the general question about manuals/tutorials, we're slated to have a lot more programmer documentation up on the Reef site very soon. However, let me see if I can jumpstart you:

- Developing applications 

Applications connected to the AMQP message bus (Qpid broker) come in two varieties: Services, that provide some functionality for other applications, and clients, which implement some business logic by interacting with the services and/or subscribing to messages that serve as bus "events"-- i.e. when a new measurement is published or when an alarm is raised.

So, for instance, Reef provides services which cover most of the common SCADA functionality--updating measurements, issuing commands, raising alarms, and so on. Those services handle implementation details like data storage and interacting with other, internal, parts of the system. A client application, on other other hand, might send a service request to subscribe to measurements associated with meter data, perform some calculation on them, and then push some information back to the system (like an outage notification).

So if that last part is more the class of application you're talking about, the way you'd do it is use the Reef client API. This is made up of two parts: the software library (i.e. Java) that makes AMQP calls for you, and the actual service messages. Documentation on both is forthcoming. For now, the place to look for an example on client calls is in the reef-integration subproject:


But we're currently refactoring the API to be more programmer-friendly, so the class names will change. There will also be an example/tutorial project.

The actual service messages are contained here: 


And again, we'll soon have more examples on how to use them.


- DNP3 and Reef

Reef has a "Front-end Processing" subsystem whose purpose is to manage communication protocol connections to field devices. When measurements come in, they're posted to the MeasurementBatch service, which stores them to the database. DNP3 is one of those protocol implementations.

- Test measurements 

The simulator is actually a protocol implementation ("benchmark protocol"), like DNP3 above, that produces a "random" stream of measurements for the points it is assigned to. If an endpoint in the configuration XML specifies "benchmark" as its protocol, or the config file is loaded with the -benchmark option, it will simulate a system in which measurements are flowing. You'll be able to check this using the console commands, as shown on the getting started page.

If what you want to do is input your own specific measurement, the way to do it is have clients post to the MeasurementBatch service themselves. The reef-integration project has an example of doing this:  



- Module diagram

I suspect a lot of the confusion here would be solved by having a better set of tutorials/examples, and a better overview of the system could be part of that. The most important concept, though, is that clients interact with the service layer, which handles most of the coordination among the modules. Writing clients is just a question of the broker client and the service messages; writing services involves more complexity. We plan to provide a friendly (and documented) API for writing services, but the initial focus will be on clients.

Hope this helps,

Daniel


--

Daniel Evans

Software Engineer

Green Energy Corp

(919) 836-9916

dev...@greenenergycorp.com

 

Transforming the Smart Grid

www.greenenergycorp.com

 


Nuno Rodrigues

unread,
Feb 14, 2011, 6:11:22 AM2/14/11
to reef-...@googlegroups.com
I will take a better look through the source code but maybe the best option is just wait for some tuts/manuals.

Nuno 
Reply all
Reply to author
Forward
0 new messages