Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8792497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:59:12+00:00 2026-06-13T22:59:12+00:00

I am new to MVC and from what I understood so far, each web

  • 0

I am new to MVC and from what I understood so far, each web request is independent, and in the controller you usually create a new Model object and load it from some data source.
That’s great when you work against a DB and load the model object you need.

But what if my data source is a live real-time streaming data, and when the user click on a button I need to give him the last data I got from the stream ?

The simplest example I can think of is stock data:

Assume that I have a data source object that connects to the exchange and subscribes to a live feed of stock prices, and, when the client click on a button "Get last quote", I need to return the latest price I got (note: I do NOT need to stream data to the client, only return a snapshot when he clicks, or every 5 seconds etc).

So what I’m looking to do is, when the application starts create my static data source object, have it connected to the exchange and start listening to the feed, on each price change it stores it on some local variable, and in my Controller all I need to do is to call to my static data source and ask for the last tick (and it will return the value of the local variable).

Hope my question is clear. I know, it might be simple, but I just don’t know, what is the correct pattern for this in MVC. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:59:12+00:00Added an answer on June 13, 2026 at 10:59 pm

    I would create it from 4 parts:

    • background process/daemon which continuously pushes stock data to NoSQL database
    • main application, which serve the web site
    • javascript driver frontend app, either listening to open socket or requesting data each few seconds
    • data provider, which pulls information from NoSQL and handles the frontend requests

    It would make sense to use some MVC-inspired patterns for main application and frontend (yes, two MVC triads). But the rest are just glorified transaction scripts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From a brand-new ASP.NET MVC 4 Beta Web Application, I'm re-arranging my folders to
I am new to ASP.NET MVC, coming from a web forms background in the
How can MVC website benefit from the new parallelism features in .net 4? don't
I'm new in ASP.NET MVC. I've switched to it from PHP. In PHP, when
I've been working with ASP.NET(WebForm) for a while, but new to ASP.NET MVC. From
I have started a new mvc project and clicked on project\properties\web - use local
I am new to the concept of MVC and multi-tiered web architecture. I developing
I'm new to Spring MVC and Freemarker. So far I've used JSF and I
I'm new to MVC and I borrow a book from library yesterday on asp.net
I'm new to codeigniter and building web applications using MVC. I'm trying to wrap

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.