[1.2.4] AWS DynamoDB anyone?

1,078 views
Skip to first unread message

Joseph Burns

unread,
Feb 20, 2012, 11:51:08 PM2/20/12
to play-framework
Has anyone had success connecting to aws dynamodb from Play!? I seem
to be able to run the sample code fine alone, but then when moving it
into the Play environment I get an exception relating to STS. Anyone
have thoughts on what I might be missing in troubleshooting?

A java.lang.NoSuchMethodError has been caught,
com.amazonaws.auth.STSSessionCredentialsProvider.<init>(Lcom/amazonaws/
auth/AWSCredentials;Lcom/amazonaws/ClientConfiguration;)V
In /test/AWSTest.java, line 122 :
ccu = DDBHandler.putActivityItem(new Long(8), new Date(), new Long(9),
"message", "this is a message");
Show trace

java.lang.NoSuchMethodError:
com.amazonaws.auth.STSSessionCredentialsProvider.(Lcom/amazonaws/auth/
AWSCredentials;Lcom/amazonaws/ClientConfiguration;)V
at
com.amazonaws.auth.SessionCredentialsProviderFactory.getSessionCredentialsProvider(SessionCredentialsProviderFactory.java:
96)
at
com.amazonaws.services.dynamodb.AmazonDynamoDBClient.setEndpoint(AmazonDynamoDBClient.java:
668)
at
com.amazonaws.services.dynamodb.AmazonDynamoDBClient.init(AmazonDynamoDBClient.java:
217)
at com.amazonaws.services.dynamodb.AmazonDynamoDBClient.
(AmazonDynamoDBClient.java:136)
at com.amazonaws.services.dynamodb.AmazonDynamoDBClient.
(AmazonDynamoDBClient.java:97)
at util.DDBHandler.putActivityItem(DDBHandler.java:57)
at AWSTest.putDynamoDB(AWSTest.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:
20)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
28)
at play.test.PlayJUnitRunner$StartPlay
$2$1.evaluate(PlayJUnitRunner.java:105)

...

Joseph Burns

unread,
Feb 21, 2012, 2:43:40 PM2/21/12
to play-framework
I'm having some success now using the high level object persistence
model instead of the low level API (with which I still am not sure
what the issue was):

http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/JavaSDKHighLevel.html


On Feb 20, 11:51 pm, Joseph Burns <jbu...@projectscribe.com> wrote:
> Has anyone had success connecting to aws dynamodb from Play!?  I seem
> to be able to run the sample code fine alone, but then when moving it
> into the Play environment I get an exception relating toSTS.  Anyone

Schwame

unread,
Mar 21, 2012, 9:55:47 PM3/21/12
to play-framework
Play-ers,

I'm interested in creating a DynamoDB module for play. Knowing the
play 2.0 is released, would it be better to build it via play 2.0 or
is 1.2.3 better for the time being?

Sincerely,
Jeff Schwartz

On Feb 21, 3:43 pm, Joseph Burns <jbu...@projectscribe.com> wrote:
> I'm having some success now using the high level object persistence
> model instead of the low level API (with which I still am not sure
> what the issue was):
>
> http://docs.amazonwebservices.com/amazondynamodb/latest/developerguid...
>
> On Feb 20, 11:51 pm, Joseph Burns <jbu...@projectscribe.com> wrote:
>
>
>
>
>
>
>
> > Has anyone had success connecting to awsdynamodbfrom Play!?  I seem

Emmanuel

unread,
Mar 21, 2012, 11:14:43 PM3/21/12
to play-framework
I am currently running dynamoDB as well with play 2.0. Yes, the high
level API is the way to go. It could use some tweaks but I'm using
Scala Dynamo as well. https://github.com/wfaler/scala-dynamo
If you need contributors for the plugin, I can help just let me know.

Pascal Voitot Dev

unread,
Mar 22, 2012, 3:30:23 AM3/22/12
to play-fr...@googlegroups.com
IMHO, you can build it for play 2.0 directly. I don't say play1.x wouldn't need it but the differences between play1 and play2 are quite important so you will need to write lots of things twice.

Pascal


--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.


Brainztorm

unread,
Mar 27, 2012, 5:35:35 AM3/27/12
to play-fr...@googlegroups.com
Yes, it would be cool to have this for play 1.2.4 too but we have to pass this necessary transition between 1.2.x and 2.0 ...

By the way, have you made some performance tests between the built in memcache/ehcache and dynamoDb ? i would be interessted in such things.

Cheers,

François.

clloyd

unread,
Mar 27, 2012, 11:34:41 AM3/27/12
to play-framework
Just did some performance tests with Play 1.2.4 and memcached. Serving
a landing page from a 2 server EC2 cluster.
page has 2 db lookups (SimpleDB) but these are cached using
memcached.

We got a steady 650 hits per sec throughput and 3500kb/s average which
is very good.

Did another test with Dynamo that was not good, however Dynamo is
provisioned for a certain level of read/writes per sec, and that level
was set low, so the test was invalid. Will report back when we get
real data.

If you can use memcached for reads, it's going to be faster by a wide
margin and cheaper too.

I'm interested in what level of writes per sec is really possible with
Dynamo and people's experience with it.

Eduardo

unread,
Apr 26, 2012, 1:36:51 PM4/26/12
to play-framework
Can you send me a little sample how you connect and use DynamoDB with
Play 2.0?

Thanks a lot.

Eduardo

On 22 mar, 00:14, Emmanuel <ekmo...@gmail.com> wrote:
> I am currently running dynamoDB as well with play 2.0. Yes, the high
> level API is the way to go. It could use some tweaks but I'm using
> Scala Dynamo as well.https://github.com/wfaler/scala-dynamo

Dominik Dorn

unread,
Jun 7, 2012, 12:13:39 PM6/7/12
to play-fr...@googlegroups.com
I think it would be good to create separate modules for each aws
webservice type.

Else people will end up with applications consuming lots of resources
when all they
need is just a simple part of AWS ( ... like in other modules that
bundle scala, akka and
other stuff just for a single file and make integration of multiple
modules a nightmare..)



On Thu, Jun 7, 2012 at 2:06 PM, bchapuis <bcha...@agimem.com> wrote:
> Hello,
>
> I just started a module with the aim integrates dynamodb. The aim is to
> integrate other aws webservices.
>
> https://github.com/bchapuis/play-aws
>
> Contributions are welcome.
>
> Best regards,
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/FOL5UgVEWAIJ.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.



--
Dominik Dorn
http://dominikdorn.com
http://twitter.com/domdorn

Skripten, Mitschriften, Lernunterlagen, etc. findest Du auf
http://www.studyguru.eu !

EECOLOR

unread,
Jun 8, 2012, 12:39:45 PM6/8/12
to play-fr...@googlegroups.com
We have serveral modules available and are working on a low-level version (and after that a more user friendly extension) of DynamoDB. You could check https://github.com/Rhinofly/play-libraries/tree/master/apis

We currently implemented:
- S3 (only list, get, add and remove)
- SES (Simple Email Service)
- STS (Security Token Service, only SessionToken)

We also have a library available that contains some Aws utils (https://github.com/Rhinofly/play-libraries/tree/master/apis/aws-utils):
- Aws3Signer
- Aws4Signer

They are built from the ground up using Play 2.0 WS because we did not like the SDK as it requires you to include all kinds of services you don't need.



Erik
Reply all
Reply to author
Forward
0 new messages