ChatJS jquery.chatjs.adapter.demo.js for multiple users - chatjs

I took a look at ChatJS today, but I am not sure how to go about completing the jquery.chatjs.adapter.demo.js adapter code as the coder suggested. If you take a look at the example file you will find a bot replying the same message in the chat room. What I want is to be able to chat with multiple users online. I can load in the users from any source for now and probably worry about the connection later. If someone has a working adapter code for ChatJS please let me know, I will be using it with ASPX. I am not sure if I need the signalR adapter for this to work.

Related

How to properly notify client of changed status?

I am writing a (Django-based) website which is working just fine. It displays a list of sensors and their status. If a new sensor is attached, the user needs to wait for a certain amount of time until it is warmed up and ready to use. Also, when the sensors are updated (which the user can trigger, but can also be done automatically by the system) - the user needs to wait.
On the server side I have all signals/Status updates/whatsoever available. Now I want to create an overlay for the current webpage where the statuschange is displayed for x seconds and userinput is disabled.
I have no clue what technology to use. I could frequently ask for updates client -> server but that doesn't feel like the correct way. Any suggestions on what to search for?
No code here because the answer is probably independed of my website code
Standard solution is to use Ajax (JavaScript) or similar to get state from your backend on specific intervals, that is the approach you're mentioning.
You can also "push" changes from your backend to frontend using WebSockets but that is a bit more complex. A popular framework is socket.io, I recommend you take a look at it.

How to avoid Outlook Security Alert

So I'm interning at a company and essentially self teaching myself C++ to get a head start on classes this fall.
The problem I have that I cannot find a solution for, is how to send an email without user interaction and avoid the security prompts by outlook. I have tried different ways to send the email like with simplemapi, cmd, vb, cdo, etc but nothing I do seems to get rid of that 'please wait 5 seconds because someones trying to send an email' prompt, and I can't have that.
I also can't install any third party software because I need this program to work on all the company computers.
I'm about to try with System.Net.Mail.MailMessage and see if I can figure that out.
End goal is that they click a button, and an email sends without their knowledge, with no security prompts. If it needs authentication to execute without the prompt I can implement that too. I'm using winapi on 64 bit systems, and have the exe run from sharepoint by pulling from a network drive if that matters. And please don't be closeminded about using MS office, I'll do anything to make it do what I want it to
In the meantime, if I could get a code sample or a link in the right direction (NOT MSDN FFS) that would be greatly appreciated.
See http://www.outlookcode.com/article.aspx?id=52 for a list of your options.
Note that System.Net.Mail.MailMessage will only work against an SMTP server, so it really has nothing to do with Outlook.

Is using Mirth Connect or any other interface engine overkill in this situation?

I've been assigned a small project and directed to use Mirth Connect as part of the solution. We currently do not use Mirth but because we have an upcoming project that will require an interface engine, I was asked to use it for this project so I can gain experience with it. However, I think it's a poor suggestion for this project; I also know my boss would not want me to implement something that adds unnecessary complexity just for the sake of learning.
With that said, I want to make sure I have valid reasons for suggesting that Mirth Connect should not be used for this project. Neither of us know much about it, but I think he's been convinced it is the end all solution for all things interface/webservice related. I appreciate any input I can get from those of you who have more experience with the product than I have.
This is a very simple project in that we have a client needing to make a handful of requests into our system from there's in order to retrieve and update data. For example, they will make a request to get patient demographics, to add an admission for a patient, a request to get a list of possible care settings from our application, etc. For this project we will not use HL7 but a set of predefined XML messages.
Both the client's application and our application reside on the client's network.
They do not want to build any services of their own, so the services we build need to handle all of the work. The results returned in response to their calls to the services will be returned as XML.
There are no plans to integrate any other applications with theirs or ours in the foreseeable future.
It seems to me the best option would be for us to build a standalone web service that would take their request and send back an XML response. I just don't see any reason to include Mirth Connect in the picture (other than for learning but that can be gained in other ways).
What are your thoughts? Is it true that the interface engine is not a good choice if the client wants to receive data from our system without having a receiving mechanism on their end? In other words, they want to make a web service call such as GetCareSettings and to get a response back with an XML representation of all the possible care settings in our system. It seems to me they would need a web service on their end for Mirth to use as a destination to send the results. All Mirth is going to send back is an ACK message, correct? (Unless of course it wrote the data to another webservice on the client end, which they have said they do not want to do.)
Thanks for taking the time to read this. I hope my lack of knowledge and understanding of Mirth Connect and the use of interface engines hasn't made this question difficult to answer.
From what I understand, Your client appears to be either a Lab or a third party service vendor, who will take inputs from your application like patient demographic charts, appointments, provider details etc. Basically he wants to query your application.
A) HL7: It has the capacity to handle query request and response with demographics. I am assuming that you have done you might be knowing about QRY messages.
B) XML/webservices/SOAP:still provides a viable solution, a little more concrete and can be expanded to Handle custom request like GetCallSettings, or may be any other. The vendor is not just interested in fetching patient related data but also other inputs for which HL7 might not be enough.
If we talk about approach, then its a professional advice to use an interface engine. It is not limited to just using mirth connect, you can also use Iguana if you want. A good reason which comes instantly to my mind is that an engine gives you an advantage while troubleshooting, support and maintenance activity.
Your Webservice responses can be handled easily by HTTP sender connector type and through RESTful webservices.
The engine is also capable of handling large volumes of request and responses at the same time, which in case is not required right now, but I think will be the condition later on. Your source in the channel shall change to an Webservice Listener.
Another good approach is to do away with XML and use JSON for handling request and responses, a much more light weighted than XML, to save your overhead with the network. We are doing some similar work, but we are sending request to a webservice through JSON.
Overall, Mirth is there to make your life more easier.
Good Luck!

