soa - Communicating between Servers using Websockets -


so let's in service oriented architecture, have 3 layers:

  1. the web/external layer - user sees
  2. application logic - generates layer 3. handles users, sessions, forms & etc...
  3. internal api - data, , how access data

now 1 , 2 live in same network latency our least thought of problem. essentially, layer 2 consumes data layer 1 using rest. thinking of alternatives how data can consumed.

what pros , cons of making layer 1 , 2 communicate websockets instead of rest?

assuming, have multiple servers , layer 2 applications.

this question purely out of curiosity.

there old discussion on restfull http vs websockets. think of them being different. in general, websockets give finer control. comes perhaps more efficiency --imagine if you, say, define own protocol. downside have less standard approach. rest less flexible more standard , more loosely coupled.

stefan tilkov summarized pretty in blog post. there related discussion here.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -