SlideShare a Scribd company logo
1 of 5
Download to read offline
REST-style Actionscript programming interface
  for message distribution using Amazon Simple
                  Queue Service
                                                K. Popovic, Z. Hocenski
                        Siemens d.d. / Communications, Media and Technology, Osijek, Croatia
           Faculty of Electrical Engineering / Institute of Automation and Process Computing, Osijek, Croatia
                                             kresimir.popovic@siemens.com


Abstract - Amazon Simple Queue Service (Amazon SQS) is          counterpart. In this model organizations are only
a message-oriented middleware in the cloud using software       responsible for deploying the portion of the applications
as a service model. It aims to eliminate the traditional        that interact with the web services and message queues.
overhead associated with operating in-house messaging
infrastructures by providing reduced costs, simplified access       Message and data exchange are an essential aspect of
to messaging resources, scalability and reliability. In order   any enterprise mobile application [3]. The ability to
to provide those benefits Amazon SQS leverages cloud            exchange messages or consume data from on-premise or
resources such as storage, network, memory, processing          cloud environments in a mobile device is, arguably, the
capacity. Using virtually unlimited cloud computing             most relevant element of an enterprise mobility platform.
resources, an Amazon SQS provides an internet scale             The key is to build components that do not have tight
messaging platform. This paper presents benefits and            dependencies on each other, so that if one component
examples of Amazon SQS programming interface developed          were to die (fail), sleep (not respond) or remain busy
in Actionscript 3.0 object-oriented programming language.       (slow to respond) for some reason, the other components
This interface was developed to enable Adobe Flex mobile        in the system are built so as to continue to work as if no
developers to facilitate integration efforts within             failure is happening. In essence, loose coupling isolates
organizations and between them using mobile devices             the various layers and components so that each component
(tablets and smartphones).                                      interacts asynchronously with the others and treats them
                                                                as a black box. Loosely coupled system can be build
                    I.    INTRODUCTION                          using messaging queues. If a queue is used to connect any
                                                                two components together, it can provide concurrency,
    Mobile computing has drastically impacted the social        high availability and mitigate load spikes.
and commercial aspects of our society [1]. Seeing the
explosion of mobile applications in the consumer world,             Today, technologies such as Amazon SQS [4],
companies can't avoid dreaming about revolutionizing            CloudMQ [5], Linxter [6], Microsoft Azure Message
their businesses with the presence of mobile applications.      Queue [7] and others offer simple cloud-based messaging
The ability of extending business capabilities to mobile        services to broker the communication between different
devices (tablets and smartphones) leads the priority list of    endpoints. In this paper benefits and examples of Amazon
most CIOs (Chief Information Officer) [2]. However, the         SQS programming interface developed in Actionscript 3.0
path to enterprise mobility goes beyond building sporadic       object-oriented programming language (library name:
applications for a specific line of business systems.           as3awsSDK.swc) are presented [8]. Interface is developed
Companies embarking on the enterprise mobility journey          as publicly available Community Contributed Software
need cohesive strategies for important mobile                   for thin clients [9].
infrastructure aspects such as device management,
                                                                    The goal of this paper is to present developed Amazon
identity, security, and monitoring, that are required to
                                                                SQS programming application interface for Actionscript
provide a true enterprise mobility experience. During the
                                                                3.0 and its benefits for Flex developer community.
last few years, cloud infrastructures have pushed the
frontiers of software development to areas never before             The paper is organized as follows: Section II lists
imagined. In the context of enterprise mobility, the cloud      recent available software development kits from
model and services present a unique model to simplify the       prominent cloud providers and open-source community.
challenges of the traditional enterprise mobility model and     Also benefits of Amazon Simple Queue Service (Amazon
to open new possibilities in the space. Conceptually, an        SQS) are considered, and mobile application portability
enterprise cloud mobility platform removes the                  issue solution is recommended. Section III presents
complexities of the mobile enterprise server from the           architecture of Amazon SQS API for Actionscript 3.0 and
corporate network by placing it in a cloud infrastructure       one use case sample how it can be used in practice.
where it can leverage various cloud services to enable its
native capabilities. A cloud enterprise mobility
infrastructure represents a higher simpler model from the
infrastructure    standpoint      than    its    on-premise
II.      RELATED WORK                           III.    AMAZON SQS APPLICATION PROGRAMMING
    As of recent, software development kits available                       INTERFACE FOR ACTIONSCRIPT 3.0
from prominent cloud providers and open-source                     Amazon SQS is used as message-passing mechanism
community provide APIs (libraries) that hide much of the      between components. It acts as glue that holds together
lower-level complexity, including authentication, request     different functional components. This not only helps in
retries, and error handling. They take the complexity out     making the different components loosely coupled, but
of coding directly against a web service interface. TABLE     also helps in building a more failure resilient system
I shows available software development kits from              overall. If one component is receiving and processing
different cloud providers.                                    requests faster than other components (an unbalanced
                                                              producer consumer situation), buffering will help make
                                                              the overall system more resilient to bursts of traffic (or
            TABLE I. SOFTWARE DEVELOPMENT KITS
                                                              load). Amazon SQS acts as a transient buffer between
  Software                        Cloud provider              two or more components (controllers). If a message is
 Development                                                  sent directly to a component, the receiver will need to
     Kit          Microsoft     Linxter    CloudMQ   Amazon
                                                              consume it at a rate dictated by the sender. For example,
                           Home computer                      if the system was slow or if the launch time of the cluster
                                                              was more than expected, the overall system would slow
     Java
                                                              down, as it would just have to wait. With message
                                                              queues, sender and receiver are decoupled and the queue
    .NET
                                                              service smoothens out any “spiky” message traffic. These
                                                              service benefits can be used by mobile devices in an
     PHP
                                                              innovative, simple and transparent way.
    Ruby
                                                              A. Characteristics of a good API
                               Mobile                            What are characteristics of a good application
                                                              programming interface (API)? Answer to this question
     iOS
                                                              has to be known to software developers before API
                                                              implementation.
   Android
                                                                       Easy to learn (steeper learning curve) - an easy-to-
  BlackBerry                                                            learn API features, consistent naming conventions
                                                                        and patterns, economy of concepts, and
                                                                        predictability. It uses the same name for the same
    Each provider provides several publicly available                   concept, and different names for different
libraries for different development environments. For                   concepts. A minimal API is easy to memorize
proper use developer needs to have technical knowledge                  because there is little to remember. A consistent
about the environment in which he/she develops. This can                API is easy to memorize because you can reapply
be time consuming and costly because e.g. for mobile                    what you learned in one part of the API when
development it is necessary to have iOS, BlackBerry and                 using a different part. The semantics should be
Android knowledge. Also, the same application needs to                  simple and clear, and follow the principle of least
be developed three times. Solution to the portability issue             surprise.
is to use technology which enables developers to write                 Hard to misuse - A well-designed API makes it
code once, and run anywhere. This is possible since June,               easier to write correct code than incorrect code,
2011 using Adobe Flex SDK (version 4.5 or later)                        and encourages good programming practices. It
framework [10]. Flex is a highly productive, open source                does not needlessly force the user to call methods
framework for building and maintaining expressive web                   in a strict order or to be aware of implicit side
applications that deploy consistently on all major                      effects or semantic oddities.
browsers, desktops and operating systems. This means
that source code written in Actionscript 3.0 can be also               Easy to read and maintain code that uses it -
compiled for all mobile devices. Knowing that, it was                   readable code can be concise or verbose. Either
prudent to develop an Actionscript 3.0 library for one of               way, it is always at the right level of abstraction—
cloud providers which offer message queue service.                      neither hiding important things nor forcing the
Purpose of this library is to enable Adobe Flex developers              software developer to specify irrelevant
to facilitate integration efforts within organizations and              information.
between them using mobile devices. The benefit of doing
it this way has impact on application maintenance costs.               Easy to extend - Libraries grow over time. New
Amazon SQS owned by Amazon Inc. was chosen as                           classes appear. Existing classes get new methods,
message middleware because of proven maturity when                      methods get new parameters, and enums get new
compared to others and due to Amazon’s vast cloud                       enum values. APIs should be designed with this in
market share.                                                           mind. The larger the API, the more likely the
                                                                        clashes between the new concepts and the existing
                                                                        concepts. In addition, binary compatibility
concerns must be taken into consideration during               deleteMessage - remove a previously received
         the original design phase.                                      message from a specified queue.
        Guidance above was taken as main beacon toward                  deleteMessageBatch - remove multiple previously
   good API during the design and development phase of                   received messages from a specified queue.
   Amazon SQS API for Actionscript 3.0. After
   development phase it was shown that developers                       setQueueAttributes - control queue settings like
   should strive for minimalism and consistency, but only                the amount of time that messages are locked after
   to the extent that they contribute to meeting the criteria            being read so they cannot be read again.
   listed above. Consistency coincides broadly with                     getQueueAttributes - get information about a
   conceptual integrity, the principle that a complex                    queue like the number of messages in it.
   system should have a coherent design, reflecting the
   vision of one architect.                                             getQueueUrl - get the queue URL.
Quote from F.P. Brooks [11]: „I contend that conceptual                 addPermission - add queue sharing for another
integrity is the most important consideration in system                  AWS account for a specified queue.
design. It is better to have a system omit certain
                                                                        removePermission - remove an Amazon AWS
anomalous features and improvements, but to reflect one
                                                                         account from queue sharing for a specified queue.
set of design ideas, than to have one that contains many
good but independent and uncoordinated ideas.“                          releaseResources – this is a special function which
                                                                         removes all event listeners and releases any
B. Architecture of developed Amazon SQS API for                          resources that might be held open on client side.
   Actionscript 3.0 – as3awsSDK.swc                                      Execution of this method minimizes memory
   Amazon SQS library for Actionscript 3.0                               consumption.
as3awsSDK.swc is consisted of three basic model types:
event model, interface model and class model. Interface                  Class model contains two core classes:
model       employs         a    simple       interface                 com.amazonaws.AmazonWebServiceClient             –
com.amazonaws.services.sqs.AmazonSQS (defined in                         abstract class which performs data stream
Amazon SQS WSDL version 2011-10-01) that is easy to                      encoding using createURLRequest protected
use and extend (see Figure 1).                                           function. It is designed as a base class which can
                                                                         be reused by other Amazon AWS services, e.g.
                                                                         Amazon Cloudwatch monitoring service [12],
                                                                         DynamoDB noSQL database [13], etc.
                                                                        com.amazonaws.services.sqs.AmazonSQSClient
                                                                         – queue client which contains implemented and
                                                                         documented asynchronous queue service public
                                                                         functions. Each function is unique and there is no
                                                                         dependence between each other.
                                                                           Event         model          uses         interface
       Figure 1. Basic architecture overview of Amazon SQS API for   flash.events.IEventDispatcher. The IEventDispatcher
                            Actionscript 3.0                         interface defines methods for adding or removing
                                                                     event listeners, checks whether specific types of event
    The following AmazonSQSClient requests defined by                listeners are registered, and dispatches events. Event
interface AmazonSQS are provided:                                    targets are an important part of the Flash® Player and
                                                                     Adobe AIR event model. The event target serves as
        createQueue - create queues for use with your               the focal point for how events flow through the display
         Amazon AWS account.                                         list hierarchy. When an HTTP/HTTPS COMPLETE
        listQueues - list your existing queues.                     event occurs, an event object is dispatched into the
                                                                     event flow from the root of the display list. The event
        deleteQueue - delete one of your queues.                    object makes a round-trip journey to the event target,
                                                                     which is conceptually divided into three phases: the
        sendMessage - add messages to a specified queue.
                                                                     capture phase includes the journey from the root to the
        sendMessageBatch - add multiple messages to a               last node before the event target's node; the target
         specified queue.                                            phase includes only the event target node; and the
                                                                     bubbling phase includes any subsequent nodes
        receiveMessage - return one or more messages                encountered on the return trip to the root of the display
         from a specified queue.                                     list.
        changeMessageVisibility - change the visibility                 HTTP(s) request responses in XML format are
         timeout of previously received message.                     caught by an event model, parsed and deserialized to
        changeMessageVisibilityBatch - change the                   Actionscript 3.0 result object for easier user handling.
         visibility timeout of multiple previously received          During XML namespace parsing, response format and
         messages.
mandatory parameters are checked if they are properly
   formatted, if not exception will be thrown.
   Usage of these three models guarantees consistency in
   future Amazon SQS API library upgrades. This means
   that Amazon SQS API can be used as a template for
   creation of new services in the future.

C. How to use Amazon SQS API for Actionscript 3.0
   For proper programmatic usage it is necessary to
understand that API only works in asynchronous
environment because it is based on Adobe Flash and                             Figure 3. Taxi reservation service
Adobe AIR technology. Every request (sendMessage
function, see Figure 2) has assigned two callback                   Use case description:
functions called when a specific event occurs.
                                                                            iPhone / Android / BlackBerry user opens
                                                                             Taxi reservation mobile application.
                                                                            User enters his first name, last name, pickup
                                                                             location, dropdown location, number of
                                                                             people and a phone number.
                                                                            Reservation request is send towards Amazon
                                                                             SQS queue TAXI_RESERVATION and
                                                                             stored there until service consumer (e.g.
                                                                             harvest server) pick it up.
                                                                            Harvest server checks every e.g. 30 seconds
                                                                             TAXI_RESERVATION queue status and
                                                                             harvests messages if there are any. When the
                                                                             message is consumed from queue it needs to
                                                                             be processed and stored into a database.
                                                                             After the message is consumed it needs to be
                                                                             deleted from the TAXI_RESERVATION
                                                                             queue.
                                                                            If a user reservation request can be served
                                                                             (taxi car is available) dispatcher will call the
                                                                             user and confirm reservation or send an SMS
                                                                             / e-mail.
                                                                     The advantage of working with queues is that if the
                                                                 harvest server is offline reservation records can be
                                                                 consumed later after harvest server comes back
  Figure 2. Amazon SQS sendMessage sample for Actionscript 3.0   online. With this degree of independence, taxi software
                                                                 components are protected from each other and can better
    ResultHandler function is called when positive HTTP/         recover from component failure. If the SOA (Service
HTTPS response event occurs (result code 200 OK) and             Oriented Architecture) is designed correctly, the failure
the faultHandler for negative event (result code >= 400).        of a single component should not take down other
Other       functions      defined       in      interface       components in the system and thus loose coupling creates
com.amazonaws.services.sqs.AmazonSQS are used in the             architectures that are more resilient. Moreover, this also
similar way. This means that developers will have a steep        lends itself better to creating a failover subsystem,
learning curve and become quite proficient in API usage          moving from one instance of a component to another
with a minimum amount of effort/time.                            without affecting the other components in the SOA.

