Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
En prestandastudie på JSON-och XML-formaterad API-data
Linköping University, Department of Computer and Information Science, Human-Centered systems.
2017 (Swedish)Independent thesis Basic level (university diploma), 10 credits / 15 HE creditsStudent thesisAlternative title
A performance study on JSON- and XML-formatted API-data (English)
Abstract [sv]

Den här rapporten avser undersöka effekterna olika representationsmetoder av samma data har på det API som genererar datan, samt klienten som tar emot och bearbetar den. För syftet har formaten JSON och XML valts. För att analysera påverkan på API:et och klienten utvecklades ett API för att testerna skulle ge realistiska resultat. En enkel klien-themsida i JavaScript utvecklades vars uppgift var att begära data från API:et som sedan bearbetades till JSON- eller XML-objekt beroende på vilket test som kördes. Testerna sep-arerades i två scenarion, där datamängden för de två scenarierna var stor respektive liten, representerat som JSON eller XML. Klienten loggade den tid det tog från att programmet startades till att samtliga svar hade bearbetats. API-servern mätte den tid det tog från att servern mottog klientens förfrågan till att ett svar var redo att returneras. Servern mätte också systemets CPU- och minnesanvändning.

Studien visade att JSON-formaterad data överlag resulterade i en mer effektiv operation. I samtliga testfall var bearbetningstiden för både klient och API-server lägre för JSON-formaterad data. Däremot visade testerna också att XML-formaterad data förbrukade en marginellt mindre andel av systemets resurser vid bearbetning av små datamängder. För samma testfall var dock bearbetningstiden av den JSON-formaterade datan fortfarande lägre.

Abstract [en]

This paper aims to analyze the effects different data representation techniques have on the API generating the data, and the client receiving and processing it. For this purpose, the formats JSON and XML was chosen. In order to analyze the effects, an API was developed in order to generate realistic results. A simple client JavaScript website was created which requested the API for data in which it processed its response to a JSON- or XML-object depending on which test was conducted. The tests were separated in two sce-narios, where the used dataset was large or small respectively, represented in either JSON orXML. The client logged the time it took from the test’s beginning until all responses had been processed. The API-server measured the time it took from receiving the request until it was returned, as well as the system’s CPU- and virtual-memory usage.

The study found that JSON-formatted data overall resulted in a more efficient opera-tion. In all test cases the processing time for both the client and server were smaller for the JSON-formatted data. However, for small datasets, the study showed that the XML-formatted data used a marginally smaller portion of the system’s resources, although the JSON-formatted data was still processed quicker.

Place, publisher, year, edition, pages
2017. , 37 p.
Keyword [sv]
json, xml, prestanda
National Category
Computer Science
Identifiers
URN: urn:nbn:se:liu:diva-139094ISRN: LIU-IDA/LITH-EX-G--17/054--SEOAI: oai:DiVA.org:liu-139094DiVA: diva2:1118551
External cooperation
Marcus Hedberg, marcus.hedberg@syspartner.se
Subject / course
Computer Engineering
Presentation
2017-06-07, John Von Neumann, Linköping, 15:00 (Swedish)
Examiners
Available from: 2017-07-04 Created: 2017-06-30 Last updated: 2017-07-04Bibliographically approved

Open Access in DiVA

fulltext(443 kB)92 downloads
File information
File name FULLTEXT01.pdfFile size 443 kBChecksum SHA-512
8a73120efeef2b3cc735d67ed42ef600debd97ea9a6b7b5708085bbadf59309b550749bc03fa7de7b3ea6332034a53181b0904844c155a7ac695e471ee1e7dea
Type fulltextMimetype application/pdf

Search in DiVA

By author/editor
Larsson, Andreas
By organisation
Human-Centered systems
Computer Science

Search outside of DiVA

GoogleGoogle Scholar
Total: 92 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 62 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf