Event based server communication?

absolutelyfreewebabsolutelyfreeweb Member Posts: 104
Hi,

Just a small question, wondering if you know something I haven't heard yet:

If I want the logic to be executed on the server, and the answer returned to the client without polling, what are my options?

e.g. like a web request. Client sends it to the web server, where its application server does the magic, then returning the answer to the client. In Navision, I would like to avoid a NAS first polling for a task, then the client polling for the answer, instead I would like a completely event based client/server communication. Installing extra client stuff isn't really desired either.

Thoughts?

Comments

  • DenSterDenSter Member Posts: 8,304
    In order for something to react to events, that something needs to be running. If it is not an installed polling mechanism of some sort (message queue monitor, TCP/IP socket, etcetera) then how else would you see that happen?
  • absolutelyfreewebabsolutelyfreeweb Member Posts: 104
    The client is obviously running and I want it to be poked, a wake up call. The polling would burden a heavily used database too much.
  • DenSterDenSter Member Posts: 8,304
    I guess because you didn't specify what you mean by "polling" I don't really understand what it is you are looking for. I don't get why you would want to poke a client session. Those serve functional needs of users, and they can start using it any time they want. Maybe you could explain what you need in functional terms, and we can help come up with a solution.
  • absolutelyfreewebabsolutelyfreeweb Member Posts: 104
    Hi, the functional scenario is I want the nav client to show information from an external system, And I want the retrieval to be done centrally to avoid maintenance problems.

    What I meant by polling is, client checking a table, and the nas checking a table.
    As I tried to say, I want to avoid polling because

    -its not immediate
    -it burdens the database from both sides
    -think also many concurrent clients

    Just see example on first post, for the ideal way I would want it.

    Thanks
  • ara3nara3n Member Posts: 9,256
    you can use Navision socket activex component.

    Instantiate it at the client site and open a port to listen to. Write the info into a table such IP and port that the client is available on and then the send messages to the port for the client to do something.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • DenSterDenSter Member Posts: 8,304
    What I meant by polling is, client checking a table, and the nas checking a table.
    As I tried to say, I want to avoid polling because
    OK gotcha :mrgreen: I was thinking about not just a table but other polling mechanism, like looking into a folder for files, or checking a message queue

    The only event driven ones in C/AL that I can think of are the standard bus adapters. The ones that I've used are the one for message queue, and one for TCP/IP sockets. I don't like the MSMQ one because it is severely limited, and the socket one only goes one way. So as long as your solutoin fits within the limitations of the bus adapters, you should be fine with either one of those.

    Check your product disk for a file called "devguide.chm", I think it's somewhere in the commerce gateway folders. This comes with code samples for all communication components.
Sign In or Register to comment.