A couple of questions for a websocket app

I'm currently using Jetty as my websocket server and I'm trying to make a real-time game. I'm really new to this. So far I've managed to work on the easiest one (which is the chat). Now, I have a couple of issues:
I'm trying to make a list of the current users connected in the server; how do I make such feature? I don't really know if this is practical but my idea is that there's a time interval that lets the server know that "Hey, I'm still alive." I want my user list to be dynamic in such a way that if a user logs out, the list will refresh.
I'm also trying to make "rooms" for my app. Basically, the people in "Room 1" can't see what people in "Room 2" are doing; the other room functionalities are already self-explanatory. I still don't have an idea for this; can someone recommend a way to implement this?
So far I've been having fun in learning this technology, and I would be very glad if there would be incoming help. These two are my issues so far. I'm also open for any suggestions for my app.
Thank you all in advance. :-)
(Uhm, can #1 and #2 be solvable solely by Javascript?)
Your question isn't really jetty or websocket specific.
Websockets simply provide a transport mechanism for your web browser to communicate with the server - what gets set over that transport, and how the server manages information are completely separate to the websocket.
Firstly, if you haven't read it already, read this article: http://cometdaily.com/2010/03/02/is-websocket-chat-simple/
Secondly, consider using cometd to make this easier - version 2 (currently in Beta) supports websockets.
As for your questions - there are 2 things you'll need to do (cometd can help with this)
1. Define a protocol
Define a messaging protocol to sit on top of websockets. Websockets just provide a way to send chunks of data around, they don't define what that data means. You'll need to build something that does that, so you have messages that go from the client to the server like.
CONNECT "user"
STILL_ALIVE
JOIN_ROOM "room1"
LEAVE_ROOM
GET_USER_LIST
SEND_MESSAGE "message"
And then you need messages form the server to the client
RECEIVE_MESSAGE "user" "message"
RECEIVE_USER_LIST "room1"
You need to come up with some reliable way to send that data over a websocket. You can invent your own simple protocol (like the Jetty chat example does), you could use JSON, or XML, or CometD channels.
2. Server-Side State
If you've got simple chat working, then you must have made a start on this, but the other bit you need is a way to keep track of
how many users are connected
what their names are
which socket they're connected to
which room they're in
Depending on how complex your system is going to become, you might be able to just store that in 1 big singleton on the server.

Connection between different Web-Services? (eg: Twitter-Feeds on Facebook)

does anybody know agood way in granting a connection from one service to another, so that both services benefits fromeach other?
I would like to have an easy but never the less safe way to do a connection between my server and another server, but I don't know how to do that.
It should be ...
easy, so that neither the user nor the service providers have to waste alot of time
traffic effecient, so that traffic is not wasted and conenction is fast
encrypted, so that no person in between can use the transmitted data
and it should be an open and flexible standard, so that there could be more connections to other services (with my server in the middle of this star connection and no connection in between all providers) and that I don't have to pay a fee ;).
the example in the title is something I think about, because when you have a twitter account you somehow connect facebook to your account and facebook can show your twitterfeeds on your account.
but I don't want a provider to gather a lot of information beside the really important one that the user want to transmit. so I don't want the provide to get the username of my user and I don't really need to know how my user is named there.
It's like a post-office box. you just have to know where to put your letter, but you don't need to know the box owner's name.
and I don't want the mail-carrier to know what he is delivering, so it should be encrypted.
every clue how to do that would be fine, because I don't know anything about this :)
thank you in advance, Andreas
What you need is OAuth, check out the "Getting Started" guide to learn all about it
And the wiki entry