• Post Reply Bookmark Topic Watch Topic
  • New Topic

webservice @Produce Json options question  RSS feed

 
Fernando Guerrero
Greenhorn
Posts: 23
Eclipse IDE Java Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I want to implement a Restful web service (using Jersey) where users can get data related with students.
For example get all the students that got student loans today.  The web service should save in a json the student name, address, school, etc.
If someone request that information today, the user may get only 2 or 3 different students, because today only those 2 or 3 student got student loans. But for example if you call the web service tomorrow , maybe you will get 700 different students.

What is the best way to send all that information, a json file , a list of json objects or any other way?
What should be inside my @Produce annotation ?

Thanks
 
Stephan van Hulst
Saloon Keeper
Posts: 7817
142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, I question the need to give out that kind of information on a large scale with high performance. What kind of use case have you envisioned for a client to make such a request?
 
Fernando Guerrero
Greenhorn
Posts: 23
Eclipse IDE Java Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the current system we have a java batch job that runs every day. The batch jobs generates a text file with all the students that receive students loans on the day we run the batch job. We send that file to a different department within the university, because they need to keep track on all those students.
The system was written loooong time ago, so we are trying to update the system. Breaking the system into smaller services and also we would like to use webservices.
Most of the time we only have no more than 5 students per day. Only like 4 times during the school year we have hundreds of students per day.  Instead to write and text file and send it to them, we want that they can get that information whenever they want, and if other university's departments needs that information they could call the web service too.

Is it a good approach to move from text file generate by a batch job to a web service?
Do you recommend web services only for small amount of data?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!