Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

The first key function of the SmartWeb platform is the possibility to uniformly access the data and services of D2000 using the universal API interface. This API is independent of the used client's technology and with the API, it is possible to acquire data and call services implemented in D2000.

In general, we can distinguish online technologies of client-server communication into two categories according to the communication character. The first category includes technologies in which the client always initiates data change and the server responds, so-called Request - Response communication. The second category covers Publish - Subscribe communication in which the client registers for subscription of certain data types (subscribe) and the server publishes these data for clients who asked for them. 

Image Added

SmartWeb server implements  both Request - Response and Publish - Subscribe communication through following interface:

  1. REST API realizes Request - Response communication
  2. Comet API realizes both Request - Response and Publish - Subscribe communication

Both interfaces communicate with the D2000 system through JAPI library

Prvou kľúčovou funkciou SmartWeb platformy je možnosť jednotne pristupovať k dátam a službám D2000 s použitím univerzálneho API rozhrania. Toto API je nezávislé na použitej technológii klienta a je s ním možné získavať dáta a volať služby implementované v D2000.

Vo všeobecnosti môžme technológie online klient-server komunikácie rozdeliť na dve kategórie podľa povahy komunikácie. Do prvej skupiny patria technológie, kde výmenu dát iniciuje vždy klient a server odpovedá, tzv. Request - Response komunikácia. Druhá kategória je Publish - Subscribe komunikácia, kedy klient sa zaregistruje na odoberanie konkrétneho typu dát (subscribe) a server tieto dáta publikuje klientom ktorí o ne požiadali.

Image Removed

SmartWeb server implementuje ako Request - Response tak Publish - Subscribe komunikáciu cez nasledovné rozhrania:

  1. REST API realizuje Request - Response komunikáciu 
  2. Comet API realizuje ako Request - Response tak Publish - Subscribe komunikáciu

Obe rozhrania komunikujú s D2000 systémom cez JAPI knižnicu.

Rest API

Rest API je štandardné API pre webové a mobilné aplikácie. SmartWeb Rest API ponúka nasledovné možnosti:is a standard API for web and mobile applications. The SmartWeb Rest API offers following possibilities:  

  • reading archives
  • calling of any ESL RPC and
  • načítavanie archívov
  • volanie akejkoľvek ESL RPC a Java RPC
  • downloading/uploading binárneho obsahu z/do D2000 cez SBA RPC
  • serializáciu všetkých typov aj štruktúry
  • of binary content from/into D2000 through SBA RPC

  • serialization of all types and structure
  • selection of return data (time tag, flagsselekciu návratových dát (časová známka, flagy, ...), downscaling
  • performance monitoring
  • autentifikáciaauthentication, security, kompresiacompression, response streaming, atďand so on...

Obrázok ilustruje príklad použitia REST API rozhrania na volanie jednoduchéj D2000 RPC procedúryThis figure illustrates the example of using the REST API interface for calling on simple D2000 RPC procedure.


Comet API

Comet API poskytuje tie isté funkcie ako provides the same functions as REST API a naviacand more:

  • subscription na of D2000 objektobjects
  • registráciu registration of javascript RPC volateľnej asynchrónne z asynchronously calling from D2000
  • notifikácie o session zo SmartWeb servera (expirácia, zaniknutie session)

SmartWeb Comet API je implementované cez knižnicu cometd, ktorej robusná funkcionalita je overená na riešeniach so 150 tis. používateľmi. Medzi výhody tejto knižnice patrí:

  • notifications about session from the SmartWeb server (expiration, session expiration)

The SmartWeb Comet API is implemented through the cometd library which robust functionality is certified based on solutions with 150 thousand users. Among the advantages of this library belong:

  • intelligent choice of optimal communication protocol based on actual connection possibilities inteligentný výber optimálneho komunikačného protokolu na základe aktuálnych možností konekcie - Websocket, HTTP 1.1/2.0
  • pripojenie implementovateľné v akomkoľvek jazyku – otvorená špecifikácia
  • connection implementable in any language - open specification
  • low payload for keeping connectionnízky payload na udržanie spojenia