Client-server interactions in Mobile Applications.

Slides:



Advertisements
Similar presentations
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Advertisements

2: Application Layer 1 Socket programming Socket API r introduced in BSD4.1 UNIX, 1981 r explicitly created, used, released by apps r client/server paradigm.
1 Creating a network app Write programs that  run on different end systems and  communicate over a network.  e.g., Web: Web server software communicates.
Distributed Java Communications Eric Lind CS522 Semester Project December 9, 2002.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
2: Application Layer1 Data Communication and Networks Lecture 12 Java Sockets November 30, 2006.
1 Overview r Socket programming with TCP r Socket programming with UDP r Building a Web server.
Internet and Intranet Protocols and Applications Lecture 4: Application Layer 3: Socket Programming February 8, 2005 Arthur Goldberg Computer Science Department.
Networking Overview February 2, /2/2004 Assignments Due – Homework 0 Due – Reading and Warmup questions Work on Homework 1.
1 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture and Protocols Socket Programming Instructor: Dr. Mohamed Hefeeda.
Definitions, Definitions, Definitions Lead to Understanding.
2: Application Layer1 Socket Programming. 2: Application Layer2 Socket-programming using TCP Socket: a door between application process and end- end-transport.
1 Network Layers Application Transport Network Data-Link Physical bits.
Welcome to CIS 235 Computer Networks Fall, 2007 Prof Peterson.
2: Application Layer 1 Socket Programming Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Julia Ljunbjörk and Anita Mugenyi. What is a socket? Like a house Between the layers.
By Justin Thompson. What is SOAP? Originally stood for Simple Object Access Protocol Created by vendors from Microsoft, Lotus, IBM, and others Protocol.
2: Application Layer 1 Socket Programming TCP and UDP.
JAVA Socket Programming Source: by Joonbok Lee, KAIST, 2003.
Socket programming in C. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
2: Application Layer1 Socket programming Socket API r introduced in BSD4.1 UNIX, 1981 r explicitly created, used, released by apps r client/server paradigm.
CS 3830 Day 11 Introduction : Application Layer 2 Server-client vs. P2P: example Client upload rate = u, F/u = 1 hour, u s = 10u, d min ≥ u s.
1 CS 455/555 Intro to Networks and Communications Client/Server Computing and Socket Programming (2.1, ) Michele Weigle Department of Computer Science.
Enabling Embedded Systems to access Internet Resources.
 Socket  The combination of an IP address and a port number. (RFC 793 original TCP specification)  The name of the Berkeley-derived application programming.
CSCI 6962: Server-side Design and Programming Web Services.
Discussion 2 Sockets Programming Applets TCP UDP HTTP Delay Estimation
Application Layer 2-1 ESERCITAZIONE SOCKET PROGRAMMING.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
Winter 2002Suprakash Datta1 Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
-1- Georgia State UniversitySensorweb Research Laboratory CSC4220/6220 Computer Networks Dr. WenZhan Song Associate Professor, Computer Science.
Vassil Roussev 2 A socket is the basic remote communication abstraction provided by the OS to processes. controlled by operating system.
Socket Programming Lee, Sooyong
Socket Programming Tutorial. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Java Socket programming. Socket programming with TCP.
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
2: Application Layer1 Socket programming Socket API Explicitly created, used, released by apps Client/server paradigm Two types of transport service via.
XML and Web Services (II/2546)
Server - Client Communication Getting data from server.
S imple O bject A ccess P rotocol Karthikeyan Chandrasekaran & Nandakumar Padmanabhan.
Kemal Baykal Rasim Ismayilov
S O A P ‘the protocol formerly known as Simple Object Access Protocol’ Team Pluto Bonnie, Brandon, George, Hojun.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Socket programming Socket API r introduced in BSD4.1 UNIX, 1981 r explicitly created, used, released by apps r client/server paradigm r two types of.
Web Services An Introduction Copyright © Curt Hill.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
1 COMP 431 Internet Services & Protocols Client/Server Computing & Socket Programming Jasleen Kaur February 2, 2016.
Socket programming in C. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
Java Networking I IS Outline  Quiz #3  Network architecture  Protocols  Sockets  Server Sockets  Multi-threaded Servers.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 11 Omar Meqdadi Department of Computer Science and Software Engineering University.
SOAP, Web Service, WSDL Week 14 Web site:
Socket Programming original by Joonbok Lee KAIST heavily adapted by /Jens.
COMP2322 Lab 4 Socket Programming
WEB SERVICES.
Unit – 5 JAVA Web Services
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Chapter 2 Application Layer
Implementing a service-oriented architecture using SOAP
Working at a Small-to-Medium Business or ISP – Chapter 7
Chapter 2: outline 2.1 principles of network applications
Socket programming - Java
Socket Programming.
Socket Programming 2: Application Layer.
Presentation transcript:

Client-server interactions in Mobile Applications

2 Socket programming with TCP Example client-server app: 1) client reads line from standard input ( inFromUser stream), sends to server via socket ( outToServer stream) 2) server reads line from socket 3) server converts line to uppercase, sends back to client 4) client reads, prints modified line from socket ( inFromServer stream) Client process client TCP socket

3 Client/server socket interaction: TCP wait for incoming connection request connectionSocket = welcomeSocket.accept() create socket, port= x, for incoming request: welcomeSocket = ServerSocket() create socket, connect to hostid, port= x clientSocket = Socket() close connectionSocket read reply from clientSocket close clientSocket Server (running on hostid ) Client send request using clientSocket read request from connectionSocket write reply to connectionSocket TCP connection setup

XML-RPC remote procedure call protocol, created in 1998 specification and a set of implementations, allowing procedure calls over the Internet calls are transported using HTTP, and encoded in XML. simple security model, can authenticate through HTTP/HTTPS

Allows one method of serialization Still in use, although newer technologies exist; JSON-RPC, SOAP and others.

Disadvantages XML can be slow and cumbersome in transporting and processing messages Calls can be made with plain XML instead; XML-RPC doesn't add any additional value

Implementations: Client: Android XML-RPC Thin, but complete XML-RPC library droid-xmlrpc/ Server: Apache XML-RPC Servlet server.html

SOAP Simple Object Access Protol: is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks.

SOAP

Advantage – Allow for the use of different transport protocols (HTTP as a transport protocol, but other protocols such as JMS and SMTP are also usable) – Since the SOAP model tunnels fine in the HTTP get/response model, it can tunnel easily over existing firewalls and proxies. – Can extend the existing infrastructure. Disadvantage – Since SOAP bases on XML format, it require lots of resource for parsing and processing XML file (especially for large XML file). – SOAP is very verbose, and contains lots of overhead.  Not the best choice for data exchange with mobile devices.

JSON JavaScript Object Notation – language independent specification of interchanging data in human-readable format. In contrast with XML-RPC and SOAP it allows for bidirectional communication between client and server (like peers) and for multiple calls. Data introduced in key:value pair format. More economical than XML in terms of data size, but has less readability. Android has JSONArray, JSONObject, JSONStringer and JSONTokener objects for parsing this format.

Protocol Buffers Protocol Buffers– language independent data-serialization format developed by Google. This protocol is usually applied in server-to-server interactions. Is significant faster and smaller than XML. Type of messages is defined in.proto files. Message is small logical record of a pairs of names and values. Transmitted information is encoded into binary format. Google provide necessary tools for binding this protocol with C++, Java and Python.

Comparison of protocols “Using Internet data in Android applications” by Michael Galpin, IBM 2010, dataAndroid/index.html