SlideShare a Scribd company logo
1 of 24
Download to read offline
Community Application
Stream Processing Analytics
Raza Abbas (2019ad04095)
Sandeep Kumar (2019ad04106)
Shanur Rahman (2019ad04065)
Explanation Video URL: https://youtu.be/PosptjOpyr8
High Level Design
Microservices
API/Load
Balancers
Frontend/
Clients
Recommendation System
Graph
Database
APP and User info tables
ML Layer/
Collaborative
Filtering
Real time Messaging /
User Session Information
User Posted Content
Memcache
MQTT
Broker
Messenger
WebUI
APP View
Client
Facing API
API
Gateway
Service1
Service N
Database / Analytics
Search and Indexing
Websockets
. .
Analytics/
Data Science
Frontend / Client Tier
• These are the only supported access points for users w.r.t application.
• Includes:
• WebUI
• Application View
• Messenger
• Client Facing API
API / Load Balancer(s) Tier
• API Gateway tier aggregates various microservices based on their
protocol and function, to multiple APIs.
• Type of API gateways:
• Rest API based on HTTP(s) with supported operations such as get, post, put.
• Websockets to support real time chat applications.
• MQTT to support routing and logging of high speed incoming messages to
database and other applications. User chats, logs and maintenance.
• API gateway also acts as a firewall, delegating authentication to an
Internal microservice or API.
Micro Services Tier
• Forms the basic application business logic.
• Every interaction to application goes through microservices.
• These services will write or read content from databases directly or
through data models. Such as Django data models.
• For frontend UI Django is an ideal choice. This will contain app routing
and user authentication logic.
• For Backend services Django Rest is an ideal choice. This will contain
the queries and routines to be executed in analytics tier.
• For serving static resources apache server will be used.
Micro Services Tier
• Based on Kubernetes cluster(s).
• Each service group contains multiple separate services.
• Will have both:
• Sync microservices: Data Access, media, routing, authentication, etc.
• Async microservices: Background and batch processing.
• Authentication within microservices and external requests is based on User
session information stored in a REDIS cache database. It will be exposed as
an API(Oauth type).
• Each microservice has separate compute / network resources, the stack
can be scaled by adding more instances (Horizontally scalable).
• A service bus will be deployed for inter services communication.
Micro Services Tier
• Microservice will also maintain and manage application definition
involving:
oApplication scaling
oApplication security
oApplication management
oAnomaly detection
• One service group will be dedicated to above said functions.
Database Tier
Types of data streams
• APP and User info tables
oStructured data
• User posted content
oUnstructured/structured data
• Real time Messaging / User Session Information
oUnstructured/structured data
APP and User info tables
• Contains user definition information, app definition information, user
authentication information and regulatory data. These are stored in
form of multiple simple tables.
• Some of the tables would be generated using Django models.
• As the new users sign up a moderately sized database will build up.
• Data is accessed and updated infrequently but high consistency is a
requirement. Postgresql is an ideal choice based on the requirements.
APP and User info tables schema
Format
• table_name
o column_name:datatype:indextype
• user_master
ouser_uuid:string:btree
ouser_email:string:btree
ouser_name:string:btree
ouser_phone:string
ouser_signup_date:datetime
ouser_last_logged_in:datetime
ouser_password_hashed:string
APP and User info tables schema
• user_group_master
o group_uuid:string
o group_name:string
o group_user_count:int
o group_is_active:Boolean
o group_created_on:datetime
o group_deleted_on:datetime
• user_group_user_list
o group_user_index:string
o user_uuid:string
o user_name:string
o is_active:boolean:btree
o is_admin:boolean
o added_on:datetime
o removed_on:datetime
APP and User info tables schema
• application_master
oapp_pods_count:int
• app_service_groups_master
oservice_uuid:string
oservice_pods_count:int
oservice_image_id:string
User posted content
• User activity such as posts, comments, likes, shares, messages archival, etc.
• This has all three essence of big data:
• High Velocity
• High Volume
• High Variety
• Here data is:
• Accessed frequently
• Inserted frequently
• Updated infrequently
• Highly reliable and Highly available system is required, immediate consistency is not required.
• Cassandra is an ideal choice for storing user activity in form of text, small blobs and pointers to
big blobs.
• Blob Storage for storing big blobs, with a pointer stored in Cassandra to maintain metadata and
other activity on the item.
User posted content
Why Cassandra ?
• Cassandra is an ideal choice for storing user activity in form of text,
small blobs and pointers to big blobs.
• NoSql format provides flexibility to store complicated user activity
data easily.
• The datastore is highly available and highly reliable by replicating
across various nodes.
• The datastore will be not be immediately consistent but eventually
consistent. That means updates are slow and it takes time to
propagate data updates across nodes.
• Casandra will also support ongoing analytics effort for our use case.
User posted content
nosql schema
• post_master
o post_uuid:string
o post_name:string
o post_author_uuid:string
o post_text:string
o post_pointers:json
o post_url_slug
o post_scope
o post_share_count
o post_comment_count
o post_reaction_count
o post_comments
o comment_timestamp
o comment_user
o comment_text
o post_reactions
o reaction_timestamp
o reaction_user
o reaction_code
User posted content
nosql schema
• share_master
• post_id
• author_user_id
• share_user_id
o share_scope
o is_forwarded
o Is_reshared
o share_comment_count
o share_reaction_count
o share_comments
o comment_timestamp
o comment_user
o comment_text
o share_reactions
o reaction_timestamp
o reaction_user
o reaction_code
User posted content
nosql schema
• messages_archive
omessage_uuid:string
ouser_uuid:string
omessage_timestamp:datetime
odestination_group_uuid:string
odestination_user_uuid:string
ocontains_media:Boolean
oMedia_pointer:string
oreply_list
o reply_message_uuid
Real time Messaging / User Session
Information
• Incoming user messages and user session information is temporarily
stored in a highly available REDIS cache. Eventually the data is made
persistent in Cassandra for archival and analytics.
• These messages are transmitted back to subscribers in form of web
socket push. Author and subscribers can be:
• One to one (Direct messages)
• One to many (Group messages)
• Blobs shared in form of media are treated the same way as user
posted content. Actual data is delegated to that microservice, but a
pointer is stored in chat to be consumed by UI and an integrated
experience is served to users.
Real time Messaging / User Session
Information
• message_master
oMessage_uuid:string
ouser_uuid:string
omessage_timestamp:datetime
odestination_group_uuid:string
odestination_user_uuid:string
ocontains_media:Boolean
oMedia_pointer:string
oreply_list
o reply_message_uuid
Recommendation System
• Generates tailored user feed based on user connections, interests,
subscriptions, groups, etc.
• Graph dataset pulls in new data from Cassandra and stores in a
relationship topology.
• The relationships are used to curate content, connections and groups
recommendations that the user might be interested in.
• These recommendations make the user aware about activity with
common interests.
• These will be used to generate user feed.
Search
• Text based search to discover new content based on query.
• Ranks text based on similarity to query.
• Pulls in data from Cassandra and postgresql and makes indexes
available to search microservice.
• Elastic search is an ideal choice
Analytics System
• Types of analysis:
• Predefined insight charts: handled by scheduled async microservices
• Custom analysis: Data scientist/Analyst can use jupyter interface.
• Produce reports and Realtime insights in a presentable manner.
• Cluster of machines to perform batch analysis.
• Pull data from Redis and Cassandra and make it available for analysis.
• Kafka, Jupyter, Spark and Python ecosystem seems suitable for the
requirements.
Thanks

More Related Content

Similar to Community application design for streaming analytics

Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Kallex
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets Redar Ismail
 
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...QCloudMentor
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareDATAVERSITY
 
How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013Dipti Borkar
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemShiju Varghese
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library ManagementVarsha Sarkar
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...
FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...
FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...FIWARE
 
An architecture for federated data discovery and lineage over on-prem datasou...
An architecture for federated data discovery and lineage over on-prem datasou...An architecture for federated data discovery and lineage over on-prem datasou...
An architecture for federated data discovery and lineage over on-prem datasou...DataWorks Summit
 
Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...Respa Peter
 
Lighthouse20100120
Lighthouse20100120Lighthouse20100120
Lighthouse20100120sureddy
 
Rapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup ServerRapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup ServerNuwan Bandara
 

Similar to Community application design for streaming analytics (20)

Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014Scalable Architectures - Microsoft Finland DevDays 2014
Scalable Architectures - Microsoft Finland DevDays 2014
 
Portal and Intranets
Portal and Intranets Portal and Intranets
Portal and Intranets
 
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
 
How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013How companies-use-no sql-and-couchbase-10152013
How companies-use-no sql-and-couchbase-10152013
 
Presentation3.pptx
Presentation3.pptxPresentation3.pptx
Presentation3.pptx
 
NATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging SystemNATS: A Cloud Native Messaging System
NATS: A Cloud Native Messaging System
 
Design patternsforiot
Design patternsforiotDesign patternsforiot
Design patternsforiot
 
Microservices-101
Microservices-101Microservices-101
Microservices-101
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library Management
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...
FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...
FIWARE Global Summit - OpenMTC – An Open Source Implementation of the oneM2M ...
 
An architecture for federated data discovery and lineage over on-prem datasou...
An architecture for federated data discovery and lineage over on-prem datasou...An architecture for federated data discovery and lineage over on-prem datasou...
An architecture for federated data discovery and lineage over on-prem datasou...
 
Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...Web services have made the development of mobile Web applications much easier...
Web services have made the development of mobile Web applications much easier...
 
Lighthouse 20100120
Lighthouse 20100120Lighthouse 20100120
Lighthouse 20100120
 
Lighthouse20100120
Lighthouse20100120Lighthouse20100120
Lighthouse20100120
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
 
REST != WebAPI
REST != WebAPIREST != WebAPI
REST != WebAPI
 
Rapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup ServerRapid Web Application Development with the WSO2 Mashup Server
Rapid Web Application Development with the WSO2 Mashup Server
 
SNATZ Technology
SNATZ TechnologySNATZ Technology
SNATZ Technology
 

More from Sandeep Kumar

Integrating natural and built environment for sustainable development
Integrating natural and built environment for sustainable developmentIntegrating natural and built environment for sustainable development
Integrating natural and built environment for sustainable developmentSandeep Kumar
 
Sample Notice inviting expression of interest
Sample Notice inviting expression of interestSample Notice inviting expression of interest
Sample Notice inviting expression of interestSandeep Kumar
 
Sample minutes of meeting
Sample minutes of meetingSample minutes of meeting
Sample minutes of meetingSandeep Kumar
 
Sample of expression of interest in a newspaper
Sample of expression of interest in a newspaperSample of expression of interest in a newspaper
Sample of expression of interest in a newspaperSandeep Kumar
 
Eia of township and area development projects
Eia of township and area development projectsEia of township and area development projects
Eia of township and area development projectsSandeep Kumar
 
Jaipur municipal corporation
Jaipur municipal corporationJaipur municipal corporation
Jaipur municipal corporationSandeep Kumar
 
Type of approaches to development of city Complied report
Type of approaches to development of city Complied reportType of approaches to development of city Complied report
Type of approaches to development of city Complied reportSandeep Kumar
 
Rajasthan housing shortage and conditions rural vs urban
Rajasthan housing shortage and conditions rural vs urbanRajasthan housing shortage and conditions rural vs urban
Rajasthan housing shortage and conditions rural vs urbanSandeep Kumar
 
2011 12 lyp_english_core_01
2011 12 lyp_english_core_012011 12 lyp_english_core_01
2011 12 lyp_english_core_01Sandeep Kumar
 

More from Sandeep Kumar (11)

Geonetwork overview
Geonetwork overviewGeonetwork overview
Geonetwork overview
 
Integrating natural and built environment for sustainable development
Integrating natural and built environment for sustainable developmentIntegrating natural and built environment for sustainable development
Integrating natural and built environment for sustainable development
 
Sample Notice inviting expression of interest
Sample Notice inviting expression of interestSample Notice inviting expression of interest
Sample Notice inviting expression of interest
 
Sample minutes of meeting
Sample minutes of meetingSample minutes of meeting
Sample minutes of meeting
 
Sample of expression of interest in a newspaper
Sample of expression of interest in a newspaperSample of expression of interest in a newspaper
Sample of expression of interest in a newspaper
 
Eia of township and area development projects
Eia of township and area development projectsEia of township and area development projects
Eia of township and area development projects
 
Jaipur municipal corporation
Jaipur municipal corporationJaipur municipal corporation
Jaipur municipal corporation
 
