« Page 10 of 18 »

  1. I have long been irked by the difficulty of creating simple XML documents in Java code. While Java has excellent support for handling XML in general, if you just need to whip up a quick document -- say, to interact with a web service API -- you can quickly get lost in a messy quagmire of JAXP code that is difficult to write, to debug, and to stomach.

    In the past, I have often resorted to building small XML documents using string concatenation to avoid this headache. And I've felt ashamed every time. Well, no more!

    The XMLBuilder project I have just made available via Google Code contains a single utility class that makes it simple to create XML documents using relatively sparse Java code.

    To create this XML document:

    <?xml version="1.0" encoding="UTF-8"?>
    <projects>
        <java-xmlbuilder language="Java" scm="SVN">
            <location type="URL">
                http://code.google.com/p/java-xmlbuilder/
            </location>
        </java-xmlbuilder>
        <jetS3t language="Java" scm="CVS">
            <location type="URL">
                http://jets3t.s3.amazonaws.com/index.html
            </location>
        </jetS3t>
    </projects>
    

    You would use the following code, which is nicely terse and closely resembles the structure of the XML document it produces:

    XMLBuilder builder = XMLBuilder.create("Projects")
        .e("java-xmlbuilder")
            .a("language", "Java")
            .a("scm","SVN")
            .e("Location")
                .a("type", "URL")
                .t("http://code.google.com/p/java-xmlbuilder/")
            .up()
        .up()
        .e("JetS3t")
            .a("language", "Java")
            .a("scm","CVS")
            .e("Location")
                .a("type", "URL")
                .t("http://jets3t.s3.amazonaws.com/index.html");
    

    If you're interested, head on over the the Google Code project and download a copy. Feedback is welcome.

    There are comments.

  2. The eagle-eyed folks at RightScale have spotted a new EC2 feature guide document describing the long-anticipated release of Amazon EC2 Regions. In short, EC2 is now available in the EU region, with potentially more regions to follow.

    This is great news for EC2 users who are located in Europe, or who have a large customer base there. Keep an eye out for more official announcements and explanations of this major new feature.

    Updates

    The AWS blog has a post with some more details. DevPay and Windows AMIs are not yet available in the European EC2, but all other features are supported. Pricing is also slightly higher in the EU region, as it is for S3 storage outside the U.S.

    There are comments.

  3. Amazon's DevPay service graduated recently from beta to general availability, which means that it is now easier for companies in the United States to build a business based on Amazon Web Services.

    DevPay allows you to sell your own applications based on Amazon's storage (S3) and computing (EC2) services. You set the price that customers will pay and the service then takes care of the billing and account management tasks, leaving you free to concentrate on your application.

    Unfortunately you still need to have a U.S. bank account to register for a DevPay account. From the FAQ:

    Sellers of Amazon DevPay applications must be able to do business in the United States. Funds earned through the sale of Amazon DevPay applications can only be withdrawn to U.S. bank accounts.

    So it looks like those of us outside the U.S. will have to remain patient.

    There are comments.

  4. Amazon's SimpleDB online data storage and querying service is now in unlimited public beta, which means that you can sign up for the service and have your account activated immediately. Previously, new users had to wait an indeterminate amount of time until they were granted access to the limited beta.

    Amazon has also changed the service's pricing to encourage people to try the service and stick with it. Moderate usage of the service will be free for at least six months for up to 1GB of data, while the ongoing data storage costs beyond 1GB have been slashed from $1.50 to $0.25 per GB/month.

    Finally, a new DomainMetadata API operation will be made available for retrieving statistics about a domain ("database" in SimpleDB parlance) such as the total number of items, and the storage consumed by all of your attribute names and values. ~~Unfortunately the link to the DomainMetadata API documentation link is broken as I write this, but full details are available in the PDF version of the Developer Guide.~~ The DomainMetadata API documentation is now available in both HTML and PDF versions of the Developer Guide.

    There are comments.

  5. Amazon has added a new service to their arsenal. CloudFront is a content delivery service that works closely with S3 to make public objects in your account available through a distribution network with edge locations in the US, Europe and Asia.

    CloudFront uses two techniques to deliver your data quickly. It caches S3 objects in the network's edge locations (for a configurable amount of time), and automatically routes incoming requests to the edge location nearest to the requester. If you provide content to people who are distant from an S3 server location, this new service could significantly improve download speeds for your users.

    The price for distribution is based on the amount of data transferred and the number of requests, with differential pricing depending on the edge location that serves the content. Bear in mind that you will also incur the standard S3 service costs whenever an object is provided to an edge location.

    It is straight-forward to create a CloudFront "distribution" based on one of your S3 buckets. The AWS blog announcement mentions a number of tools and libraries that include support for the new service. My own JetS3t Java library has also been updated with basic API support for the new service, though for now you will need to download the latest code from CVS to access this feature. If you are keen to get your hands dirty, go get a CVS checkout and review the sample code in org.jets3t.samples.CloudFrontSamples.

    Inevitably, there are some drawbacks to the service:

    • Only publicly readable objects can be distributed through CloudFront, so you cannot use access control settings or temporary signed URLs to limit content delivery to specific people.
    • You cannot manually (or programmatically) expire objects at an edge location once they have been cached. Be careful to use appropriate caching directives if you intend to update or remove distributed objects.
    • You cannot set a cache expiry time less than 24 hours, so the service is not appropriate for data that is frequently updated.
    • As with S3, there is no way to display a default index.html page when someone requests the root location of your CloudFront distribution. This makes it difficult to use the service as a complete replacement for a web server.
    • There is currently no support for request logging, though account and usage reports are available.
    • There is not yet an edge location close to my Australian home :-(

    Despite these drawbacks, CloudFront is a very promising new tool for anyone who needs to distribute a lot of content to a broad audience.

    There are comments.

« Page 10 of 18 »