Change format of TimeslotUpdate message?

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

Change format of TimeslotUpdate message?

grampajohn
Administrator
Markus has suggested that we change the format of the TimeslotUpdate message. He has also asked for a couple of other changes in the format of the xml messages, which I am reluctant to tackle because I don't know how to do them without major changes.

So my question is, does anyone object to making this change? It would marginally reduce message traffic, and as Markus says, it makes sense.

Thanks.

John
Reply | Threaded
Open this post in threaded view
|

Re: Change format of TimeslotUpdate message?

grampajohn
Administrator
I have coded up and tested an update that changes the TimeslotUpdate message to carry just the serial numbers of the first and last enabled timeslots. It cuts message traffic, and it's much more readable, but it involves a change in the sample broker (four lines in PowerTacBroker.java) and in any broker that makes use of the TimeslotUpdate message. Does anyone object to seeing this change in the snapshot and in the next release, which should be out in 2-3 weeks? If so, I'll hold it back until after this year's competition.

If I don't hear any objections, I'll push it in 2-3 days.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Change format of TimeslotUpdate message?

grampajohn
Administrator
This evening I pushed a change to the format of TimeslotUpdate that dramatically reduces the size of the serialized xml and should make it more readable. I also re-deployed common, so if you are depending on the snapshot repo, you will get the new version.

In the server, this affects default-broker and server-main, which have also been updated.

In the broker, this affects core.PowerTacBroker. If you have local modifications and cannot just pull down the update, see the diff - it's a fairly simple change.

Please let me know if you encounter problems with this.

John
Reply | Threaded
Open this post in threaded view
|

Re: Change format of TimeslotUpdate message?

moody
Hi John,

Just tried downloading the new snapshot but couldn't succeed. I followed the instructions at

http://power-tac-developers.975333.n3.nabble.com/Announcement-Java-based-sample-broker-implementation-available-td3644967.html

I cloned the powertac-server with:
git clone git@github.com:powertac/powertac-server.git

went to the directory powertac-server/server-distribution and tried running this
'mvn exec:exec -Dexec.args="config/bootstrap.txt"

That's where maven failed. Here is the log

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Power TAC distribution 0.5.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.powertac:server-main:jar:0.5.0-SNAPSHOT is missing, no
 dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.605s
[INFO] Finished at: Wed Mar 28 16:11:25 BST 2012
[INFO] Final Memory: 6M/183M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project server-distribution: Could not resolve
 dependencies for project org.powertac:server-distribution:pom:0.5.0-SNAPSHOT: F
ailure to find org.powertac:server-main:jar:0.5.0-SNAPSHOT in https://oss.sonaty
pe.org/content/repositories/snapshots/ was cached in the local repository, resol
ution will not be reattempted until the update interval of sonatype has elapsed
or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException


Am I doing anything wrong? :)

Moody



Reply | Threaded
Open this post in threaded view
|

Re: Change format of TimeslotUpdate message?

grampajohn
Administrator
moody wrote
Just tried downloading the new snapshot but couldn't succeed. I followed the instructions at
http://power-tac-developers.975333.n3.nabble.com/Announcement-Java-based-sample-broker-implementation-available-td3644967.html

I cloned the powertac-server with:
git clone git@github.com:powertac/powertac-server.git
went to the directory powertac-server/server-distribution and tried running this
'mvn exec:exec -Dexec.args="config/bootstrap.txt"
At the time I sent that out, I had deployed all the 0.2.0-SNAPSHOT components to the snapshot repo. I have not done that to 0.5.0, because we are not at a release-candidate stage yet. If you want to try the latest, you need to follow the instructions on the developer's wiki.

Let me know if this does not resolve the problem.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Change format of TimeslotUpdate message?

tattanke
In reply to this post by grampajohn
Hi John,

Have you pushed this change? It seems that you've pushed it partially because I'm having the following compiling error:
$ cd ../default-broker/;mvn install
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] DefaultBrokerServiceTests.java:[483,25] cannot find symbol
symbol  : constructor TimeslotUpdate(org.joda.time.Instant,java.util.List<org.powertac.common.Timeslot>)
location: class org.powertac.common.msg.TimeslotUpdate
[ERROR] DefaultBrokerServiceTests.java:[668,25] cannot find symbol
symbol  : constructor TimeslotUpdate(org.joda.time.Instant,java.util.List<org.powertac.common.Timeslot>)
location: class org.powertac.common.msg.TimeslotUpdate
[ERROR] DefaultBrokerServiceTests.java:[763,11] cannot find symbol
symbol  : constructor TimeslotUpdate(org.joda.time.Instant,java.util.List<org.powertac.common.Timeslot>)
location: class org.powertac.common.msg.TimeslotUpdate
[ERROR] DefaultBrokerServiceTests.java:[776,11] cannot find symbol
symbol  : constructor TimeslotUpdate(org.joda.time.Instant,java.util.List<org.powertac.common.Timeslot>)
location: class org.powertac.common.msg.TimeslotUpdate
[INFO] 4 errors

Cheers,
- Enrique
Reply | Threaded
Open this post in threaded view
|

Re: Change format of TimeslotUpdate message?

tattanke
tattanke wrote
Hi John,

Have you pushed this change? It seems that you've pushed it partially
Sorry, my bad. I guess the take home message is do a "git submodule foreach git pull origin master " before asking for help.

- Enrique