Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

AWS Development Blog:
DynamoDB JSON and Array Marshaling for PHP
Feb 04, 2015 @ 16:51:30

In the latest post to the AWS PHP Development blog Jeremy Lindblom looks at a new feature of their PHP SDK that allows for more flexibility (and easier handling) when using DynamoDB for document storage in storing more complex data.

Back in October of 2014, Amazon DynamoDB added support for new data types, including the map (M) and list (L) types. These new types, along with some API updates, make it possible to store more complex, multilevel data, and use DynamoDB for document storage.

He talks about a new class thats been added to help work with the DynamoDB storage, the DynamoDb Marshaler (in version >= 2.2.7) that handles the push and pull of the JSON document data directly from the storage, reducing the need to perform the operation manually. He includes code examples of its use and JSON examples of what results are returned on a get request. He also shows how to use it with a native PHP array, translating it with help from the Marshaler and the "marshalItem" method.

tagged: aws development sdk amazon dynamodb json storage marshaler

Link: http://blogs.aws.amazon.com/php/post/Tx3QE1CEXG8QG1Z/DynamoDB-JSON-and-Array-Marshaling-for-PHP

PHPMaster.com:
Amazon DynamoDB: Store PHP Sessions with Load Balancer
Sep 13, 2012 @ 16:19:57

PHPMaster.com has a new tutorial posted showing how you can work with the Amazon DynamoDB to store session information from your PHP application (originally posted on CloudSpring).

This tutorial will show you how to use Amazon DynamoDB as a storage facility for PHP sessions. This method becomes very useful when your applications take advantage of the Elastic Load Balancing and Autoscaling services. You will need Amazon AWS account enabled to use EC2, Elastic Load Balancer and DynamoDB as a prerequisite to play along the tutorial.

He starts with a description of what the elastic load balancing service is and how it autoscales. He shows how, based on this demo application, to use a custom PHP session handler that implements the Amazon SDK libraries to hook into the DynamoDB service. Also included are screenshots (and the steps that go with them) to configure the service itself.

tagged: amazon dynamodb session handler tutorial custom

Link:


Trending Topics: