DZone
Java Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Java Zone > A REST interface for Mollom

A REST interface for Mollom

Johan Vos user avatar by
Johan Vos
·
Aug. 10, 11 · Java Zone · Interview
Like (0)
Save
Tweet
4.12K Views

Join the DZone community and get the full member experience.

Join For Free

One of the projects I'm working on, Mollom, is a great example of a Software As A Service (SAAS) project. The core functionality of Mollom, checking whether content is spam or not, is applicable in a number of areas, and can be accessed by a number of clients. That number of clients will likely increase in the future, as we added a REST interface to the Mollom API.

Until now, clients that want to talk to Mollom need to use an XML-RPC interface. While the XML-RPC interface is still supported, we added a REST interface that provides the same functionality. There were a number of reasons why we did this:

  • the popularity of REST is increasing. Many services offer a REST interface, and client developers are used to it.
  • it is human-readable and developer friendly.
  • a bunch of tools exists, allowing to call REST endpoints from within any programming language.
  • easy integration with the oAuth Authentication Protocol.

My own blog is using the REST interface for some months now, and we're now adding beta testers in order to get feedback and to tweak the interface and implementation.

We have a test-implementation with an endpoint that is available at http://dev.mollom.com/v1 and the specification is described at http://mollom.com/api/rest. This test-implementation is different from the production implementation:

  • You don't need a real mollom key, you can create one using the API itself
  • The behavior of some calls is different, and allows you to test your client. As an example, sending a content with postBody containing "spam" will result in a spam-response -- this specific behavior will be described later.
  • The test-implementation is not using load balancing and failover. The goal of the test-implementation is not to examine behavior under stress-tests. Good enough, the Mollom production servers are more robust.

Developers who are familiar with accessing REST services should be able to start using the test implementation right away. We're in the process of making more code samples available. In a follow-up post, I'll go deeper on some of the technicalities behind this REST interface (we use Glassfish 3.1.1 with Jersey 1.8 with oauth support). In the meantime, feedback is very welcome!

 

From http://66.240.233.40/johan/blog/A_REST_interface_for_Mollom

REST Web Protocols Interface (computing)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Ultra-Fast Microservices: When Microstream Meets Payara
  • How to Generate Fake Test Data
  • How to Determine if Microservices Architecture Is Right for Your Business
  • Java: Why Core-to-Core Latency Matters

Comments

Java Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo