Results 1 to 7 of 7

Thread: Make Server Program talk to Web Application

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    Make Server Program talk to Web Application

    Hi,

    Let's say I want to make a pizza tracker and an ASP.Net Web front-end for the tracker, and I want them to run on the same computer. When the local pizza shop is finished baking, preparing, or delivering the order, a computer at the shop will notify the tracker program, which will then inform the ASP.NET application so that the user gets an update in real-time. What's the best way to make the tracker talk to the Web application? I'm thinking that a TCP connection would do best. (Note to Googlers: There's also UDP, which is used when you just need connect for a few seconds to obtain one reply from the server)

    In other words:
    1) Pizza shop sends updates on progress of one's order to off-site tracker program
    2) Tracker tells ASP.Net application about the progress of the order.
    3) The orderer, who is using the Web application, sees the new progress.
    How do I make 1) and 2) happen?
    Last edited by moonman239; Apr 24th, 2015 at 01:00 PM.
    Do not read this sentence.
    You read that last one, didn't you?
    Darn. You now read the previous two.

    Check out my pins on Pinterest!

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    17,873

    Re: Make Server Program talk to Web Application

    So the user is in a web browser - right?

    Bottom line question is how to get a web browser to auto-update.

    Am I understanding your needs?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    Re: Make Server Program talk to Web Application

    Quote Originally Posted by szlamany View Post
    So the user is in a web browser - right?

    Bottom line question is how to get a web browser to auto-update.

    Am I understanding your needs?
    Yes, the end user is in a Web browser.
    Yes, my question is how to get a web browser to auto-update with data from the tracker program.
    Do not read this sentence.
    You read that last one, didn't you?
    Darn. You now read the previous two.

    Check out my pins on Pinterest!

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    17,873

    Re: Make Server Program talk to Web Application

    You cannot send anything to a web browser - all communication is the results of a GET or POST for information from the browser.

    My suggestion would be to regularly send a request - a POST - from the browser to the web server to see if anything has changed.

    AJAX is all about this - running in JavaScript in the browser.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    Re: Make Server Program talk to Web Application

    Quote Originally Posted by szlamany View Post
    You cannot send anything to a web browser - all communication is the results of a GET or POST for information from the browser.

    My suggestion would be to regularly send a request - a POST - from the browser to the web server to see if anything has changed.

    AJAX is all about this - running in JavaScript in the browser.
    I get that.
    The AJAX I can do myself. What I want to know how to do is make the ASP.Net application know about the new progress. I have a few ideas:
    1) Make the tracker program use TCP to communicate with the Web application.
    2) Make the tracker program save the progress to a file or database, then make the Web application check the file/database for new information. I see that I can use a file system watcher.
    The question is, which approach is best?
    Do not read this sentence.
    You read that last one, didn't you?
    Darn. You now read the previous two.

    Check out my pins on Pinterest!

  6. #6
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    CT
    Posts
    17,873

    Re: Make Server Program talk to Web Application

    I assumed you had a database.

    Where is the information about an order being stored right now?

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Mar 2007
    Posts
    183

    Re: Make Server Program talk to Web Application

    Quote Originally Posted by szlamany View Post
    I assumed you had a database.

    Where is the information about an order being stored right now?
    It's not - I just wanted to know how to make a VB.Net program interface with an ASP.Net application, and a pizza tracker seemed like a good example of where such knowledge would be useful. And who knows? Maybe I could design a pizza tracking system and sell it to, say, small pizza shops (without infringing on existing US patents)
    Do not read this sentence.
    You read that last one, didn't you?
    Darn. You now read the previous two.

    Check out my pins on Pinterest!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width