D. Taxi reservation service – usecase sample                                         IV.     CONLUSION
    One of possible usage of mobile device and custom                In this paper Amazon Simple Queue Service (Amazon
developed as3awsSDK.swc library is for connecting to             SQS) programming application interface for Actionscript
Amazon SQS service to store taxi reservation messages            3.0 (as3awsSDK.swc) has been presented and its benefits
(see Figure 3). It can be quite useful when taxi dispatcher      for Flex developer community. Most valuable advantage
phone lines are busy. The mobile application which does          of programming application interface for Actionscript 3.0
reservation is portable to all mobile devices because it         (compiled with Flex SDK compiler 4.5 or greater) from
must be compiled with Flex compiler for proper library           technical point of view is portability. Code compiled with
usage.                                                           the Flex SDK compiler follows the slogan “write code
                                                                 once, and run anywhere”. It enables developers to deploy
cloud message queue enabled mobile application on                         [7]    Microsoft Azure Message Queue, Queue Service Rest API,
several different mobile OS result of which are reduced                          http://msdn.microsoft.com/en-
                                                                                 us/library/windowsazure/dd179363.aspx, February 05, 2012.
development costs and time. During the time of writing
                                                                          [8]    K. Popovic, Amazon SQS API library (version 1.4.1),
this paper library was downloaded by open source                                 https://bitbucket.org/Kresimir/as3awssdk/overview, February 05,
community 176 times.                                                             2012.
                                                                          [9]    Amazon Inc, Amazon AWS SDK library (actionscript 3.0),
                           REFERENCES                                            Community                    Contributed               Software,
                                                                                 http://aws.amazon.com/developertools/0564396818170928, May
[1]   Gartner, Inc. (information technology research and advisory                03, 2011.
      company), Gartner Forecasts Mobile App Store Revenues,
                                                                          [10]   Adobe Inc. Adobe Open Source Flex SDK compiler,
      http://techcrunch.com/2011/01/26/mobile-app-store-15-billion-
                                                                                 http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK,
      2011/, February 05, 2012.
                                                                                 February 05, 2012.
[2]   Sysbase (an SAP company), Mobile Enterprise Application
                                                                          [11]   F.P. Brooks, “The Mythical Man-Month: Essays on Software
      Platform,      http://www.sybase.com/mobilize/strategic-mobility,
                                                                                 Engineering”, Second Edition, ISBN-10: 0201835959, ISBN-13:
      February 05, 2012.
                                                                                 978-0201835953, August 12, 1995.
[3]   W. R. Schulte, “Cloud-Based Messaging Services and Technology
                                                                          [12]   Amazon               Inc,          Cloudwatch           service,
      Are Positioned for Rapid Growth”, Gartner research paper,
                                                                                 http://aws.amazon.com/cloudwatch/, February 05, 2012.
      January 24, 2011.
                                                                          [13]   Amazoin         Inc,      DynamoDB         noSQL       database,
[4]   Amazon Inc., Simple Queue Service, http://aws.amazon.com/sqs/,
                                                                                 http://aws.amazon.com/dynamodb/, February 05, 2012.
      February 05, 2012.
[5]   CloudMQ,        Message      Queuing      as      a      Service,
      http://www.cloudmq.com/, February 05, 2012.
[6]   Linxter,        Message-Orianted      Cloud         Middleware,
      http://www.cloudmessaging.net/, February 05, 2012.

More Related Content

What's hot

Тенденции развития современных Центров Обработки Данных
 Тенденции развития современных Центров Обработки Данных Тенденции развития современных Центров Обработки Данных
Тенденции развития современных Центров Обработки ДанныхCisco Russia
 
Was Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy Terry
Was Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy TerryWas Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy Terry
Was Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy TerryCarolyn Crowe
 
Apposite - Netropy WAN emualation
Apposite - Netropy WAN emualationApposite - Netropy WAN emualation
Apposite - Netropy WAN emualationhenharas
 
Gis In The Cloud
Gis In The CloudGis In The Cloud
Gis In The Cloudfn028791
 
Gen-i Cloud 101 presentation
Gen-i Cloud 101 presentationGen-i Cloud 101 presentation
Gen-i Cloud 101 presentationSimmy_online
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tv
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tvDOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tv
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tvIEEEGLOBALSOFTTECHNOLOGIES
 
Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...
Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...
Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...Carly Snodgrass
 
Cloud Computing, SOA and Web 2.0, an inevitable convergence
Cloud Computing, SOA and Web 2.0, an inevitable convergenceCloud Computing, SOA and Web 2.0, an inevitable convergence
Cloud Computing, SOA and Web 2.0, an inevitable convergenceDavid Karam
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11영호 라
 
T1 05 emc forum track introductions manoj chugh final
T1 05 emc forum track introductions manoj chugh finalT1 05 emc forum track introductions manoj chugh final
T1 05 emc forum track introductions manoj chugh finalEMC Forum India
 
Virtualizing Business Critical Apps
Virtualizing Business Critical AppsVirtualizing Business Critical Apps
Virtualizing Business Critical Appsheraldschelke
 
GlassFish Mobility Platform - Hans Hrasna
GlassFish Mobility Platform - Hans HrasnaGlassFish Mobility Platform - Hans Hrasna
GlassFish Mobility Platform - Hans HrasnaEduardo Pelegri-Llopart
 
Lenovo: The Cloud Over BYOD
Lenovo: The Cloud Over BYODLenovo: The Cloud Over BYOD
Lenovo: The Cloud Over BYODLenovo Education
 
Cloud computing
Cloud computingCloud computing
Cloud computingsaralaanuj
 
it's learning MLG integration
it's learning MLG integrationit's learning MLG integration
it's learning MLG integrationjab
 

What's hot (19)

Тенденции развития современных Центров Обработки Данных
 Тенденции развития современных Центров Обработки Данных Тенденции развития современных Центров Обработки Данных
Тенденции развития современных Центров Обработки Данных
 
Was Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy Terry
Was Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy TerryWas Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy Terry
Was Mobile And Private Cloud For Inside Sales Customers Web Cast By Kathy Terry
 
