Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

300
Visualizações
When to use socket.io ? and when to use simple Http calls?

We are developing one prject with Angular2 / Node with Express and Mongo + MySql Its very large application , but doesn't require any functionality like , live notification or chat

Application has simple CRUD operations and fetching alot data , so my question is

Is it still good / have benefits to use socket.io rather then simple http calls ?

As per I understand socket.io , it make just one time connection (handshake) with server and In our case it will handshake each time I try to make api calls ?

So is there any benefits to use socket.io for normal application with CRUD operation ? It will save time ? Have any speed difference ?

Which way is better to implement ?

I have gone through the : When to use socket.io and when to use ajax

But didn't get what I want.

If have to choose b/w simple http calls and socket.io ? which one is better ? for simple CRUD operation , nothing dynamic , not needed any real time notification ? in simple case which one is better by performance , by speed ?

It would be better if have any performance chart or comparison b/w both by time/handshake/request-response.

Will someone please help me with this? Thanks in advance.

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

When to use sockets i.o

  • When you built real time applications, like Group chat Room, video conferencing, multiplayer games etc.
  • If you want server to push data by itself without calling from client.

when to use https

  • Simple posting data to server
  • Real time updating on client side not needed. i.e If you want CRUD you dont have to use sockets.

Here's a comparison of the networking operations involved in sending a price change over an already open webSocket vs. making a REST call.

As you mentioned that you need any live notification and chat etc I recommend to use simple ajax as it's easy to code.

So is there any benefits to use socket.io for normal application with CRUD operation ? It will save time ? Have any speed difference ?

You can see this excellent article which compares ajax and sockets i.o.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda