• Post Reply Bookmark Topic Watch Topic
  • New Topic

Dashboard using Webservices  RSS feed

 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am planning to create a Dashboard which will a single screen showing 15 different monitors. Each of these monitors are getting refresh in every 10 mins. Now, I want to establish a single DB connection and want to fetch the results from DB.

How can I achieve this from Webservice?

I am new to Webservice and having very small knowledge of Webservice ( SOAP and REST)

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are "the results from DB" - how are they related to the various WS?
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:What are "the results from DB" - how are they related to the various WS?


Hi Ulf,

The webservices will return the Transaction details i.e. basically transaction count of different Systems. And then the same will be displayed in Webpage. In order to get the Transaction details, I will hit DB to get the Count and display this Live details in form of Graph/Chart.
 
Amir Keibi
Ranch Hand
Posts: 49
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, this is a very generic question.

First, you need to ask yourself if you need a web service at all. If so, then you'll need a middle tier (EJBs perhaps) to retrieve data from your database into a bunch of data entities (some use JPA). You can add a data layer between your middle tier and database if necessary. The web service then consumes the middle tier to retrieve and pass the data entities to the web pages.

I don't know if this answer your question. If you specifically explain the problem, then I might be a better help. But if you just don't know how to create web services, then I'm afraid a good book is your best friend.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd say if you want to visualize 15 monitors, you would make 15 calls to various WS (from within the web page, using something like jQuery), and each wold return just the results to be shown in one of them.

Why do you want to make just a single DB call? We don't know the structure of the DB, but generally I'd say that's not such a good idea if the data of the 15 monitors is not exactly the same for all of them.
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:I'd say if you want to visualize 15 monitors, you would make 15 calls to various WS (from within the web page, using something like jQuery), and each wold return just the results to be shown in one of them.

Why do you want to make just a single DB call? We don't know the structure of the DB, but generally I'd say that's not such a good idea if the data of the 15 monitors is not exactly the same for all of them.


Sorry Gentlemen for Delayed Response..!

Ulf , you are right.. we can have 15 different DB connections for all WebService. But I want to write something generic in order to only get the Count from the Database. The database/schema is same only difference is the tables which will give the count from each of those tables.

Well, whatever is the design ( 15 DB connections or one DB connection with 15 streams) , Could you please suggest what can be the best way to achieve?

Thanks in Advance..!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, whatever is the design ( 15 DB connections or one DB connection with 15 streams) , Could you please suggest what can be the best way to achieve?


It is not clear to me exactly where you are stuck, but here is my advice.

Tackle the "dashboard" display code separately using fake data - for example you might have the servlet read a text file giving the data to be shown in each "monitor" area.
As an abstraction you could name each monitor area and have each fake data line start with : monitor name, display text. (Get your boss to sign off on this display!)

As a separate problem write a test program that reads data from the desired web service/database/whatever it is, and just logs it. I would probably use XML to define each data source, whatever it is, using the monitor name to associate the data with the display.

ONLY when you are sure you can: 1. display realistic data in separate monitor areas -AND- 2. reliably read data from various sources.
THEN combine for a finished product.

Bill
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote: As an abstraction you could name each monitor area and have each fake data line start with : monitor name, display text. (Get your boss to sign off on this display!)


Many Thanks Bill for the helpful Suggestion, I have already got the sign-off from my Boss .. !
I want to use Webservice to get it done, where each monitor would be calling more specific Webservice. Could you please suggest how can achieve it and which type of Webservice ( SOAP or RESTful) would be more suited in this scenario ?

I am very new to Webservice so I also want to get some insight of Webservice in this design.

Please suggest... Thanks in Advance..!

Ashish
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you want to understand web services, especially the difference between SOAP and RESTful designs, the ranch web services FAQ is full of useful articles.

I was under the impression that you had specific web services in mind - in which case the provider of the service can tell you either the SOAP interface (with WSDL file) or give example code and discussion for RESTful services.

There will be no problem with using either SOAP or a RESTful services or a mixture but each "monitor' will require service specific information.

Bill
 
Fidel Edwards
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:
If you want to understand web services, especially the difference between SOAP and RESTful designs, the ranch web services FAQ is full of useful articles.



Thanks Bill,

I have gone through with all these but think like these are making myself more confusing. I have ran through some small examples from JAX-RS and SOAP both. But again confuse which would have better learning curve ( for novice) and why?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!