보통 실시간 메시징 처리에 socket.io와 redis를 많이 사용하는데, 그 동작 메커니즘이 자세히 소개된 글을 찾기 어려웠다. 이유는 간단한데, 소스코드가 그냥 간단해서 글로 쓰고 자시고 건더기도 없어 그런듯.
기본적으로 socket.io는 Server, Namespace, Room, 그리고 Socket으로 구성되어있고 멀티 노드를 위해 pluggable 디자인 방식으로 Adapter라는 것이 존재한다.
Default In-Memory 방식은 배열에 socket과 room 정보를 저장하기 때문에 웹 서버에 붙어있는 clients 외 에는 알 길이 없다. 이때 redis adapter를 사용하면 다음과 같이 동작하는데, sender가 원격에서 넘어왔다면 그냥 내 로컬 clients에게 deliver하는 것으로 종료하고 그렇지 않으면, 다른 노드에게 publish하여 메시지를 전달한다.
분산 인프라 치고는 놀랍게도 Javascript 몇 줄 안되는 소스코드로 node, socket.io, 그리고 redis가 동작한다. 좀 이해하기 쉽게 도식화하면 다음과 같다:
Agarwal Packers and Movers
ReplyDeleteAgarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
ReplyDeleteAgarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
ReplyDeleteAgarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
Agarwal Packers and Movers
ReplyDeleteA good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one.
iot course training in Hyderabad
I feel extremely glad to have seen your site page and anticipate such a large number of additionally engaging occasions perusing here. Much obliged again for all the subtleties.
ReplyDeletehttps://360digitmg.com/course/certification-program-in-iot
Your music is amazing. You have some very talented artists. I wish you the best of success.
ReplyDeleteBest Data Science Courses in Hyderabad
It is a neat article without any clutter! The neatly organized content looks good. Can I quote a blog and write it on my blog? My blog has a diverse community, including these articles. Would you like to visit me later? 토토사이트
ReplyDeleteYour work is very good and I appreciate you and hopping for one of the finest sites on the internet. I will recommend this web site 토토사이트
ReplyDeleteYou obviously know what youre talking about Guess I will just bookmark this site. 토토
ReplyDeletemy own blog and would like to find out where u got this from. Your post has really helped me a lot. 안전놀이터
ReplyDeleteA good blog always comes-up with new and exciting information and while reading I have felt that this blog really has all those qualities that qualify a blog to be a one.
ReplyDeleteBest Data Science courses in Hyderabad
if you are the registered employee or an authorized associate working for one of the largest nba중계
ReplyDeleteemployee or an authorized associate working for one of the largest 먹튀검증
ReplyDeletehttps://www.bbdd66.com 우리카지노사이트
ReplyDeletehttps://www.bbdd66.com/theking 더킹카지노
https://www.bbdd66.com/sands 샌즈카지노
https://www.bbdd66.com/first 퍼스트카지노
https://www.bbdd66.com/yes 예스카지노
https://www.bbdd66.com/super 슈퍼카지노
https://www.bbdd66.com/gatsby 개츠비카지노
https://www.bbdd66.com/33 33카지노
https://www.bbdd66.com/world 월드카지노
https://www.bbdd66.com/merit 메리트카지노
https://www.omgka.com 우리카지노사이트
ReplyDeletehttps://www.omgka.com/theking 더킹카지노
https://www.omgka.com/sands 샌즈카지노
https://www.omgka.com/first 퍼스트카지노
https://www.omgka.com/yes 예스카지노
https://www.omgka.com/super 슈퍼카지노
https://www.omgka.com/gatsby 개츠비카지노
https://www.omgka.com/33 33카지노
https://www.omgka.com/world 월드카지노
https://www.omgka.com/merit 메리트카지노
As soon as I noticed this internet site I went on reddit to share some of the love with them. 먹튀
ReplyDeleteI got a web site from where I be capable of really obtain valuable information regarding my study and knowledge.
ReplyDeleteGreat Article… Good Job… Thanks For Sharing…
Website:바카라
Tremendous blog quite easy to grasp the subject since the content is very simple to understand. Obviously, this helps the participants to engage themselves in to the subject without much difficulty. Hope you further educate the readers in the same manner and keep sharing the content as always you do.
ReplyDeletedata science course in faridabad
Amazing article..!! Thank you so much for this informative post. I found some interesting points and lots of information from your blog. Thanks 토토커뮤니티
ReplyDeleteStay up the good work! You know, many people are looking round for this info, you could aid them greatly. 토토
ReplyDeleteback every day. It’s great to have a place like this. I’ll come often. Great work! 경마사이트
ReplyDeleteI have been reading your blog posts for month and its been the greatest thing I am doing in past few months. keep up the good work for sharing the information. 토토
ReplyDeleteThanks for posting the best information and the blog is very good.data science course in Lucknow
ReplyDeleteYou made some good points there. I did a Google search about the topic and found most people will believe your blog. 메이저사이트
ReplyDeleteThat's a great article! The neatly organized content is good to see. Can I quote a blog and write it on my blog? My blog has a variety of communities including these articles. Would you like to visit me later? 토토사이트추천
ReplyDeleteWhat a nice post! I'm so happy to read this. 안전놀이터모음 What you wrote was very helpful to me. Thank you. Actually, I run a site similar to you. If you have time, could you visit my site? Please leave your comments after reading what I wrote. If you do so, I will actively reflect your opinion. I think it will be a great help to run my site. Have a good day.
ReplyDeleteThis is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: Best Impact Socket Adapters
ReplyDeleteOh, the data you've shared in this incredible article is just magnificent. I am definitely going to make more use of this data in my future projects. You must continue sharing more data like this with us. 메이저놀이터
ReplyDeleteYour skill is great. I am so grateful that I am able to do a lot of work thanks to your technology.메이저사이트 I hope you keep improving this technology.
ReplyDeleteis one very interesting post. 메이저사이트I like the way you write and I will bookmark your blog to my favorites.
ReplyDeleteThank you a bunch for sharing this with all of us you actually realize what you are talking about! Bookmarked. Please also seek advice from my site =). We could have a hyperlink change contract between us 안전놀이터
ReplyDeleteSucceed! It could be one of the most useful blogs we have ever come across on the subject. Excellent info! I’m also an expert in this topic so I can understand your effort very well. Thanks for the huge help. 안전놀이터
ReplyDeleteI was looking for another article by chance and found your article오공슬롯 I am writing on this topic, so I think it will help a lot. I leave my blog address below. Please visit once.
ReplyDeleteI think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article :D 먹튀검증
ReplyDelete