ajax - Consulting for tracking application architecture based on Node.js -
i try solve problem architecture of application based on node.js. have ideas i'm wondering thoughts.
well, application stored activities customer websites, activities defined customer, eg. login on website, click on product, click on category menu etc. these events pass application , after that, show actitivities customer dashboard analytics or purpose.
first of think sending request ajax websites server , after parsing data on node.js server, send data dashboard account via socket.io. user see every event him website on dashboard "on flight". think concept ok? every ajax request not costly ? maybe should think way send data server?
you trying design classic analytical application assembles data different sources , shows analytics upon data google analytic , on.
does every ajax request not costly? maybe should think way send data server?
for web applications that’s standard way send data client server. of course, http protocol has more overheads comparing udp, websockets or protocols upon them doesn’t need additional security configurations, easy use , scale. websockets require keeping tcp connection time , harder scale. can find many post comparison these protocols here.
according question app going proxy of events web sites web apps them analyzed somehow. every event have information type (login, click), url, user, date , on. can work loading. apparently, have problems on browser side accepting more 100 events (requests) per second via websockets. js single-thread execution model not analytics (filtering, calculation, aggregation). think don’t need pass events dashboard are, more useful send aggregated data new events count, event histograms , on. so, in case need perform analytics on backend side (node.js app).
i recommend @ cqrs approach storing data (events) , retrieve (query) separated in order achieve performance both write (log events) , read (retrieve events or analytics) operations. apparently may need use database analytics mondo db, maybe redis , on.
Comments
Post a Comment