Abstraction Builder

Building simple and elegant programming abstractions

Pico Tutoiral 5 - Hello Amazon Product Advertising API

| Comments

This is the fifth tutorial of Pico tutorial series, in this tutorial, I will show you how to integrate Pico with Amazon Product Advertising API, if you are not familiar with this API, just have a quick review on its official site, basically, the Product Advertising API provides programmatic access to Amazon’s product selection and discovery functionality so that developers like you can advertise Amazon products to monetize your website. In this tutorial, I will show you how to customize binding for mwsc code generation in case the wsdl does not follow convention, for example, the Amazon Product Advertising wsdl uses many anonymous inner types in its schema, without customized binding, the generated code will have many types with same names, leading to compile-time conflict. Also in this tutorial, I will show you how to add custom SOAP header which is required by the authentication of Amazon Product Advertising API.

Pico Tutorial 4 - Hello eBay Shopping

| Comments

This is the fourth tutorial of Pico tutorial series, in this tutorial, I will show you how to integrate Pico with eBay Shopping Web Service, if you are not familar with this service, just have a quick reivew on its official site, basically, eBay Shopping service allows you to search for eBay items, products and reviews, user info, and popular items and searches. In previous tutorials, I showed you how to integrate Pico with SOAP based services, while in this tutorial, I will show you how to interate Pico with XML based service, the eBay Shopping service just support XML message format.

The source of this tutorial is here.

Pico Tutorial 3 - Hello eBay Finding

| Comments

This is the third tutorial of Pico tutorial series, in first and second tutorials, I showed you how to use Pico with simple web serivces like StockQuote and CurrencyConverter. These services are quite simple, only support one or two calls, and the request/response structures are fairly simple, supporting these simple services only can’t show the full power of Pico, so in this and later tutorials, I will show you how to use Pico with industrial grade services, let’s start with eBay Finding service, please reivew its official site if you are not familiar with this service, bastially, it lets you search items on eBay. eBay Finding service supports SOAP 1.2, so I will also show you how to configure Pico to support SOAP 1.2 protocol, also I will show how to set service required HTTP headers on Pico client.

The source of this tutorial is here

Pico Tutorial 2 - a Currency Converter Sample

| Comments

This is the second tutorial of Pico Tutorial series, in the first tutorial, I showed how to use Pico with a service called StockQuote from webserivceX.NET. Today I will show you how to use Pico with another service called CurrencyConverter, also from webserviceX.NET, in first tutorial, I showed you how to reference Pico as a static library, in this tutorial, I will show you how to reference the Pico source in your project. By the way, since the wsdl driven development process in both tutorials are quite similar, I won’t repeat too much details in this tutorial, I suppose you have already read tutorial one and basically understand the wsdl driven development process supported by Pico.

The whole source of this tutorial is here.

Let’s cut to the point:

Pico Tutorial - a StockQuote Sample

| Comments

This is the first post of Pico Tutorial Series, in this post, I will show you how easy to use Pico framework to put WSDL driven application development on iOS platform into practice. If this is the first time you get to know Pico, then after this tutorial, you will bascially understand what Pico can do for you, and the basic development process when using Pico to run WSDL driven development on iOS. If you want to see the big picture, plese read this post first.

The whole source of this demo is here.

WSDL driven development using Pico framework has following steps:

  1. Generate Objective-C proxy from WSDL
  2. Create new iOS project, add Pico runtime and generated proxy into your project
  3. Implement appliction logic and UI, call proxy to invoke web service as needed.

Let me cut to the point and show you each step using a simple while popular StockQueue web serivce from WebserviceX.NET.

The Architecture and Design of a Publish & Subscribe Messaging System Tailored for Big Data Collecting and Analytics

| Comments

Overview

With the advent of big data era, we are facing more and more challenges from big data collecting and analytics requirements. Typical big data or activity stream includes but not limited to:

  • Logs generated by frontend applications or backend services
  • User behavior data
  • Application or system performance trace
  • Business, application or system metrics data.
  • Events that need immediate action.

The Luxun messaging system is just tailored for big data collecting and analytics scenario, following are the main design objectives of Luxun messaging system:

WSDL Driven Development on iOS - the Big Picture

| Comments

WSDL driven development is a popular and mature development methodology on platforms like Java and .Net, tools like Axis, CXF, JAX-WS, WCF are used by many developers for rapid web service development. With WSDL as interface contract, both server side and client side proxies can be automatically generated from WSDL, developer can work with plain old interfaces/objects directly, no need to worry about low level SOAP/XML serialization/deserialization and service invocation details(which are very tedious and error-prone), this kind of model driven development(or meta-data driven development) can not only dramatically reduce initial development cost, but reduce long term maintenance cost.

Fanout Queue Tutorial

| Comments

This is a tutorial to show the basic API usage of fanout queue, the source of this tutorial is here.

Why we need a queue with fanout semantics? here is a typical case: Suppose we have a queue for log collecting, at the backend, we have two(or more) use cases of the log data, for example, one use case is real-time log analysis and alerting, another use case is offline log analysis and reporting, in these cases, we will have two(or more) independent consumers, such as one real-time log consumer and one offline log consumer, but we only have one queue, if we just use a typical queue, then it only supports one consumer(this is called consume once queue), the data consumed by one consumer will not be available to other consumer(s) again. One solution to this problem is to create two(or more) queues for each consumer, and let producers produce messages into all these queues, but this is a silly and bandwidth/storage cost solution. A more elegant solution is to add fanout semantics to the queue - one queue can be independently consumed by multiple consumers, internally, fanout queue will maintain queue front pointers for each consumer. The fanout queue in the bigqueue library supports fanout semantics, it also supports a group consuming scenario - multiple consumers form a group(use same fanout id) to consume a queue concurrently for higher consuming throughput.

Schema Driven Web Service Client Development on Android, Part 2: eBay Search App

| Comments

This is the second part of my schema driven web service client development on Android series, in part one, I introduced the blueprint of scheam driven development on Android, then I created a web service client proxy for eBay Finding API and built a minimum App as demo. In this second part, I will continue to create a functional eBay search app on Android by leveraging the proxy created in part one.

Schema Driven Web Service Client Development on Android, Part 1: Hello eBay Finding

| Comments

Scheam driven web service development is quite popular in Java world, JAXB and JAX-WS are both mature standard, and frameworks like CXF, Axis are famous amount many developers for fast service development. It’s common to do scheam driven developent on server side, can scheam driven client development be done on Android? Yes, it can. Today I will show you how do do scheam driven development on Android by leveraging following light-weight frameworks: