Implementing Web Applications as Social Machines Composition: a ...

5 downloads 132 Views 145KB Size Report
Examples of this scenario are the development of. Facebook, Twitter, Yahoo!, Salesforce, Google, Amazon and many others, that makes their APIs available for ...
Implementing Web Applications as Social Machines Composition: a Case Study Kellyton dos Santos Brito1,2, Lenin Ernesto Abadie Otero2, Patrícia Fontinele Muniz2, Leandro Marques Nascimento1,2

Vanilson André de Arruda Burégio2, Vinicius Cardoso Garcia2, Silvio Romero de Lemos Meira2,3 2

Informatics Center – Federal University of Pernambuco 3 C.E.S.A.R - Recife, Brazil [vaab, vcg, srlm]@cin.ufpe.br

1

DEINFO – Federal Rural University of Pernambuco Recife, Brazil [ksb, leao, pfm, lmn]@cin.ufpe.br

Abstract: With the evolution of the web and the concepts of web 3.0 as known as programmable web, several issues need to be studied in order to develop, deploy and use this new kind of application in a more effective way, such as communication between systems, unstructured data and non-scalable protocols, among others issues. In this regard, a new concept – named Social Machines – emerged to describe web based information systems that interact for a common purpose. In order to apply and validate in practice this new model, in this paper we describe a case study which implements a web application that is a composition of several public and well-known services from different application domains, such as Wikipedia, Flickr, Twitter, Google Places and Google Maps, following the Social Machines’ model. In the end, we present the results and some improvement suggestions for the model. Keywords: social machines, web development, applications, programmable web, case study.

sociable

I. INTRODUCTION In web 3.0, the web as a programming platform [1], software is developed for the web, through the web, and in the web, using the web both as programming platform and deployment and execution environments. Thus, nowadays computing means connecting [2], due to the fact that developing software is almost the same as connecting services [3]. Examples of this scenario are the development of Facebook, Twitter, Yahoo!, Salesforce, Google, Amazon and many others, that makes their APIs available for anyone to develop applications that interact with their services. In addition to those popular APIs, there are several public APIs and several applications that use them. For example, the ProgrammableWeb website1 reached 5000 APIs in February 2012, and in the same month it listed more than 6500 mashups using them. Although there have been many studies about the future of the internet and concepts such as web 3.0, programmable web [1, 4], linked data [5] and semantic web [6, 7], the segmentation of data and the issues regarding the communication among systems, unstructured data, unreliable parts and non-scalable protocols are all native characteristics of the internet that needs a unifying view and explanations in 1

order to be developed, deployed and used in a more efficient and effective way. Furthermore, the read/write and programmable web are recent enough to represent very serious difficulties in understanding their basic elements and how they can be efficiently combined to develop real, practical systems in either personal, social or enterprise contexts. So, Meira et al. [8, 9] defined the concept of a web of Social Machines, in order to provide a common and coherent conceptual basis for understanding this still immature, upcoming and possibly highly innovative phase of software development. In this context, in order to validate the Social Machines model and to test solutions for open issues, in this paper we revisited and applied the concepts of social machines, by performing a case study of a new application, according to following structure: in Section II we briefly present the Social Machines concept; in Section III we present a case study with the implementation of an application using the concept and guidelines; Section IV discusses the benefits, difficulties and challenges; and Section V concludes the paper and presents future works. II. THE WEB OF SOCIAL MACHINES The concept of Social Machines overlaps other research fields and issues currently well studied such as SaaS, Cloud Computing, SOA and Social Networks, but we have not found works that directly deals with the concept adopted by this study. Roush [2] proposed Social Machine representing human operated machines responsible for socializing information among communities; Patton [10] defines them as virtual machines operating in given social fields; Fuglsang [11] discussed them as systems that (in society) consume, produce and record information and are connected at large; and Hendler [12] discusses social machines based on Berners-Lee [13] who defines social machines as machines that do the system and social administration while the people do the creative work. In addition, the robotics view of a social machine is that of one that can relate to people [14]. The social machine concept adopted by this work is an abstract model to describe web based information systems that

www.programmableweb.com

311

could be a practical way of dealing with the complexity of the emerging programmable web. The concept starts from Kevin Kelly, of Wired fame, that is quoted as having said once: “The internet is the most reliable machine ever made. It's made from imperfect, unreliable parts, connected together, to make the most reliable thing we have”. Thus, the social machines are these parts, which connected together compose a functional web system. A Social Machine (SM) receives requests (Req) from other SM’s and returns responses (Resp). The requests are converted to inputs (I) for a processing unit (P), which has states (S) and produces outputs (O). In addition, there are rules that define relationships (R) with other SMs, under a specific set of constraints (Const). Formally, a SM can be defined as the tuple SM = . More detailed description of elements can be found at [8, 9]. In addition, SMs are sociable stuff and, in nearly all cases, each one should provide means to interact with one another, giving the developer the liberty to connect any number of SMs through the Web in order to form different networks and implement new services from the ones that already exist. The idea behind SMs is to take advantage of the networked environment they are in to make easier to combine and reuse existing services from different SMs and use them to implement new ones. In this context, SMs can be classified as: (i) Isolated: SMs that have no interaction with other SMs; (ii) Provider: SMs that provide services for other SMs; (iii) Consumer: SMs that consume services from other SMs; and (iv) Prosumer: SMs that both provide and consume services. III. IMPLEMENTING WEB APPLICATIONS AS SOCIAL MACHINES COMPOSITION Although the initial paper of SMs presented one application as a case study, more applications must be developed to maturate this concept, in special, applications that uses other API’s and services instead of social networks services. Then we performed a new empirical study and implemented a new application using the model. Thus, as the objective of the study is to verify the feasibility and main benefits and challenges of software development using a this approach in a real-life context, we performed a case study, which was divided into five activities: (a) Definition, (b) Planning, (c) Operation, (d) Analysis and Interpretation, and (e) Presentation and Package. A. Definition In order to verify the feasibility to implement an application that uses several web API’s of several application domains in according to SMs model, and to identify and analyze the main benefits, difficulties and challenges of this approach in these context, the study has two research questions: Q1. It is possible to implement this kind of application according to SMs model?

Q2. What are the main benefits, difficulties and challenges of implementing this kind of application according to SMs model? B. Planning The planning follows the evaluation plan proposed by Basili et al. [15] and will be described in future tense, showing the logic sequence between the planning and operation. Context: The study consists in an analysis and implementation of a software project. It will be conducted as a commercial project, by M.Sc. and D.Sc software engineering students in a postgraduate class of the Informatics Center of Federal University of Pernambuco (UFPE), Brazil. Subjects: The subjects of the study are 1 D.Sc and 2 M.Sc software engineering students of UFPE. All of them are software developers and have previous experiences with industrial projects, technologies and tools. Training: The subjects of the study will receive education about SMs and related technologies during the course. The training includes the concepts of SMs, DSL’s, software architecture, public API’s and cloud computing, and will be performed in the first half of the class. Instrumentation: The subjects will be encouraged to use an agile methodology to project development, but at least a triplet of documents must be created: software requirements, architecture using SMs model, and a lessons learned document. Null Hypothesis, H0: This is the hypothesis that the experimenter wants to reject with a high significance as possible. In this study, the following hypothesis can be defined: H0’: it is not possible to design and implement the application according to Social Machines model; H0’’: there are no benefits in implementing the application according to Social Machines model; H0’’’: there are difficulties and challenges in implementing the application according to Social Machines model; Alternative Hypothesis: This is the hypothesis in favor of which the null hypothesis is rejected. In this study, the following hypothesis can be defined: H1: it is possible to design and implement the application according to Social Machines model; H2: there are benefits in implementing the application according to Social Machines model; H3: there are no difficulties and challenges in implementing the application according to Social Machines. Criteria: The evaluation criteria will be performed by a qualitative analysis of application documentation, in addition to public discussions involving the subjects, the professors and cloud computing and application development specialists from both UFPE and local companies. Costs: Since the subjects of the study are postgraduate

312

