Broker development using Java EE

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Broker development using Java EE

Mykolas
I am trying to develop the Broker using Java EE. In my Java EE Web Application I would like to use classes inside powertac-commons and powertac-server-interface Grails plugins. The default approach would be to have all these classes inside a separate JAR which I could add to my Broker dependencies, however, I was not able to find how to get this JAR.

My question is - shouldn't the common classes for the broker be not the Grails plugin but rather simple Java Library Module in order for them to be used in any Java Application? Is there a way to force Grails to produce the required JAR file?

Thanks,

Mykolas
Mykolas Molis
MSc Student at King's College London
Reply | Threaded
Open this post in threaded view
|

Re: Broker development using Java EE

Mykolas
The interesting thing is that I do not find any way to use the grails plugins not in grails applications. Doesn't grails plugins make the broker developers specific framework dependent? Any suggestions or ideas?
Mykolas Molis
MSc Student at King's College London
Reply | Threaded
Open this post in threaded view
|

Re: Broker development using Java EE

ddauer
With Grails 1.4 (which will hopefully be released soon), we will be able to package plugins as .jar files for usage with any Java environment. Until then, you'll have to use Grails if you want to use the powertac-common Grails plugin. If you don't want to use powertac-common, your broker can still communicate with the server via XML messages over ActiveMQ/JMS.

powertac-common/server-interface/demo-agent-grails only provide a quick and easy way for Grails developers to get started but is not required for broker development. You can however look into powertac-demo-agent-grails and try to convert Groovy to pure Java. This will work but will cost you some time.

Cheers,
David
Reply | Threaded
Open this post in threaded view
|

Re: Broker development using Java EE

Mykolas
Thanks David. What I am planning to do for now - I am going to clone required classes from the grails plugins and use them in my personal project. This way I am going to try to develop a separate Java library project and share the result. I think it will be very useful for other Broker developers in Java.
Mykolas Molis
MSc Student at King's College London
Reply | Threaded
Open this post in threaded view
|

Re: Broker development using Java EE

sardinha
This sounds like a very nice idea. Do you mind sharing the Java code with us? I'd rather develop my agent in Java than Grails.
Reply | Threaded
Open this post in threaded view
|

Re: Broker development using Java EE

jurica.babic
Hi all,

Same here.
I would like to develop my broker using Java instead of Grails.

Mykolas,
It would be nice if you could send us your solution for the basic Java Broker.

Cheers,
Jurica