Server detection of client crash

已查看 146 次
跳至第一个未读帖子

mmorckos

未读,
2012年4月27日 01:49:402012/4/27
收件人 Google Web Toolkit
Hello,

I'm intending to develop a web-based frontend UI for a control system
in a research lab. For safety purposes, it's vital that when a client
crashes, the server is notified immediately and dispatches a stop
signal to all connected machinery.

I'm new to gwt and would like to know if there is a way to know
whenever a client crashes on the server side, specifically inside a
"RemoteServiceServlet".

Regards,
Michael

Alfredo Quiroga-Villamil

未读,
2012年4月27日 10:47:002012/4/27
收件人 google-we...@googlegroups.com
Can you please define or explain what you mean by "whenever a client crashes"?

Thank you in advance,

Alfredo
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>



--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton

Joseph Lust

未读,
2012年4月27日 12:34:472012/4/27
收件人 google-we...@googlegroups.com
I would not recommend operating safety critical machinery with a JS web app. An embedded system written in Ada would be better.

Joe

mmorckos

未读,
2012年4月27日 16:44:032012/4/27
收件人 Google Web Toolkit
What I meant by "crash" is that the client doesn't "cleanly". For
instance, the user can simply close the web-page, or the client's
machine can lose connection to the server. I'm asking if there is a
way that the server can detect that instantly (some sort of a
heartbeat ping between the client and the server, unlike a session
timeout).

On Apr 27, 10:47 am, Alfredo Quiroga-Villamil <laww...@gmail.com>
wrote:
> Can you please define or explain what you mean by "whenever a client crashes"?
>
> Thank you in advance,
>
> Alfredo
>
>
>
>
>
>
>
>
>
> On Fri, Apr 27, 2012 at 1:49 AM,mmorckos<mikey.morc...@gmail.com> wrote:
> > Hello,
>
> > I'm intending to develop a web-based frontend UI for a control system
> > in a research lab. For safety purposes, it's vital that when a client
> > crashes, the server is notified immediately and dispatches a stop
> > signal to all connected machinery.
>
> > I'm new to gwt and would like to know if there is a way to know
> > whenever a client crashes on the server side, specifically inside a
> > "RemoteServiceServlet".
>
> >  Regards,
> > Michael
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.

Alfredo Quiroga-Villamil

未读,
2012年4月27日 16:59:072012/4/27
收件人 google-we...@googlegroups.com
Thanks. I think Joseph said it before and I agree with him. If it's
something of that nature, I would likely try to stay from web stuff.
However, that doesn't mean is not possible or there are no ways to
ensure what you want.

I recently had the chance to speak with a few guys at RedHat about a
project they have been working on based on GWT. I've been meaning to
let people know about it because I was really impressed by a couple of
things I saw. One of them can truly help you and make your requirement
easier or a lot easier to implement.

http://www.jboss.org/errai

A few things:

a) You don't need jboss to use it.
b) Take special attention to CDI (crazy cool and useful).
c) They've done something really interesting where you truly have a
transparent web/server application, blurring completely the lines
between server and UI. Via an annotation you have Server Push. Their
Dependency Injection I thought was also nicer than GIN for the UI.
Although I use GIN and love it!

So what you could do, assuming that you truly want to keep this web
based is to have the server contacting the UI every x amount of
seconds. If no response is received from the UI, then you know that
something is not right. That would be better I think than polling the
server.

Again, this could be done without errai, but take a look at it if you
get a chance.

Best regards,

Alfredo
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

mmorckos

未读,
2012年5月1日 22:54:112012/5/1
收件人 Google Web Toolkit
Thanks for the prompt reply. I've been experimenting with gwt for a
little while and due to time constrains I'd rather not try
other tools, but thanks for the suggestion.

I have another question (excuse my little experience with web
application), I'd like to know how the a Servlet on the server-side
can efficiently keep track of all connected clients since in my
application, for each connected client the Servlet will instantiate a
regular Java object with its own state for each client. Basically each
client will interact with its own object through the Servlet.

I know this is a bit of an overhead, but as I mentioned before I'm
building a web-tier for a back-end platform that's not web oriented.

Regards,
Michael

On Apr 27, 4:59 pm, Alfredo Quiroga-Villamil <laww...@gmail.com>
wrote:

Alfredo Quiroga-Villamil

未读,
2012年5月3日 21:28:352012/5/3
收件人 google-we...@googlegroups.com
Hi Michael:

I apologize for the delayed response.

If you use GWT and say GWT-RPC for example, this will all be handled
for you. Since each client will get its own session.

The real challenge is going to be if my memory serves me right
according to your initial requirements knowing when your client
stopped working for whatever reason, be it that something went south
or as you previously mentioned the user simply closed the browser.
This is part of the reason why I recommended errai so you would have a
nice easy-to-use server push implementation. There are others or you
can have your own and rely on Jetty continuations for instance.

Again, sorry for the delayed response, had a few emails piled up and
missed this one.

Alfredo
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

mmorckos

未读,
2012年5月5日 23:58:542012/5/5
收件人 Google Web Toolkit
Hi Alfredo,

Thanks for the reply, and no worriea about the delay. Actually, I
experimented with a couple of comet packages such as gwt-comet and gwt-
websocket, they appeared to be buggy and not quite matching my needs.
I certainly have no time to come up with my own mechanism so I guess
I'll give Errai a try.

I'm wondering if you can point me to to quick start demos and
tutorials. I hope it has support for eclipse.

Regards,
Michael

chris

未读,
2012年5月7日 08:40:122012/5/7
收件人 google-we...@googlegroups.com
Check out  http://www.jboss.org/errai (hope I'm not stating the obvious, as it's pretty easy to locate!)

Errai in less than 3 minutes is just a click away.

It's gwt integration is very straight forward.

I've not done your specific use case, but I could imagine clients registering themselves with the server with a unique message subject, and the server pinging the individual clients, checking they were still operating.
> >> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> >> --
> >> >> Alfredo Quiroga-Villamil
>
> >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> --
> >> Alfredo Quiroga-Villamil
>
> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Alfredo Quiroga-Villamil
>
> AOL/Yahoo/Gmail/MSN IM:  lawwton
> >> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> >> --
> >> >> Alfredo Quiroga-Villamil
>
> >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> --
> >> Alfredo Quiroga-Villamil
>
> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Alfredo Quiroga-Villamil
>
> AOL/Yahoo/Gmail/MSN IM:  lawwton
> >> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> >> --
> >> >> Alfredo Quiroga-Villamil
>
> >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> --
> >> Alfredo Quiroga-Villamil
>
> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Alfredo Quiroga-Villamil
>
> AOL/Yahoo/Gmail/MSN IM:  lawwton
> >> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> >> --
> >> >> Alfredo Quiroga-Villamil
>
> >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> --
> >> Alfredo Quiroga-Villamil
>
> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Alfredo Quiroga-Villamil
>
> AOL/Yahoo/Gmail/MSN IM:  lawwton
> >> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> >> --
> >> >> Alfredo Quiroga-Villamil
>
> >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> >> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> >> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
> >> > For more options, visit this group athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> --
> >> Alfredo Quiroga-Villamil
>
> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.

Alfredo Quiroga-Villamil

未读,
2012年5月7日 10:01:012012/5/7
收件人 google-we...@googlegroups.com
Michael:

As Chris pointed out the documentation is actually quite good and for
the requirements you have I think this is as good as it gets.

By the way, I have no affiliation to RedHat or the errai project. I
just happen to know their Product Manager and had a chance to speak to
them about it as well as see a demo given to us by the errai Dev lead.
Since then, we've tried a few things here with the project and it
offers a few things that would be nice for sure to have at some point
in GWT itself.

From their lead Dev, see below:

=============================================
"Here are some videos demonstrating Errai's performance: The first one
shows you the actual load on the Java server process (< 2% CPU
broadcasting messages). The second one shows a sustained rate of 1000
messages per second with simple object marshaling. Both of these are
running in production mode. Not devmode."

http://www.youtube.com/watch?v=ovnclosdzLI&feature=relmfu

http://www.youtube.com/watch?v=K5_U2ziucr8
=============================================

Let us know how it goes.

Best regards,

Alfredo
>> > >> >> > google-we...@googlegroups.com.
>> > >> >> > To unsubscribe from this group, send email to
>> > >> >> > google-web-tool...@googlegroups.com.
>> > >> >> > For more options, visit this group
>> > >> >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> >> --
>> > >> >> Alfredo Quiroga-Villamil
>> >
>> > >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > >> > --
>> > >> > You received this message because you are subscribed to the Google
>> > >> > Groups "Google Web Toolkit" group.
>> > >> > To post to this group, send email to
>> > >> > google-we...@googlegroups.com.
>> > >> > To unsubscribe from this group, send email to
>> > >> > google-web-tool...@googlegroups.com.
>> > >> > For more options, visit this group
>> > >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> --
>> > >> Alfredo Quiroga-Villamil
>> >
>> > >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Google Web Toolkit" group.
>> > > To post to this group, send email to
>> > > google-we...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > google-web-tool...@googlegroups.com.
>> > >> >> > google-we...@googlegroups.com.
>> > >> >> > To unsubscribe from this group, send email to
>> > >> >> > google-web-tool...@googlegroups.com.
>> > >> >> > For more options, visit this group
>> > >> >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> >> --
>> > >> >> Alfredo Quiroga-Villamil
>> >
>> > >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > >> > --
>> > >> > You received this message because you are subscribed to the Google
>> > >> > Groups "Google Web Toolkit" group.
>> > >> > To post to this group, send email to
>> > >> > google-we...@googlegroups.com.
>> > >> > To unsubscribe from this group, send email to
>> > >> > google-web-tool...@googlegroups.com.
>> > >> > For more options, visit this group
>> > >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> --
>> > >> Alfredo Quiroga-Villamil
>> >
>> > >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Google Web Toolkit" group.
>> > > To post to this group, send email to
>> > > google-we...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > google-web-tool...@googlegroups.com.
>> > >> >> > google-we...@googlegroups.com.
>> > >> >> > To unsubscribe from this group, send email to
>> > >> >> > google-web-tool...@googlegroups.com.
>> > >> >> > For more options, visit this group
>> > >> >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> >> --
>> > >> >> Alfredo Quiroga-Villamil
>> >
>> > >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > >> > --
>> > >> > You received this message because you are subscribed to the Google
>> > >> > Groups "Google Web Toolkit" group.
>> > >> > To post to this group, send email to
>> > >> > google-we...@googlegroups.com.
>> > >> > To unsubscribe from this group, send email to
>> > >> > google-web-tool...@googlegroups.com.
>> > >> > For more options, visit this group
>> > >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> --
>> > >> Alfredo Quiroga-Villamil
>> >
>> > >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Google Web Toolkit" group.
>> > > To post to this group, send email to
>> > > google-we...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > google-web-tool...@googlegroups.com.
>> > >> >> > google-we...@googlegroups.com.
>> > >> >> > To unsubscribe from this group, send email to
>> > >> >> > google-web-tool...@googlegroups.com.
>> > >> >> > For more options, visit this group
>> > >> >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> >> --
>> > >> >> Alfredo Quiroga-Villamil
>> >
>> > >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > >> > --
>> > >> > You received this message because you are subscribed to the Google
>> > >> > Groups "Google Web Toolkit" group.
>> > >> > To post to this group, send email to
>> > >> > google-we...@googlegroups.com.
>> > >> > To unsubscribe from this group, send email to
>> > >> > google-web-tool...@googlegroups.com.
>> > >> > For more options, visit this group
>> > >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> --
>> > >> Alfredo Quiroga-Villamil
>> >
>> > >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Google Web Toolkit" group.
>> > > To post to this group, send email to
>> > > google-we...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > google-web-tool...@googlegroups.com.
>> > >> >> > google-we...@googlegroups.com.
>> > >> >> > To unsubscribe from this group, send email to
>> > >> >> > google-web-tool...@googlegroups.com.
>> > >> >> > For more options, visit this group
>> > >> >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> >> --
>> > >> >> Alfredo Quiroga-Villamil
>> >
>> > >> >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > >> > --
>> > >> > You received this message because you are subscribed to the Google
>> > >> > Groups "Google Web Toolkit" group.
>> > >> > To post to this group, send email to
>> > >> > google-we...@googlegroups.com.
>> > >> > To unsubscribe from this group, send email to
>> > >> > google-web-tool...@googlegroups.com.
>> > >> > For more options, visit this group
>> > >> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > >> --
>> > >> Alfredo Quiroga-Villamil
>> >
>> > >> AOL/Yahoo/Gmail/MSN IM:  lawwton
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> > > Groups "Google Web Toolkit" group.
>> > > To post to this group, send email to
>> > > google-we...@googlegroups.com.
>> > > To unsubscribe from this group, send email to
>> > > google-web-tool...@googlegroups.com.
>> > > For more options, visit this group
>> > > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>> >
>> > --
>> > Alfredo Quiroga-Villamil
>> >
>> > AOL/Yahoo/Gmail/MSN IM:  lawwton
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/byVahXyo_QAJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.

Brandon Donnelson

未读,
2012年5月8日 17:22:532012/5/8
收件人 google-we...@googlegroups.com
I'd suggest a persistent connection with the client with a heartbeat. If you have a persistent connection and it drops stop the system.

Brandon
回复全部
回复作者
转发
0 个新帖子