Communicate between VB.NET applications across a LAN and WAN [closed] - vb.net

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm looking into writing an application that will run on multiple machines on the network - I haven't started to write any code yet as I'm looking into options at the moment - I'll have each client inform the server of their presence, possibly by updating a SQL table that stores machine info and an "Offline / Online" status field... unless you can think of a better way of doing this?
As well as the client running on each users PC on the network, there will be "operators" running a different application.
What I'd like to be able to do is have the operators send messages to clients, the client then receives this message and displays it in a notification window. The operators application will do a SQL query to get all online clients and then send the notification only to these machines.
I can do the SQL side of things, the part I have no idea how to do... how do I have the operator application send notifications to the clients once it has the list it needs to send to?
I'll need to be able to send two strings at once:-
- Notification Title (String & Date.Now to show when the message was sent)
- Notification Message (multiline - no more than 5 lines)
Any help on how to have a vb.net application read two text boxes and send the contents to a remote vb.net application that can then assign those values to variables to be used and passed to a notification popup (I already have the popups working) would be greatly appreciated.
Thanks in advance.
Merick.

Depending on how complicated and exciting you want to make this task, you may want to explorer the pub/sub model and handle communication using WCF and some message queue (like MSMQ, Tibco, ActiveMQ, etc)

Related

Webhook (Push) vs Asynchronous Queue (Push) Architecture [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 months ago.
Improve this question
When building webhooks, it's a best practice for the consumer of the webhook (e.g. the receiver of the webhook) to immediately drop any messages received into a queue to prevent it from "backing up" the delivery of subsequent messages. This seems to be the "best practice" for years regarding webhook architectures. Nowadays, with the advent of internet-accessible queues (e.g. Amazon SQS), why are we not flipping the script on webhook architecture such that the consumer becomes responsible to "pull" messages off a queue, rather than receive message via an http post?
Yes, this essentially is no longer a "webhook", but the concept is the same. The problem being solved here is that a consumer wants to be made "aware" of events happening in another system. Why not have the publisher of these events store all relevant events in a queue dedicated to a single consumer such that the consumer can pull those messages off the queue at their own leisure, pace, etc. I see many benefits to this, mainly the transfer of responsibility to the consumer to "dequeue" messages according to their own abilities. The publisher drops messages as quickly as they can into the queue, and the consumer pulls them off as quickly as they can. If the consumer goes down for any reason, the messages will still remain in the queue for as long as they need. Once the consumer is back up, they can continue pulling message off. No messages ever lost in this scenario. Right?
The way I see it is mostly an opinion, not necessarily the ultimate answer.
While theoretically there's a good point in advocating for pushing messages straight to the queue by the producers, there's a real world constraint that will be imposed on those producers. Every messaging system has some nuances. This means producers have to be aware of those nuances in order to be able to publish to various messaging services. Authentication is another nuance. All this turns into a nightmare for any producer that issues notifications to various consumers. This is what webhooks have solved. Ubiquitous, established protocol, authentication, etc.

How to decrease latency on Binance API orderbook calls? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am currently attempting to decrease latency when calling the orderbook with the Binance API.
I am getting a ping of ~7ms but the orderbook call takes ~200ms to download. I am using a VM hosted in the same AWS farm that Binance uses, and I am running on a network speed of ~800mbps. I do not understand why the orderbook call takes nearly two orders of magnitude more time to receive than the time it takes to ping the server when the size of the orderbook is relatively small.
Any help or insight into either the network, or restrictions imposed by Binance would be greatly appreciated.
Important distinction:
Ping: goes to the nearest CDN edge node, which responds to you; you don't get anywhere near a Binance server.
API request: goes to the nearest CDN edge node, gets routed to the Binance server, gets processed, then the response is routed back to you.
Binance servers are hosted on AWS in Tokyo. If you place your host there, the latency will be about 12-15ms (2ms from when Binance sent the response.)
To lower the average latency, you may try to post idempotent requests in parallel, and then use the response that arrives first. It's rude but it gets the job done.
As a random note, client order IDs are reusable, which makes them useless as a method of making orders idempotent. (However, if you use fixed order sizes, you could preemptively lock all the rest of your funds, then hammer Binance with order placements knowing a duplicate order couldn't succeed since you wouldn't have funds.)
By now there are multiple api endpoint api/api1/api2/api3.binance.com
I pinged the endpoint using cmd. And the given method provided by #Tiana.
For me api2 had somehow the best latency. But not really better than api1 or api3.
Just the normla api had very bad latencies from time to time.
Apparently the endpoints are on different server i guess and the api. endpoint is overused a bit.
So i would suggest using the api2.binance.com endpoint

WAN/GAN IM application in VB.net

Hi I have started a project which connects to a database and creates/logs in a user at the moment i have a LAN messenger that works very well, and a FTP chat which is not exactly what i was hoping for.
my idea now is to create two tables in the database message 1 and message 2 both of which display the user who is sending and the message sent. and the program uses threading to connect and download the messages.
My question is, is there a better way of completing this task (if so could you send a link or two this way? or express your opinion).
and or any problems you guys/girls think i would run into. Cheers :D
If you require to see some code just ask and i'll edit the post thanks
Although its easy on paper to do a chat application that uses a 'DB' as a backend/comms layer .. its not really the best approach. It will work... but with load, it may not be a very good approach.
Most chat clients uses a peer to peer connection, or even client server with the coding and implementation of a server that handles what happens with messages going/destined where ever.
If you really want to get low down and dirty, google for 'TCP chat application' examples. If you want to operate a bit higher (not handle the really gritty low down mechanics), then look for some 'wcf chat' examples.

Does RabbitMQ offer the following features? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have used N Service Bus in one of my projects recently and although I like it but I am still looking for alternate options. I have stumbled on RabbitMQ but before I give it a try I want to find out the following things:
1- Is it reliable? (With N Service Bus if a message gets published to the queue the listener always receives it).
2- If the client is down does it automatically gets the message when it becomes available? like in NSB.
3- Is it lightweight on resources (NSB is very lightweight)?
4- Is it easy to integrate with .Net?
5- Is the Admin panel available with Open Source free version?
6- Is it easy to track down problems if messages are not getting published etc? (This is the pain with NSB)
7- Does it support complex scenarios where there might be N number of Listeners for a message or a single listener that needs to listen to multiple messages etc?
8- Is it configurable from code? (Personally I don’t like to use heave Config files, just personal choice )
9- Is the .Net API of RabbitMQ clean or does it make the code messy?
Kindly give me your feedback. All the above questions are relevant to the Open Source version, I don’t want to buy licensed version yet.
Also suggest if there are any other options available out there.
Thanks,
Is it reliable? (With N Service Bus if a message gets published to the queue the listener always receives it).
Yes. In addition you have more control over the 'reliability' in rabbitmq, for example you can specify that a queue is durable (which means that messages are persisted to disk before being delivered).
2- If the client is down does it automatically gets the message when it becomes available? like in NSB.
Yes.
3- Is it lightweight on resources (NSB is very lightweight)?
RabbitMq is written in erlang and runs as it's own process. You have a lot of insight into how it is consuming memory, but the actual resource usage will be dependent on your workload.
4- Is it easy to integrate with .Net?
Yes. The basic rabbitmq C# wrapper is very easy to use and offers a very simple abstraction over the rabbitmq concepts. There are higher level libraries available if you're coming from NServiceBus (which I believe has a RabbitMQ adapter). You should look at MassTransit, which can use RabbitMQ as well as MSMQ as a transport, and libraries like my own chinchilla or EasyNetQ which are RabbitMQ only.
5- Is the Admin panel available with Open Source free version?
Yes.
6- Is it easy to track down problems if messages are not getting published etc? (This is the pain with NSB)
Yes. Using the admin tool you can see bindings between exchanges and queues.
7- Does it support complex scenarios where there might be N number of Listeners for a message or a single listener that needs to listen to multiple messages etc?
Yes.
8- Is it configurable from code? (Personally I don’t like to use heave Config files, just personal choice )
Yes.
9- Is the .Net API of RabbitMQ clean or does it make the code messy?
Yes.

Detect when PDA (Windows Mobile) is in flight mode

I need to produce an error display message when the Windows Mobile PDA is in flight mode. The user will need to pull and push data from a SQL Server server; however when in flight mode this is not doable and a message needs to be displayed. Currently the message that is displayed is:
a requeste to send information the the computer using IIS has failed.
For more results please see HRESULT
I am programming using VB.Net and I am fairly new to it. I have searched for the past week on the Internet and come across information suggesting that I use TAPI, however i do not know what to import, or where the "flight mode detection" code would go in my application.
Use the State and Notification Broker. Use the SystemState class to read and/or monitor the value of something like SystemProperty.PhoneRadioOff. Here's an example of using the SNB (in C#, but simple enough to convert).