Coffescripts not receiving data from broadcasted message relay job - coffeescript

Here's the code:
How to ensure the javascripts/channels/chatrooms.coffee is loading and receive: (data) works? Console.log data is not loading
I posted the problem the other day. It comes from a tutorial, but somewhere after continuing work on my project, I'm not sure where the bug came up,
But the message relay job posts on the server, and my config.yml has redis with redis up and running.
There have been similar bugs, but I've worked through those solutions and it's not enough. The received: (data) console log doesn't arrive in the js console of the browser.
The App subscriptions seem to all be in order according to the tutorial, I bet it's a really simple fix.
My messaging system still works, so it's not crucial to the project, but it's a difference of having the chat system work in realtime versus with a 4 second page-refresh delay.

The last problem I had was not including jquery for my other coffeescripts, so I'm guessing the channels coffeescripts is probably a one line fix.

Related

Problem using signalr for chat application flutter

I had made a whole chat application using signalr as a socket with the online and offline facility. I am facing a few problems,
Signalr connection is always time out after some time, to overcome that I had condition if hubconnection is not connected then create new hubconnection (onResume app), but still it get hubconnection._callback got increased when sending message and not moving to server side socket. Again need to refresh whole app.
Can someone tell me whether this is problem because there are lot of operations going on and so signalr loses its connection as flutter is single thread and it cannot handle much? or should I use Isolate or inherit widget.
Summary problem:
I cannot send message in chat after sometime. It stores all message in hubconnection._callback and not going for server.
Is anything better solution to keep alive in both Android+iOS.
I had used https://pub.dev/packages/signalr_netcore package.
Please do not mention about firebase.
Any other logic suggestion is appreciable.
Thank you.
I've been using a different package, https://pub.dev/packages/signalr_core, which works fine without any particular issues what I have observed at the moment.
I'm only running about 10 listeners simultaneously, not sure if that is more or less than you. In the package I'm running you can establish connection with automatic reconnect. It looks like this:
HubConnectionBuilder().withAutomaticReconnect().withUrl(....)
It seems like your package have the same functionality... Have you tried that?

Not able to receive message as a batch from the channel subscribed using aiosfstream, Python library for salesforce

I am trying to subscribe to a salesforce channel, I was able to get the messages from the channel.
But the issue is I am getting the messages one after another, the expected way of receiving is when bulk messages are published to the channel. Need to get the messages as a whole in the subscriber.
Let's say if I publish 500 messages, I need to get whole 500 messages here on the subscriber. But I am getting one message after another.
I am using the following code
async with client:
for topic in get_topics(system='salesforce'):
await client.subscribe(topic)
async for message in client:
messages = message
The above code is called inside async function
I am not sure this a bug from library or the method I follow is wrong
please let me know what is the issue.
I was able to figure out this Issue,
It is not related to library, it is super awesome. I was able to get the message real time.
The issue was with the architecture I have currently, which is causing the delay.
Thank you all for the help.
I see like it is not so good to answer this way, but answering it so that it might give someone heads up. While looking for such errors.
They can easily start debug the architecture instead of the library.

libSpotify-based client slow, but Spotify's own client fast

I've run into some weird issues with libSpotify. It seems that any libSpotify-based client will take ages to process requests (sometimes 20 seconds for a simple search, seconds for loading one single image, etc..) sent to Spotify servers, whereas Spotify's own desktop client for Windows works extremely well on the same system, processing requests and loading images in near realtime.
Even the demo app provided with libSpotify, called spshell, exhibits massive problems:
Did anyone experience similar problems and/or knows the cause?
Magically works again since today, no clue why.

Play2.1 (Scala) leaking memory in Server Sent Event (Enumerator)

I'm working on an application where I want the server to send events to my JS front-end to show money transactions as they are processed.
The way I implemented works as intended; however, after a couple of hours I notice the heap increasing and consequently killing our server.
I read somewhere that it could be caused by nginx not being configured correctly, but the keep-alive is set to just a few seconds. I also saw a couple of posts regarding memory leak issues when one attempts something like the following:
val newTransaction: Enumerator[String] = {
Enumerator.generateM[String] {
Promise.timeout(getNewTransactions, checkingInterval 500)
}
}
...
Ok.stream(newTransaction &> EventSource()).as("text/event-stream")
getNewTransactions is just a method that hits Redis to check if any new transaction arrived for an account.
I tried updating my project to use the newest Scala version 2.10.2, but it seems that it doesn't solve it. In the meantime, I am resorting to JavaScript polling until I can figure it out. Does anyone have any idea how I might solve this?

Part of DROOLS ruleflow not working randomly

We have a main ruleflow which calls 8 more rule flows (Rule1.rf to Rule8.rf) through an AND splitter. One of the rule flows - say Rules4.rf - is fired sometimes and not fired sometimes.
This is for an online application and we use jBoss. When the server is started, everything works fine. After many hours, for some requests, Rules4.rf is not fired at all and for others, its fired properly.
We even posted the same request again and again and the issue happens some times only. There is no difference in the logs between the success & failure requests, except for the logs from the Rules4.rf which missing in failued requests.
We are using drools 5.1 and java 6.
Please help me. This is creating a very big issue.
It is very difficult to figure out what might be going on without being able to look at the actual code and log. Could you by any chance create a JIRA and attach the process and if possible (a part of) an audit log that shows the issue?
Kris