students of UFPE and the environment of execution is the university infrastructure and free tools, the execution of the project is free of costs. Variables: In this study, the independent variables are the SMs model and the documentation required. We considered the dependent variables the feasibility of application implementation using the model, the benefits, difficulties and challenges of implementation. These variables will be measured by document analysis as well as promoted discussions. Finally, we consider control variable the comparison with previous project using SM model, the Futweet, that was implemented by a similar team in a similar context. Figure 1: Application Architecture

C. Operation The operation was performed according to the planning. The project development was conducted as follows: Requirements: Application goal is to help people not familiarized with one city or one city area, such as tourists, business people or citizens, to gather information about places nearby him. Using a smartphone or a traditional web browser, the application allows user to see nearby places (registered on google places or foursquare services) and to browse useful information about it, such as: wikipedia and google search information, photos from Flickr and real time comments from twitter, from or about the place. To provide this information, the application flows must be in this sequence: (i) User (in a computer or cell phone) opens the application, which automatically detects his location, searches for nearby places and shows these places in a map; (ii) User selects one place in the map and gets the name, some initial information and a link for “more information”; (iii) User selects “more information” option and is redirected to a page containing the additional information related above: textual information, photos and comments by other people. Architecture: To satisfy these requirements, the project team selected some initial APIs to provide needed information: Google Maps for map visualization; Foursquare and/or Google Places for places search, Wikipedia and/or Google Search for textual information, Flickr for photos, and Twitter for realtime comments. According to SMs model, the application architecture is illustrated in Figure 1. In the figure, each service is considered as a SM, and SMs with similar functionalities are grouped inside the same circle. The application is named WhatHere, and is mainly the “glue SM”, which includes the application business rules. Clients are separated: Mobile and Web. Each SM was described according to the previously mentioned tuple: , and Figure 2 shows the specification of WhatHere social machine. Due to its relevance, Analysis and Interpretation will be made in the next section.

IV. DEVELOPMENT ANALYSIS AND INTERPRETATION According to the planning and in order to reject the null hypothesis and satisfy the alternative hypothesis, we analyzed qualitatively the application design, code and documentation, involving the subjects, the professors and some guests specialists in web API’s, Cloud Computing and Software Atchitecture. First, the guests analyzed application design and performed a detailed code review. Then, documentation was analyzed and several discussions were performed between the subjects, professors and guests.

Figure 2: Internal SM definition

The application was designed and implemented in full compliance with its requirements and with the SMs model, which rejects the null hypothesis H0’: it is not possible to design and implement the application according to Social Machines model, which validates the alternative hypothesis H1. In addition, the subjects reported several benefits from applying this approach, mainly: (i) good system modularity and maintainability, because of separation of application rules and the services used; (ii) facilitation of the abstraction and use of external services and API’s, centralized in the wrapper interface, instead of merged in application logic; (iii) reuse of SMs; due to the fact that the SMs are accessed by well defined requests/responses, they can be reused by several applications,

313

and (iv) the reduced amount of lines of code implemented. These benefits reject the null hypothesis H0’’: there are no benefits in implementing the application according to Social Machines model, which validates the alternative hypothesis H2. However, the subjects reported some questions which not reject the null hypothesis H0’’’: there are difficulties and challenges in implementing the application according to Social Machines model. Initially, they reported the difficulty to define some SM’s, in special the SMs that are not developed by the team, such as Twitter or Wikipedia SMs, mainly because developers do not have full access to information about them. Thus, we concluded that can be more effective to create two classes of SMs − Internal and External − and reduce the tuple of external SMs to SM = . Moreover, they also reported the difficulty to apply the proposal of SM Architecture Description Language (SMADL) presented in [8, 9], and prefer to represent items graphically or descriptively, such as in the Figure 2. Finally, they related the need to create SMs controllers in order to manage groups of SMs. For example, instead of using only the Flickr to get photos, the application could use other image services, such as Google Images or Bing Images. Thereby, some mechanism is necessary to manage where to get the photos, based on heuristics, such as: service constraints, QoS or availability, and should change the policy dynamically, for example, if the preferred service became unstable. After several discussions, the subjects and specialists concludes that one possible approach is to create federations of SMs. The federations would be a group of SMs with similar services, and would have a manager, which implements the selection policies. In this way the application wrapper interface would only communicate and call the services exposed by federation manager. This approach have the potential of increase the application modularity and abstraction, because the final application developer won’t need to know services API’s, but only the federation manager API.

Moreover, we discuss a possible solution to some challenges presented in initial SMs preliminary definition, such as the creation of federation of SMs and a new type of SM, Federation Manager, which can be used to address these challenges. For future developments we updated the preliminary agenda of social machines research, in special: (i) to define, implements and test a Social Machine’ federation model; (ii) to investigate self-awareness characteristics of SMs and the possibility to, in conjunction with federations, allow the autonomous lifecycle management of SMs. In addition, the preliminary agenda are been performed, including an architectural framework for defining and developing SM-based Systems, security, billing, monitoring and fault tolerance questions, among others. Finally, more case studies are being developed to continue to validate and investigate the model. ACKNOWLEDGMENT This work was partially supported by the National Institute of Science and Technology for Software Engineering (INES2), funded by CNPq and FACEPE, grants 573964/2008-4, APQ1037- 1.03/08 and APQ-1044-1.03/10 and Brazilian Agency (CNPq processes number 475743/2007-5 and 140060/2008-1). REFERENCES [1]

[2] [3] [4] [5] [6] [7]

V. CONCLUSIONS AND FUTURE WORKS

[8]

In this paper, we revisited the concept of the emerging web of social machines [8, 9], a model to provide a common and coherent conceptual basis for the understanding of the young, upcoming and possibly highly innovative phase of software development, the “programmable web”. Due to the fact that this is an initial concept and need to be more tested, we performed a case study by developing an application that uses several web API’s of several application domains in according to Social Machines model. The results of the case study showed that it is possible to implement web applications which interact with several web services of several domains. Some benefits were listed, such as the increase of modularity and maintainability, abstraction, reuse and the facility of use third part services and API’s. Some improvements of the concept of SMs were suggested, such as the creation of Internal/External SMs, and the differentiation of the tuple for external SMs.

[9]

[10] [11] [12]

[13]

[14] [15]

314

2

S. Yu and C. J. Woodard, "Innovation in the programmable web: Characterizing the mashup ecosystem," in Service Oriented Computing - ICSOC 2008 Workshops, 2009, pp. 136-147. W. Roush, "Social Machines - Computing means connecting," in MIT Technology Review, August 2005, 2005. M. Turner, et al., "Turning Software into a Service," Computer, vol. 36, pp. 38-44, 2003. J. Hwang, et al., "The structural evolution of the Web 2.0 service network," Online Information Review, vol. 33, pp. 1040-1057, 2009. C. Bizer, et al., "Linked Data - The Story So Far," International Journal on Semantic Web and Information Systems, vol. 5, pp. 1-22, 2009. P. Hitzler, et al., Foundations of Semantic Web Technologies: Chapman and Hall, 2009. T. Berners-Lee, et al., "The Semantic Web," Scientific American, pp. 28-37, 2001. S. R. L. Meira, et al., "The emerging web of social machines," CoRR, vol. abs/1010.3045, 2010. S. R. L. Meira, et al., "The Emerging Web of Social Machines," in Computer Software and Applications Conference (COMPSAC), Munich, 2011, pp. 26-27. P. Patton, Deleuze and the Political: Routledge, 2000. M. Fuglsang and B. M. Sorensen, Deleuze and the social: Edinburgh University Press, 2006. J. Hendler and T. Berners-Lee, "From the Semantic Web to social machines: A research challenge for AI on the World Wide Web," Artificial Intelligence, vol. 174, pp. 156-161, 2010. T. Berners-Lee and M. Fischetti, Weaving the Web: The Original Design and Ultimate Destiny of the World Wide Web. New York: Harper Collins, 1999. T. N. Hornyak, Loving the machine: the art and science of Japanese robots: Kodansha International, 2006. V. R. Basili, et al., "Experimentation in Software Engineering," IEEE Transactions on Software Engineering, vol. 12, pp. 733-743, July, 1986 1986.

www.ines.org.br

Suggest Documents