Google Groups Home
Help | Sign in
stock brocking web application
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  22 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
inquisitive  
View profile
 More options Sep 5, 9:30 pm
Newsgroups: comp.lang.java.programmer
From: inquisitive <lavni...@gmail.com>
Date: Fri, 5 Sep 2008 04:30:09 -0700 (PDT)
Local: Fri, Sep 5 2008 9:30 pm
Subject: stock brocking web application
Hi
This is more of a general design ques rather than Java ques

Presently I need to make a web application similar to stock broking
application. i.e. when a user logs in .. he will be seeing a set of 50
records ( stocks ) which are read from a db and shown on ui. Now there
is a perl utility in backend that is changing these 50 records
( stocks ) based on some business logic I want to make a UI thats
"real time" some kind of observer pattern for each record ( stock ).

As soon as the record ( stock value ) changes it should be updated on
ui. I dont want to go with the old way of "pooling" thats dont want to
refresh the whole screen after 5 seconds or so ... One more thing i
have to use java ( jsp , jsf , applets etc  )  ... I am looking
forward from suggestion from you guys how can i make such an
application .. high level architecture ...

Looking forward for a healthy discussion to learn from your
experience.
Regards
Lavnish


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GArlington  
View profile
 More options Sep 5, 10:06 pm
Newsgroups: comp.lang.java.programmer
From: GArlington <garling...@tiscali.co.uk>
Date: Fri, 5 Sep 2008 05:06:29 -0700 (PDT)
Local: Fri, Sep 5 2008 10:06 pm
Subject: Re: stock brocking web application
On Sep 5, 12:30 pm, inquisitive <lavni...@gmail.com> wrote:

Real-time == sockets, but it depends on server load - number of
simultaneous clients, maybe NIO sockets...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GArlington  
View profile
 More options Sep 5, 10:07 pm
Newsgroups: comp.lang.java.programmer
From: GArlington <garling...@tiscali.co.uk>
Date: Fri, 5 Sep 2008 05:07:33 -0700 (PDT)
Local: Fri, Sep 5 2008 10:07 pm
Subject: Re: stock brocking web application
On Sep 5, 1:06 pm, GArlington <garling...@tiscali.co.uk> wrote:

Did not finish that: OR UDP...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marlow.and...@googlemail.com  
View profile
 More options Sep 5, 10:17 pm
Newsgroups: comp.lang.java.programmer
From: marlow.and...@googlemail.com
Date: Fri, 5 Sep 2008 05:17:16 -0700 (PDT)
Local: Fri, Sep 5 2008 10:17 pm
Subject: Re: stock brocking web application

GArlington wrote:
> On Sep 5, 1:06 pm, GArlington <garling...@tiscali.co.uk> wrote:
> > On Sep 5, 12:30 pm, inquisitive <lavni...@gmail.com> wrote:
> > > Hi
> > > This is more of a general design ques rather than Java ques
> > Real-time == sockets, but it depends on server load - number of
> > simultaneous clients, maybe NIO sockets...

> Did not finish that: OR UDP...

Real apps use Tibco Rendevous :-)

-Andrew Marlow


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
inquisitive  
View profile
 More options Sep 5, 10:32 pm
Newsgroups: comp.lang.java.programmer
From: inquisitive <lavni...@gmail.com>
Date: Fri, 5 Sep 2008 05:32:53 -0700 (PDT)
Local: Fri, Sep 5 2008 10:32 pm
Subject: Re: stock brocking web application
Hi Guys
Thanks for the quick response ... @Andrew I cant use Tibco for sure
for this , wont get managerial approval for using it.
Lets break up the problem
I have a table in db lets stay STOCK_QUOTES having two cols STOCK and
VALUE having three records stock1 , $1 ; stock2 , $2 ; stock3 , $3...
now through a perl utility stock1 value is updated to $1.5 .... NOw i
want to show the new value on this UI ...
so the ques reduces to .. how does my UIBean get this new value ..
UIBean will be notified by JDBC ... so ques reduces to how does JDBC
gets this new value ...

after the above two ques are solved we can think how the UIBean will
update the view layer ( as it will be dependent on the technology used
on View layer ... JSP , ajax , JSF , Appleets etc ) BTW i have the
freedom of using any of them

PLs let me know if i am thinking in right direction ??
@GArlington  .. how do i use sockets to get the message to UIBean ?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
inquisitive  
View profile
 More options Sep 5, 10:35 pm
Newsgroups: comp.lang.java.programmer
From: inquisitive <lavni...@gmail.com>
Date: Fri, 5 Sep 2008 05:35:01 -0700 (PDT)
Local: Fri, Sep 5 2008 10:35 pm
Subject: Re: stock brocking web application
I know that there are types of resulset ... updatabale .. but how do i
get that info one / two records are change .. and how do i send the
message to UIBean .. and the UI

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick May  
View profile
 More options Sep 5, 11:01 pm
Newsgroups: comp.lang.java.programmer
From: Patrick May <p...@spe.com>
Date: Fri, 05 Sep 2008 09:01:47 -0400
Local: Fri, Sep 5 2008 11:01 pm
Subject: Re: stock brocking web application

inquisitive <lavni...@gmail.com> writes:
> Lets break up the problem
> I have a table in db lets stay STOCK_QUOTES having two cols STOCK
> and VALUE having three records stock1 , $1 ; stock2 , $2 ; stock3 ,
> $3...  now through a perl utility stock1 value is updated to $1.5
> .... NOw i want to show the new value on this UI ...  so the ques
> reduces to .. how does my UIBean get this new value ..  UIBean will
> be notified by JDBC ... so ques reduces to how does JDBC gets this
> new value ...

     Your database may have the capability of registering Java
triggers that are called whenever a value is changed.  Unless your
application is really low volume, though, you won't want to use that
approach.

     What you need to do is get the database out of the critical path
of the transaction.  The system of record should be an in-memory data
grid of some sort.  If you use a JavaSpace, for example, you can
notify the presentation layer when a change occurs and update the
database asynchronously (and possibly in batch mode).  The advantage
of a space or IMDG approach over queues or pub/sub is that the
information remains available for as long as necessary, so not all
clients have to be up and running simultaneously.

> after the above two ques are solved we can think how the UIBean will
> update the view layer ( as it will be dependent on the technology
> used on View layer ... JSP , ajax , JSF , Appleets etc ) BTW i have
> the freedom of using any of them

     Ajax will probably be your most lightweight option, but you may
get a better UI from applets or even something like Adobe Flex.

Regards,

Patrick

------------------------------------------------------------------------
S P Engineering, Inc.  | Large scale, mission-critical, distributed OO
                       | systems design and implementation.
          p...@spe.com  | (C++, Java, Common Lisp, Jini, middleware, SOA)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GArlington  
View profile
 More options Sep 5, 11:51 pm
Newsgroups: comp.lang.java.programmer
From: GArlington <garling...@tiscali.co.uk>
Date: Fri, 5 Sep 2008 06:51:13 -0700 (PDT)
Local: Fri, Sep 5 2008 11:51 pm
Subject: Re: stock brocking web application
On Sep 5, 1:17 pm, marlow.and...@googlemail.com wrote:

> GArlington wrote:
> > On Sep 5, 1:06 pm, GArlington <garling...@tiscali.co.uk> wrote:
> > > On Sep 5, 12:30 pm, inquisitive <lavni...@gmail.com> wrote:
> > > > Hi
> > > > This is more of a general design ques rather than Java ques
> > > Real-time == sockets, but it depends on server load - number of
> > > simultaneous clients, maybe NIO sockets...

> > Did not finish that: OR UDP...

> Real apps use Tibco Rendevous :-)

> -Andrew Marlow

By the look of it Tibco Rendevous IS using UDP multicast...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
inquisitive  
View profile
 More options Sep 5, 11:52 pm
Newsgroups: comp.lang.java.programmer
From: inquisitive <lavni...@gmail.com>
Date: Fri, 5 Sep 2008 06:52:30 -0700 (PDT)
Local: Fri, Sep 5 2008 11:52 pm
Subject: Re: stock brocking web application
Thanks for the response Patrick

On Sep 5, 6:01 pm, Patrick May <p...@spe.com> wrote:

>      Your database may have the capability of registering Java
> triggers that are called whenever a value is changed.  Unless your
> application is really low volume, though, you won't want to use that
> approach.

My application will be of high volume or may be reasonable volume...

>      What you need to do is get the database out of the critical path
> of the transaction.  The system of record should be an in-memory data
> grid of some sort.  If you use a JavaSpace, for example, you can
> notify the presentation layer when a change occurs and update the
> database asynchronously (and possibly in batch mode).  The advantage
> of a space or IMDG approach over queues or pub/sub is that the
> information remains available for as long as necessary, so not all
> clients have to be up and running simultaneously.

Seems logical soln should be "in-memory data grid of some sort". I
dont know JavaSpace probably now is the time to have a look. Mine will
be a readonly UI ... kind of monitoring appl ... so i just need to
send the UI a col has changed... dont need to update db as user cant
modify the records from UI ..

>      Ajax will probably be your most lightweight option, but you may
> get a better UI from applets or even something like Adobe Flex.

yeah which UI layer to use i have left it as of now ... will come to
it later .. but ideally it should have the capability of updating each
row in a table ( or treetable ) rather than updating whole table...
may best is to make all three and benchmark them ..

> Regards,

> Patrick

Thank you :)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Segall  
View profile
 More options Sep 5, 11:51 pm
Newsgroups: comp.lang.java.programmer
From: David Segall <da...@address.invalid>
Date: Fri, 05 Sep 2008 13:51:15 GMT
Local: Fri, Sep 5 2008 11:51 pm
Subject: Re: stock brocking web application

inquisitive <lavni...@gmail.com> wrote:
>Hi Guys
>Thanks for the quick response ... @Andrew I cant use Tibco for sure
>for this , wont get managerial approval for using it.

Then have a look at Elvin <http://www.elvin.org/>. There are some open
source implementations although the major developers are working on a
commercial application using the protocol.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick May  
View profile
 More options Sep 6, 12:26 am
Newsgroups: comp.lang.java.programmer
From: Patrick May <p...@spe.com>
Date: Fri, 05 Sep 2008 10:26:28 -0400
Local: Sat, Sep 6 2008 12:26 am
Subject: Re: stock brocking web application

     That makes it easier, although you still won't want to drive the
updates from database triggers if the load is even minimal.  The
number of hops required and the disk access will be prohibitive.

Regards,

Patrick

------------------------------------------------------------------------
S P Engineering, Inc.  | Large scale, mission-critical, distributed OO
                       | systems design and implementation.
          p...@spe.com  | (C++, Java, Common Lisp, Jini, middleware, SOA)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
inquisitive  
View profile
 More options Sep 6, 2:35 am
Newsgroups: comp.lang.java.programmer
From: inquisitive <lavni...@gmail.com>
Date: Fri, 5 Sep 2008 09:35:48 -0700 (PDT)
Local: Sat, Sep 6 2008 2:35 am
Subject: Re: stock brocking web application