+ Reply to Thread
Results 1 to 4 of 4

Thread: Balance Question

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Balance Question

    In an application we are developing with Electroserver, each user has a balance.Lets assume that user "A" with balance "100" is connected to the server through the flash client.At that time I go to our own back office application and adjusts Users "A" balance.How will i send a notification from the backoffice to the user that his balance changed?Is there a way I can communicate with the server from a web application in order to send a specific message to a specific user?

    Dimitris Zenios

  2. #2
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    The simplest way is to have a command line java client on the same server as the backoffice, that logs in to ES5 using a special username and password, and sends a plugin request to a server level plugin, or even a private message directly to the user. Your backoffice could communciate directly with the java client, and it could just stay logged in constantly if this was something likely to be needed frequently.

    There are many other ways to do this, that are more complicated to implement or just take a bit more time for the information to appear. If you don't like this suggestion, I can give you a few more.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  3. The Following User Says Thank You to tcarr For This Useful Post:

    zenios (02-24-2012)

  4. #3
    Junior Member
    Join Date
    Feb 2012
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    i was thinking of electro server plugin with jms that listens for events from the back office and informs the users.But your solution with the back office acting as a normal client and sending private messages to the user sounds better.Is there a better alternative than those two?

  5. #4
    Former Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,701
    Thanks
    84
    Thanked 1,178 Times in 1,165 Posts
    Better is a judgment call. The solution I suggested is a good one, and if you use private messages instead of a server plugin in the middle, you would just need to make sure that only your java client can log in with that particular username and the normal client check that balance messages come from that particular username, so that you don't end up with a hacked client sending spurious private messages to users about their balance.

    Using a server plugin in the middle is a bit easier to secure: the server plugin could check all kinds of info about the user sending the plugin request, including the IP address if you like, and if that server plugin sends a plugin message event to clients, they know it comes from the server.
    Teresa Carrigan
    Senior Software Developer
    Janus Research Group, Inc.
    previously
    Senior Engineer
    Electrotank, Inc.

  6. The Following User Says Thank You to tcarr For This Useful Post:

    zenios (02-24-2012)

+ Reply to Thread

Tags for this Thread

Posting Permissions

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