Apposite - Netropy WAN emualation
Apposite - Netropy WAN emualationApposite - Netropy WAN emualation
Apposite - Netropy WAN emualation
 
Gis In The Cloud
Gis In The CloudGis In The Cloud
Gis In The Cloud
 
Gen-i Cloud 101 presentation
Gen-i Cloud 101 presentationGen-i Cloud 101 presentation
Gen-i Cloud 101 presentation
 
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tv
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tvDOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tv
DOTNET 2013 IEEE CLOUDCOMPUTING PROJECT Cloud mov cloud based mobile social tv
 
Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...
Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...
Build A Flexible Application Infrastructure Environment Web Sphere Connectivi...
 
Cloud Computing, SOA and Web 2.0, an inevitable convergence
Cloud Computing, SOA and Web 2.0, an inevitable convergenceCloud Computing, SOA and Web 2.0, an inevitable convergence
Cloud Computing, SOA and Web 2.0, an inevitable convergence
 
Rfs4000 spec sheet
Rfs4000 spec sheetRfs4000 spec sheet
Rfs4000 spec sheet
 
Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11Tacademy techclinic-2012-07-11
Tacademy techclinic-2012-07-11
 
Cloud Adoption Trends 2012
Cloud Adoption Trends 2012Cloud Adoption Trends 2012
Cloud Adoption Trends 2012
 
666 670
666 670666 670
666 670
 
T1 05 emc forum track introductions manoj chugh final
T1 05 emc forum track introductions manoj chugh finalT1 05 emc forum track introductions manoj chugh final
T1 05 emc forum track introductions manoj chugh final
 
Virtualizing Business Critical Apps
Virtualizing Business Critical AppsVirtualizing Business Critical Apps
Virtualizing Business Critical Apps
 
GlassFish Mobility Platform - Hans Hrasna
GlassFish Mobility Platform - Hans HrasnaGlassFish Mobility Platform - Hans Hrasna
GlassFish Mobility Platform - Hans Hrasna
 
Lenovo: The Cloud Over BYOD
Lenovo: The Cloud Over BYODLenovo: The Cloud Over BYOD
Lenovo: The Cloud Over BYOD
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Cc unit 2 updated
Cc unit 2 updatedCc unit 2 updated
Cc unit 2 updated
 
it's learning MLG integration
it's learning MLG integrationit's learning MLG integration
it's learning MLG integration
 

Viewers also liked

ApacheCon-Flume-Kafka-2016
ApacheCon-Flume-Kafka-2016ApacheCon-Flume-Kafka-2016
ApacheCon-Flume-Kafka-2016Jayesh Thakrar
 
AWS SQS for better architecture
AWS SQS for better architectureAWS SQS for better architecture
AWS SQS for better architectureSaurabh Bangad
 
Embracing Open Source: Practice and Experience from Alibaba
Embracing Open Source: Practice and Experience from AlibabaEmbracing Open Source: Practice and Experience from Alibaba
Embracing Open Source: Practice and Experience from AlibabaWensong Zhang
 
Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...
Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...
Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...Amazon Web Services
 
AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...
AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...
AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...Amazon Web Services
 

Viewers also liked (7)

Amazon simple queue service
Amazon simple queue serviceAmazon simple queue service
Amazon simple queue service
 
ApacheCon-Flume-Kafka-2016
ApacheCon-Flume-Kafka-2016ApacheCon-Flume-Kafka-2016
ApacheCon-Flume-Kafka-2016
 
AWS SQS for better architecture
AWS SQS for better architectureAWS SQS for better architecture
AWS SQS for better architecture
 
Embracing Open Source: Practice and Experience from Alibaba
Embracing Open Source: Practice and Experience from AlibabaEmbracing Open Source: Practice and Experience from Alibaba
Embracing Open Source: Practice and Experience from Alibaba
 
Flume vs. kafka
Flume vs. kafkaFlume vs. kafka
Flume vs. kafka
 
Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...
Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...
Massive Message Processing with Amazon SQS and Amazon DynamoDB (ARC301) | AWS...
 
AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...
AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...
AWS re:Invent 2016: Analyzing Streaming Data in Real-time with Amazon Kinesis...
 

Similar to Amazon SQS Actionscript API for Mobile Messaging

Rapid cloudapplicationdevelopmentwithlimeds
Rapid cloudapplicationdevelopmentwithlimedsRapid cloudapplicationdevelopmentwithlimeds
Rapid cloudapplicationdevelopmentwithlimedsPhilippe Thiran
 
Oruta phase1 report
Oruta phase1 reportOruta phase1 report
Oruta phase1 reportsuthi
 
Cloud computing by Bharat Bodage
Cloud computing by Bharat BodageCloud computing by Bharat Bodage
Cloud computing by Bharat BodageBharat Bodage
 
Cyber forensics in cloud computing
Cyber forensics in cloud computingCyber forensics in cloud computing
Cyber forensics in cloud computingAlexander Decker
 
11.cyber forensics in cloud computing
11.cyber forensics in cloud computing11.cyber forensics in cloud computing
11.cyber forensics in cloud computingAlexander Decker
 
A proposal for implementing cloud computing in newspaper company
A proposal for implementing cloud computing in newspaper companyA proposal for implementing cloud computing in newspaper company
A proposal for implementing cloud computing in newspaper companyKingsley Mensah
 
Cloud Computing using MDA
Cloud Computing using MDACloud Computing using MDA
Cloud Computing using MDAProbal DasGupta
 
Chetanya Dabi CLOUD COMPUTING PPT.pptx
Chetanya Dabi CLOUD COMPUTING PPT.pptxChetanya Dabi CLOUD COMPUTING PPT.pptx
Chetanya Dabi CLOUD COMPUTING PPT.pptxChetanyaDabi
 
Apprenda - Overview of the Apprenda Platform
Apprenda - Overview of the Apprenda PlatformApprenda - Overview of the Apprenda Platform
Apprenda - Overview of the Apprenda PlatformApprenda
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
A review on serverless architectures - function as a service (FaaS) in cloud ...
A review on serverless architectures - function as a service (FaaS) in cloud ...A review on serverless architectures - function as a service (FaaS) in cloud ...
A review on serverless architectures - function as a service (FaaS) in cloud ...TELKOMNIKA JOURNAL
 
Cloud_on_Linux_Operating_System.pdf
Cloud_on_Linux_Operating_System.pdfCloud_on_Linux_Operating_System.pdf
Cloud_on_Linux_Operating_System.pdfPalanikumar72221
 
Access security on cloud computing implemented in hadoop system
Access security on cloud computing implemented in hadoop systemAccess security on cloud computing implemented in hadoop system
Access security on cloud computing implemented in hadoop systemJoão Gabriel Lima
 
Ppt on cloud computing
Ppt on cloud computingPpt on cloud computing
Ppt on cloud computingPradeep Bhatia
 
Cloud Computing Security Issues in Infrastructure as a Service” report
Cloud Computing Security Issues in Infrastructure as a Service” reportCloud Computing Security Issues in Infrastructure as a Service” report
Cloud Computing Security Issues in Infrastructure as a Service” reportVivek Maurya
 

Similar to Amazon SQS Actionscript API for Mobile Messaging (20)

Middleware Technologies ppt
Middleware Technologies pptMiddleware Technologies ppt
Middleware Technologies ppt
 
Rapid cloudapplicationdevelopmentwithlimeds
Rapid cloudapplicationdevelopmentwithlimedsRapid cloudapplicationdevelopmentwithlimeds
Rapid cloudapplicationdevelopmentwithlimeds
 
Oruta phase1 report
Oruta phase1 reportOruta phase1 report
Oruta phase1 report
 
Cloud computing by Bharat Bodage
Cloud computing by Bharat BodageCloud computing by Bharat Bodage
Cloud computing by Bharat Bodage
 
Cyber forensics in cloud computing
Cyber forensics in cloud computingCyber forensics in cloud computing
Cyber forensics in cloud computing
 
11.cyber forensics in cloud computing
11.cyber forensics in cloud computing11.cyber forensics in cloud computing
11.cyber forensics in cloud computing
 
A proposal for implementing cloud computing in newspaper company
A proposal for implementing cloud computing in newspaper companyA proposal for implementing cloud computing in newspaper company
A proposal for implementing cloud computing in newspaper company
 
Cloud Computing using MDA
Cloud Computing using MDACloud Computing using MDA
Cloud Computing using MDA
 
Chetanya Dabi CLOUD COMPUTING PPT.pptx
Chetanya Dabi CLOUD COMPUTING PPT.pptxChetanya Dabi CLOUD COMPUTING PPT.pptx
Chetanya Dabi CLOUD COMPUTING PPT.pptx
 
Apprenda - Overview of the Apprenda Platform
Apprenda - Overview of the Apprenda PlatformApprenda - Overview of the Apprenda Platform
Apprenda - Overview of the Apprenda Platform
 
Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)Welcome to International Journal of Engineering Research and Development (IJERD)
Welcome to International Journal of Engineering Research and Development (IJERD)
 
Cloud technologies
Cloud technologiesCloud technologies
Cloud technologies
 
A review on serverless architectures - function as a service (FaaS) in cloud ...
A review on serverless architectures - function as a service (FaaS) in cloud ...A review on serverless architectures - function as a service (FaaS) in cloud ...
A review on serverless architectures - function as a service (FaaS) in cloud ...
 
Cloud_on_Linux_Operating_System.pdf
Cloud_on_Linux_Operating_System.pdfCloud_on_Linux_Operating_System.pdf
Cloud_on_Linux_Operating_System.pdf
 
Access security on cloud computing implemented in hadoop system
Access security on cloud computing implemented in hadoop systemAccess security on cloud computing implemented in hadoop system
Access security on cloud computing implemented in hadoop system
 
Ppt on cloud computing
Ppt on cloud computingPpt on cloud computing
Ppt on cloud computing
 
484 488
484 488484 488
484 488
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Cloud Computing Security Issues in Infrastructure as a Service” report
Cloud Computing Security Issues in Infrastructure as a Service” reportCloud Computing Security Issues in Infrastructure as a Service” report
Cloud Computing Security Issues in Infrastructure as a Service” report
 

More from Kresimir Popovic

Amazon_AWS_IAM_2023_Cert.pdf
Amazon_AWS_IAM_2023_Cert.pdfAmazon_AWS_IAM_2023_Cert.pdf
Amazon_AWS_IAM_2023_Cert.pdfKresimir Popovic
 
Zero_Harm_Culture_@_IC_for_Employees.pdf
Zero_Harm_Culture_@_IC_for_Employees.pdfZero_Harm_Culture_@_IC_for_Employees.pdf
Zero_Harm_Culture_@_IC_for_Employees.pdfKresimir Popovic
 
Functional Programming Principles - 03.06.2013.pdf
Functional Programming Principles - 03.06.2013.pdfFunctional Programming Principles - 03.06.2013.pdf
Functional Programming Principles - 03.06.2013.pdfKresimir Popovic
 
Open_Source_Software_Basics.pdf
Open_Source_Software_Basics.pdfOpen_Source_Software_Basics.pdf
Open_Source_Software_Basics.pdfKresimir Popovic
 
SECURE- Throughout the day - Part 1.pdf
SECURE- Throughout the day - Part 1.pdfSECURE- Throughout the day - Part 1.pdf
SECURE- Throughout the day - Part 1.pdfKresimir Popovic
 
SECURE- Throughout the day - Part 3.pdf
SECURE- Throughout the day - Part 3.pdfSECURE- Throughout the day - Part 3.pdf
SECURE- Throughout the day - Part 3.pdfKresimir Popovic
 
SECURE- Throughout the day - Part 2.pdf
SECURE- Throughout the day - Part 2.pdfSECURE- Throughout the day - Part 2.pdf
SECURE- Throughout the day - Part 2.pdfKresimir Popovic
 
Open_Source_Software_Overview.pdf
Open_Source_Software_Overview.pdfOpen_Source_Software_Overview.pdf
Open_Source_Software_Overview.pdfKresimir Popovic
 
Global Bribery and Corruption Certificate.pdf
Global Bribery and Corruption Certificate.pdfGlobal Bribery and Corruption Certificate.pdf
Global Bribery and Corruption Certificate.pdfKresimir Popovic
 
Siemens Compliance (SIECO).pdf
Siemens Compliance (SIECO).pdfSiemens Compliance (SIECO).pdf
Siemens Compliance (SIECO).pdfKresimir Popovic
 
Certificate - Protection against Social Engineering.pdf
Certificate - Protection against Social Engineering.pdfCertificate - Protection against Social Engineering.pdf
Certificate - Protection against Social Engineering.pdfKresimir Popovic
 
Global Competition Certificate.pdf
Global Competition Certificate.pdfGlobal Competition Certificate.pdf
Global Competition Certificate.pdfKresimir Popovic
 
Business Conduct Guidelines (BCG) Certificate.pdf
Business Conduct Guidelines (BCG) Certificate.pdfBusiness Conduct Guidelines (BCG) Certificate.pdf
Business Conduct Guidelines (BCG) Certificate.pdfKresimir Popovic
 
udemy - oauth2 and openid crash course.pdf
udemy - oauth2 and openid crash course.pdfudemy - oauth2 and openid crash course.pdf
udemy - oauth2 and openid crash course.pdfKresimir Popovic
 
Udemy-Starting with Quarkus - March 2022.pdf
Udemy-Starting with Quarkus - March 2022.pdfUdemy-Starting with Quarkus - March 2022.pdf
Udemy-Starting with Quarkus - March 2022.pdfKresimir Popovic
 
Kubernetes_DeepDive_02-2022.pdf
Kubernetes_DeepDive_02-2022.pdfKubernetes_DeepDive_02-2022.pdf
Kubernetes_DeepDive_02-2022.pdfKresimir Popovic
 