Type of approaches to development of city Complied report
Type of approaches to development of city Complied reportType of approaches to development of city Complied report
Type of approaches to development of city Complied report
 
Masterplan
MasterplanMasterplan
Masterplan
 
Rajasthan housing shortage and conditions rural vs urban
Rajasthan housing shortage and conditions rural vs urbanRajasthan housing shortage and conditions rural vs urban
Rajasthan housing shortage and conditions rural vs urban
 
2011 12 lyp_english_core_01
2011 12 lyp_english_core_012011 12 lyp_english_core_01
2011 12 lyp_english_core_01
 

Recently uploaded

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/managementakshesh doshi
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxStephen266013
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...soniya singh
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Jack DiGiovanna
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 

Recently uploaded (20)

Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
Spark3's new memory model/management
Spark3's new memory model/managementSpark3's new memory model/management
Spark3's new memory model/management
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
B2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docxB2 Creative Industry Response Evaluation.docx
B2 Creative Industry Response Evaluation.docx
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
Deep Generative Learning for All - The Gen AI Hype (Spring 2024)
 
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
High Class Call Girls Noida Sector 39 Aarushi 🔝8264348440🔝 Independent Escort...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
Building on a FAIRly Strong Foundation to Connect Academic Research to Transl...
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 

Community application design for streaming analytics

  • 1. Community Application Stream Processing Analytics Raza Abbas (2019ad04095) Sandeep Kumar (2019ad04106) Shanur Rahman (2019ad04065) Explanation Video URL: https://youtu.be/PosptjOpyr8
  • 2. High Level Design Microservices API/Load Balancers Frontend/ Clients Recommendation System Graph Database APP and User info tables ML Layer/ Collaborative Filtering Real time Messaging / User Session Information User Posted Content Memcache MQTT Broker Messenger WebUI APP View Client Facing API API Gateway Service1 Service N Database / Analytics Search and Indexing Websockets . . Analytics/ Data Science
  • 3. Frontend / Client Tier • These are the only supported access points for users w.r.t application. • Includes: • WebUI • Application View • Messenger • Client Facing API
  • 4. API / Load Balancer(s) Tier • API Gateway tier aggregates various microservices based on their protocol and function, to multiple APIs. • Type of API gateways: • Rest API based on HTTP(s) with supported operations such as get, post, put. • Websockets to support real time chat applications. • MQTT to support routing and logging of high speed incoming messages to database and other applications. User chats, logs and maintenance. • API gateway also acts as a firewall, delegating authentication to an Internal microservice or API.
  • 5. Micro Services Tier • Forms the basic application business logic. • Every interaction to application goes through microservices. • These services will write or read content from databases directly or through data models. Such as Django data models. • For frontend UI Django is an ideal choice. This will contain app routing and user authentication logic. • For Backend services Django Rest is an ideal choice. This will contain the queries and routines to be executed in analytics tier. • For serving static resources apache server will be used.
  • 6. Micro Services Tier • Based on Kubernetes cluster(s). • Each service group contains multiple separate services. • Will have both: • Sync microservices: Data Access, media, routing, authentication, etc. • Async microservices: Background and batch processing. • Authentication within microservices and external requests is based on User session information stored in a REDIS cache database. It will be exposed as an API(Oauth type). • Each microservice has separate compute / network resources, the stack can be scaled by adding more instances (Horizontally scalable). • A service bus will be deployed for inter services communication.
  • 7. Micro Services Tier • Microservice will also maintain and manage application definition involving: oApplication scaling oApplication security oApplication management oAnomaly detection • One service group will be dedicated to above said functions.
  • 9. Types of data streams • APP and User info tables oStructured data • User posted content oUnstructured/structured data • Real time Messaging / User Session Information oUnstructured/structured data
  • 10. APP and User info tables • Contains user definition information, app definition information, user authentication information and regulatory data. These are stored in form of multiple simple tables. • Some of the tables would be generated using Django models. • As the new users sign up a moderately sized database will build up. • Data is accessed and updated infrequently but high consistency is a requirement. Postgresql is an ideal choice based on the requirements.
  • 11. APP and User info tables schema Format • table_name o column_name:datatype:indextype • user_master ouser_uuid:string:btree ouser_email:string:btree ouser_name:string:btree ouser_phone:string ouser_signup_date:datetime ouser_last_logged_in:datetime ouser_password_hashed:string
  • 12. APP and User info tables schema • user_group_master o group_uuid:string o group_name:string o group_user_count:int o group_is_active:Boolean o group_created_on:datetime o group_deleted_on:datetime • user_group_user_list o group_user_index:string o user_uuid:string o user_name:string o is_active:boolean:btree o is_admin:boolean o added_on:datetime o removed_on:datetime
  • 13. APP and User info tables schema • application_master oapp_pods_count:int • app_service_groups_master oservice_uuid:string oservice_pods_count:int oservice_image_id:string
  • 14. User posted content • User activity such as posts, comments, likes, shares, messages archival, etc. • This has all three essence of big data: • High Velocity • High Volume • High Variety • Here data is: • Accessed frequently • Inserted frequently • Updated infrequently • Highly reliable and Highly available system is required, immediate consistency is not required. • Cassandra is an ideal choice for storing user activity in form of text, small blobs and pointers to big blobs. • Blob Storage for storing big blobs, with a pointer stored in Cassandra to maintain metadata and other activity on the item.
  • 15. User posted content Why Cassandra ? • Cassandra is an ideal choice for storing user activity in form of text, small blobs and pointers to big blobs. • NoSql format provides flexibility to store complicated user activity data easily. • The datastore is highly available and highly reliable by replicating across various nodes. • The datastore will be not be immediately consistent but eventually consistent. That means updates are slow and it takes time to propagate data updates across nodes. • Casandra will also support ongoing analytics effort for our use case.
  • 16. User posted content nosql schema • post_master o post_uuid:string o post_name:string o post_author_uuid:string o post_text:string o post_pointers:json o post_url_slug o post_scope o post_share_count o post_comment_count o post_reaction_count o post_comments o comment_timestamp o comment_user o comment_text o post_reactions o reaction_timestamp o reaction_user o reaction_code
  • 17. User posted content nosql schema • share_master • post_id • author_user_id • share_user_id o share_scope o is_forwarded o Is_reshared o share_comment_count o share_reaction_count o share_comments o comment_timestamp o comment_user o comment_text o share_reactions o reaction_timestamp o reaction_user o reaction_code
  • 18. User posted content nosql schema • messages_archive omessage_uuid:string ouser_uuid:string omessage_timestamp:datetime odestination_group_uuid:string odestination_user_uuid:string ocontains_media:Boolean oMedia_pointer:string oreply_list o reply_message_uuid
  • 19. Real time Messaging / User Session Information • Incoming user messages and user session information is temporarily stored in a highly available REDIS cache. Eventually the data is made persistent in Cassandra for archival and analytics. • These messages are transmitted back to subscribers in form of web socket push. Author and subscribers can be: • One to one (Direct messages) • One to many (Group messages) • Blobs shared in form of media are treated the same way as user posted content. Actual data is delegated to that microservice, but a pointer is stored in chat to be consumed by UI and an integrated experience is served to users.
  • 20. Real time Messaging / User Session Information • message_master oMessage_uuid:string ouser_uuid:string omessage_timestamp:datetime odestination_group_uuid:string odestination_user_uuid:string ocontains_media:Boolean oMedia_pointer:string oreply_list o reply_message_uuid
  • 21. Recommendation System • Generates tailored user feed based on user connections, interests, subscriptions, groups, etc. • Graph dataset pulls in new data from Cassandra and stores in a relationship topology. • The relationships are used to curate content, connections and groups recommendations that the user might be interested in. • These recommendations make the user aware about activity with common interests. • These will be used to generate user feed.
  • 22. Search • Text based search to discover new content based on query. • Ranks text based on similarity to query. • Pulls in data from Cassandra and postgresql and makes indexes available to search microservice. • Elastic search is an ideal choice
  • 23. Analytics System • Types of analysis: • Predefined insight charts: handled by scheduled async microservices • Custom analysis: Data scientist/Analyst can use jupyter interface. • Produce reports and Realtime insights in a presentable manner. • Cluster of machines to perform batch analysis. • Pull data from Redis and Cassandra and make it available for analysis. • Kafka, Jupyter, Spark and Python ecosystem seems suitable for the requirements.