NGINX Server Deep Dive March 2002.pdf
NGINX Server Deep Dive March 2002.pdfNGINX Server Deep Dive March 2002.pdf
NGINX Server Deep Dive March 2002.pdfKresimir Popovic
 
dockerquickstartlegacy-190215093445.pdf
dockerquickstartlegacy-190215093445.pdfdockerquickstartlegacy-190215093445.pdf
dockerquickstartlegacy-190215093445.pdfKresimir Popovic
 
Remote Communication across cultures - Session.pdf
Remote Communication across cultures - Session.pdfRemote Communication across cultures - Session.pdf
Remote Communication across cultures - Session.pdfKresimir Popovic
 
Atos Financial Management Training.pdf
Atos Financial Management Training.pdfAtos Financial Management Training.pdf
Atos Financial Management Training.pdfKresimir Popovic
 

More from Kresimir Popovic (20)

Amazon_AWS_IAM_2023_Cert.pdf
Amazon_AWS_IAM_2023_Cert.pdfAmazon_AWS_IAM_2023_Cert.pdf
Amazon_AWS_IAM_2023_Cert.pdf
 
Zero_Harm_Culture_@_IC_for_Employees.pdf
Zero_Harm_Culture_@_IC_for_Employees.pdfZero_Harm_Culture_@_IC_for_Employees.pdf
Zero_Harm_Culture_@_IC_for_Employees.pdf
 
Functional Programming Principles - 03.06.2013.pdf
Functional Programming Principles - 03.06.2013.pdfFunctional Programming Principles - 03.06.2013.pdf
Functional Programming Principles - 03.06.2013.pdf
 
Open_Source_Software_Basics.pdf
Open_Source_Software_Basics.pdfOpen_Source_Software_Basics.pdf
Open_Source_Software_Basics.pdf
 
SECURE- Throughout the day - Part 1.pdf
SECURE- Throughout the day - Part 1.pdfSECURE- Throughout the day - Part 1.pdf
SECURE- Throughout the day - Part 1.pdf
 
SECURE- Throughout the day - Part 3.pdf
SECURE- Throughout the day - Part 3.pdfSECURE- Throughout the day - Part 3.pdf
SECURE- Throughout the day - Part 3.pdf
 
SECURE- Throughout the day - Part 2.pdf
SECURE- Throughout the day - Part 2.pdfSECURE- Throughout the day - Part 2.pdf
SECURE- Throughout the day - Part 2.pdf
 
Open_Source_Software_Overview.pdf
Open_Source_Software_Overview.pdfOpen_Source_Software_Overview.pdf
Open_Source_Software_Overview.pdf
 
Global Bribery and Corruption Certificate.pdf
Global Bribery and Corruption Certificate.pdfGlobal Bribery and Corruption Certificate.pdf
Global Bribery and Corruption Certificate.pdf
 
Siemens Compliance (SIECO).pdf
Siemens Compliance (SIECO).pdfSiemens Compliance (SIECO).pdf
Siemens Compliance (SIECO).pdf
 
Certificate - Protection against Social Engineering.pdf
Certificate - Protection against Social Engineering.pdfCertificate - Protection against Social Engineering.pdf
Certificate - Protection against Social Engineering.pdf
 
Global Competition Certificate.pdf
Global Competition Certificate.pdfGlobal Competition Certificate.pdf
Global Competition Certificate.pdf
 
Business Conduct Guidelines (BCG) Certificate.pdf
Business Conduct Guidelines (BCG) Certificate.pdfBusiness Conduct Guidelines (BCG) Certificate.pdf
Business Conduct Guidelines (BCG) Certificate.pdf
 
udemy - oauth2 and openid crash course.pdf
udemy - oauth2 and openid crash course.pdfudemy - oauth2 and openid crash course.pdf
udemy - oauth2 and openid crash course.pdf
 
Udemy-Starting with Quarkus - March 2022.pdf
Udemy-Starting with Quarkus - March 2022.pdfUdemy-Starting with Quarkus - March 2022.pdf
Udemy-Starting with Quarkus - March 2022.pdf
 
Kubernetes_DeepDive_02-2022.pdf
Kubernetes_DeepDive_02-2022.pdfKubernetes_DeepDive_02-2022.pdf
Kubernetes_DeepDive_02-2022.pdf
 
NGINX Server Deep Dive March 2002.pdf
NGINX Server Deep Dive March 2002.pdfNGINX Server Deep Dive March 2002.pdf
NGINX Server Deep Dive March 2002.pdf
 
dockerquickstartlegacy-190215093445.pdf
dockerquickstartlegacy-190215093445.pdfdockerquickstartlegacy-190215093445.pdf
dockerquickstartlegacy-190215093445.pdf
 
Remote Communication across cultures - Session.pdf
Remote Communication across cultures - Session.pdfRemote Communication across cultures - Session.pdf
Remote Communication across cultures - Session.pdf
 
Atos Financial Management Training.pdf
Atos Financial Management Training.pdfAtos Financial Management Training.pdf
Atos Financial Management Training.pdf
 

Amazon SQS Actionscript API for Mobile Messaging

  • 1. REST-style Actionscript programming interface for message distribution using Amazon Simple Queue Service K. Popovic, Z. Hocenski Siemens d.d. / Communications, Media and Technology, Osijek, Croatia Faculty of Electrical Engineering / Institute of Automation and Process Computing, Osijek, Croatia kresimir.popovic@siemens.com Abstract - Amazon Simple Queue Service (Amazon SQS) is counterpart. In this model organizations are only a message-oriented middleware in the cloud using software responsible for deploying the portion of the applications as a service model. It aims to eliminate the traditional that interact with the web services and message queues. overhead associated with operating in-house messaging infrastructures by providing reduced costs, simplified access Message and data exchange are an essential aspect of to messaging resources, scalability and reliability. In order any enterprise mobile application [3]. The ability to to provide those benefits Amazon SQS leverages cloud exchange messages or consume data from on-premise or resources such as storage, network, memory, processing cloud environments in a mobile device is, arguably, the capacity. Using virtually unlimited cloud computing most relevant element of an enterprise mobility platform. resources, an Amazon SQS provides an internet scale The key is to build components that do not have tight messaging platform. This paper presents benefits and dependencies on each other, so that if one component examples of Amazon SQS programming interface developed were to die (fail), sleep (not respond) or remain busy in Actionscript 3.0 object-oriented programming language. (slow to respond) for some reason, the other components This interface was developed to enable Adobe Flex mobile in the system are built so as to continue to work as if no developers to facilitate integration efforts within failure is happening. In essence, loose coupling isolates organizations and between them using mobile devices the various layers and components so that each component (tablets and smartphones). interacts asynchronously with the others and treats them as a black box. Loosely coupled system can be build I. INTRODUCTION using messaging queues. If a queue is used to connect any two components together, it can provide concurrency, Mobile computing has drastically impacted the social high availability and mitigate load spikes. and commercial aspects of our society [1]. Seeing the explosion of mobile applications in the consumer world, Today, technologies such as Amazon SQS [4], companies can't avoid dreaming about revolutionizing CloudMQ [5], Linxter [6], Microsoft Azure Message their businesses with the presence of mobile applications. Queue [7] and others offer simple cloud-based messaging The ability of extending business capabilities to mobile services to broker the communication between different devices (tablets and smartphones) leads the priority list of endpoints. In this paper benefits and examples of Amazon most CIOs (Chief Information Officer) [2]. However, the SQS programming interface developed in Actionscript 3.0 path to enterprise mobility goes beyond building sporadic object-oriented programming language (library name: applications for a specific line of business systems. as3awsSDK.swc) are presented [8]. Interface is developed Companies embarking on the enterprise mobility journey as publicly available Community Contributed Software need cohesive strategies for important mobile for thin clients [9]. infrastructure aspects such as device management, The goal of this paper is to present developed Amazon identity, security, and monitoring, that are required to SQS programming application interface for Actionscript provide a true enterprise mobility experience. During the 3.0 and its benefits for Flex developer community. last few years, cloud infrastructures have pushed the frontiers of software development to areas never before The paper is organized as follows: Section II lists imagined. In the context of enterprise mobility, the cloud recent available software development kits from model and services present a unique model to simplify the prominent cloud providers and open-source community. challenges of the traditional enterprise mobility model and Also benefits of Amazon Simple Queue Service (Amazon to open new possibilities in the space. Conceptually, an SQS) are considered, and mobile application portability enterprise cloud mobility platform removes the issue solution is recommended. Section III presents complexities of the mobile enterprise server from the architecture of Amazon SQS API for Actionscript 3.0 and corporate network by placing it in a cloud infrastructure one use case sample how it can be used in practice. where it can leverage various cloud services to enable its native capabilities. A cloud enterprise mobility infrastructure represents a higher simpler model from the infrastructure standpoint than its on-premise
  • 2. II. RELATED WORK III. AMAZON SQS APPLICATION PROGRAMMING As of recent, software development kits available INTERFACE FOR ACTIONSCRIPT 3.0 from prominent cloud providers and open-source Amazon SQS is used as message-passing mechanism community provide APIs (libraries) that hide much of the between components. It acts as glue that holds together lower-level complexity, including authentication, request different functional components. This not only helps in retries, and error handling. They take the complexity out making the different components loosely coupled, but of coding directly against a web service interface. TABLE also helps in building a more failure resilient system I shows available software development kits from overall. If one component is receiving and processing different cloud providers. requests faster than other components (an unbalanced producer consumer situation), buffering will help make the overall system more resilient to bursts of traffic (or TABLE I. SOFTWARE DEVELOPMENT KITS load). Amazon SQS acts as a transient buffer between Software Cloud provider two or more components (controllers). If a message is Development sent directly to a component, the receiver will need to Kit Microsoft Linxter CloudMQ Amazon consume it at a rate dictated by the sender. For example, Home computer if the system was slow or if the launch time of the cluster was more than expected, the overall system would slow Java down, as it would just have to wait. With message queues, sender and receiver are decoupled and the queue .NET service smoothens out any “spiky” message traffic. These service benefits can be used by mobile devices in an PHP innovative, simple and transparent way. Ruby A. Characteristics of a good API Mobile What are characteristics of a good application programming interface (API)? Answer to this question iOS has to be known to software developers before API implementation. Android  Easy to learn (steeper learning curve) - an easy-to- BlackBerry learn API features, consistent naming conventions and patterns, economy of concepts, and predictability. It uses the same name for the same Each provider provides several publicly available concept, and different names for different libraries for different development environments. For concepts. A minimal API is easy to memorize proper use developer needs to have technical knowledge because there is little to remember. A consistent about the environment in which he/she develops. This can API is easy to memorize because you can reapply be time consuming and costly because e.g. for mobile what you learned in one part of the API when development it is necessary to have iOS, BlackBerry and using a different part. The semantics should be Android knowledge. Also, the same application needs to simple and clear, and follow the principle of least be developed three times. Solution to the portability issue surprise. is to use technology which enables developers to write  Hard to misuse - A well-designed API makes it code once, and run anywhere. This is possible since June, easier to write correct code than incorrect code, 2011 using Adobe Flex SDK (version 4.5 or later) and encourages good programming practices. It framework [10]. Flex is a highly productive, open source does not needlessly force the user to call methods framework for building and maintaining expressive web in a strict order or to be aware of implicit side applications that deploy consistently on all major effects or semantic oddities. browsers, desktops and operating systems. This means that source code written in Actionscript 3.0 can be also  Easy to read and maintain code that uses it - compiled for all mobile devices. Knowing that, it was readable code can be concise or verbose. Either prudent to develop an Actionscript 3.0 library for one of way, it is always at the right level of abstraction— cloud providers which offer message queue service. neither hiding important things nor forcing the Purpose of this library is to enable Adobe Flex developers software developer to specify irrelevant to facilitate integration efforts within organizations and information. between them using mobile devices. The benefit of doing it this way has impact on application maintenance costs.  Easy to extend - Libraries grow over time. New Amazon SQS owned by Amazon Inc. was chosen as classes appear. Existing classes get new methods, message middleware because of proven maturity when methods get new parameters, and enums get new compared to others and due to Amazon’s vast cloud enum values. APIs should be designed with this in market share. mind. The larger the API, the more likely the clashes between the new concepts and the existing concepts. In addition, binary compatibility
  • 3. concerns must be taken into consideration during  deleteMessage - remove a previously received the original design phase. message from a specified queue. Guidance above was taken as main beacon toward  deleteMessageBatch - remove multiple previously good API during the design and development phase of received messages from a specified queue. Amazon SQS API for Actionscript 3.0. After development phase it was shown that developers  setQueueAttributes - control queue settings like should strive for minimalism and consistency, but only the amount of time that messages are locked after to the extent that they contribute to meeting the criteria being read so they cannot be read again. listed above. Consistency coincides broadly with  getQueueAttributes - get information about a conceptual integrity, the principle that a complex queue like the number of messages in it. system should have a coherent design, reflecting the vision of one architect.  getQueueUrl - get the queue URL. Quote from F.P. Brooks [11]: „I contend that conceptual  addPermission - add queue sharing for another integrity is the most important consideration in system AWS account for a specified queue. design. It is better to have a system omit certain  removePermission - remove an Amazon AWS anomalous features and improvements, but to reflect one account from queue sharing for a specified queue. set of design ideas, than to have one that contains many good but independent and uncoordinated ideas.“  releaseResources – this is a special function which removes all event listeners and releases any B. Architecture of developed Amazon SQS API for resources that might be held open on client side. Actionscript 3.0 – as3awsSDK.swc Execution of this method minimizes memory Amazon SQS library for Actionscript 3.0 consumption. as3awsSDK.swc is consisted of three basic model types: event model, interface model and class model. Interface Class model contains two core classes: model employs a simple interface  com.amazonaws.AmazonWebServiceClient – com.amazonaws.services.sqs.AmazonSQS (defined in abstract class which performs data stream Amazon SQS WSDL version 2011-10-01) that is easy to encoding using createURLRequest protected use and extend (see Figure 1). function. It is designed as a base class which can be reused by other Amazon AWS services, e.g. Amazon Cloudwatch monitoring service [12], DynamoDB noSQL database [13], etc.  com.amazonaws.services.sqs.AmazonSQSClient – queue client which contains implemented and documented asynchronous queue service public functions. Each function is unique and there is no dependence between each other. Event model uses interface Figure 1. Basic architecture overview of Amazon SQS API for flash.events.IEventDispatcher. The IEventDispatcher Actionscript 3.0 interface defines methods for adding or removing event listeners, checks whether specific types of event The following AmazonSQSClient requests defined by listeners are registered, and dispatches events. Event interface AmazonSQS are provided: targets are an important part of the Flash® Player and Adobe AIR event model. The event target serves as  createQueue - create queues for use with your the focal point for how events flow through the display Amazon AWS account. list hierarchy. When an HTTP/HTTPS COMPLETE  listQueues - list your existing queues. event occurs, an event object is dispatched into the event flow from the root of the display list. The event  deleteQueue - delete one of your queues. object makes a round-trip journey to the event target, which is conceptually divided into three phases: the  sendMessage - add messages to a specified queue. capture phase includes the journey from the root to the  sendMessageBatch - add multiple messages to a last node before the event target's node; the target specified queue. phase includes only the event target node; and the bubbling phase includes any subsequent nodes  receiveMessage - return one or more messages encountered on the return trip to the root of the display from a specified queue. list.  changeMessageVisibility - change the visibility HTTP(s) request responses in XML format are timeout of previously received message. caught by an event model, parsed and deserialized to  changeMessageVisibilityBatch - change the Actionscript 3.0 result object for easier user handling. visibility timeout of multiple previously received During XML namespace parsing, response format and messages.
  • 4. mandatory parameters are checked if they are properly formatted, if not exception will be thrown. Usage of these three models guarantees consistency in future Amazon SQS API library upgrades. This means that Amazon SQS API can be used as a template for creation of new services in the future. C. How to use Amazon SQS API for Actionscript 3.0 For proper programmatic usage it is necessary to understand that API only works in asynchronous environment because it is based on Adobe Flash and Figure 3. Taxi reservation service Adobe AIR technology. Every request (sendMessage function, see Figure 2) has assigned two callback Use case description: functions called when a specific event occurs.  iPhone / Android / BlackBerry user opens Taxi reservation mobile application.  User enters his first name, last name, pickup location, dropdown location, number of people and a phone number.  Reservation request is send towards Amazon SQS queue TAXI_RESERVATION and stored there until service consumer (e.g. harvest server) pick it up.  Harvest server checks every e.g. 30 seconds TAXI_RESERVATION queue status and harvests messages if there are any. When the message is consumed from queue it needs to be processed and stored into a database. After the message is consumed it needs to be deleted from the TAXI_RESERVATION queue.  If a user reservation request can be served (taxi car is available) dispatcher will call the user and confirm reservation or send an SMS / e-mail. The advantage of working with queues is that if the harvest server is offline reservation records can be consumed later after harvest server comes back Figure 2. Amazon SQS sendMessage sample for Actionscript 3.0 online. With this degree of independence, taxi software components are protected from each other and can better ResultHandler function is called when positive HTTP/ recover from component failure. If the SOA (Service HTTPS response event occurs (result code 200 OK) and Oriented Architecture) is designed correctly, the failure the faultHandler for negative event (result code >= 400). of a single component should not take down other Other functions defined in interface components in the system and thus loose coupling creates com.amazonaws.services.sqs.AmazonSQS are used in the architectures that are more resilient. Moreover, this also similar way. This means that developers will have a steep lends itself better to creating a failover subsystem, learning curve and become quite proficient in API usage moving from one instance of a component to another with a minimum amount of effort/time. without affecting the other components in the SOA. D. Taxi reservation service – usecase sample IV. CONLUSION One of possible usage of mobile device and custom In this paper Amazon Simple Queue Service (Amazon developed as3awsSDK.swc library is for connecting to SQS) programming application interface for Actionscript Amazon SQS service to store taxi reservation messages 3.0 (as3awsSDK.swc) has been presented and its benefits (see Figure 3). It can be quite useful when taxi dispatcher for Flex developer community. Most valuable advantage phone lines are busy. The mobile application which does of programming application interface for Actionscript 3.0 reservation is portable to all mobile devices because it (compiled with Flex SDK compiler 4.5 or greater) from must be compiled with Flex compiler for proper library technical point of view is portability. Code compiled with usage. the Flex SDK compiler follows the slogan “write code once, and run anywhere”. It enables developers to deploy
  • 5. cloud message queue enabled mobile application on [7] Microsoft Azure Message Queue, Queue Service Rest API, several different mobile OS result of which are reduced http://msdn.microsoft.com/en- us/library/windowsazure/dd179363.aspx, February 05, 2012. development costs and time. During the time of writing [8] K. Popovic, Amazon SQS API library (version 1.4.1), this paper library was downloaded by open source https://bitbucket.org/Kresimir/as3awssdk/overview, February 05, community 176 times. 2012. [9] Amazon Inc, Amazon AWS SDK library (actionscript 3.0), REFERENCES Community Contributed Software, http://aws.amazon.com/developertools/0564396818170928, May [1] Gartner, Inc. (information technology research and advisory 03, 2011. company), Gartner Forecasts Mobile App Store Revenues, [10] Adobe Inc. Adobe Open Source Flex SDK compiler, http://techcrunch.com/2011/01/26/mobile-app-store-15-billion- http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK, 2011/, February 05, 2012. February 05, 2012. [2] Sysbase (an SAP company), Mobile Enterprise Application [11] F.P. Brooks, “The Mythical Man-Month: Essays on Software Platform, http://www.sybase.com/mobilize/strategic-mobility, Engineering”, Second Edition, ISBN-10: 0201835959, ISBN-13: February 05, 2012. 978-0201835953, August 12, 1995. [3] W. R. Schulte, “Cloud-Based Messaging Services and Technology [12] Amazon Inc, Cloudwatch service, Are Positioned for Rapid Growth”, Gartner research paper, http://aws.amazon.com/cloudwatch/, February 05, 2012. January 24, 2011. [13] Amazoin Inc, DynamoDB noSQL database, [4] Amazon Inc., Simple Queue Service, http://aws.amazon.com/sqs/, http://aws.amazon.com/dynamodb/, February 05, 2012. February 05, 2012. [5] CloudMQ, Message Queuing as a Service, http://www.cloudmq.com/, February 05, 2012. [6] Linxter, Message-Orianted Cloud Middleware, http://www.cloudmessaging.net/, February 05, 2012.