Which database is better to use for rest api [closed] - java

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm creating rest service for mobile app in java. For storage process which is best suitable for real time storage (Hibernate , JPA & JDBC).
Your valuable answers will put me on right track.

Basically ORM technologies like Hibernate, JPA etc., provides greater flexibility to the programmer in maintaining the code say for example, direct mapping to java POJO's, object locking mechanisms, Id generation and lot more with little cost of performance. If your application needs light weight calls (taking into consideration of concurrency, ofcourse underling database will provide, small relation etc) you could opt JDBC.
Thanks,
JK

Related

Best way of naming database according location [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am building an app that contains details of users in a database and those details are accessible to all other users too. I want to make it easy for users to find others database. So i decided to name the users database according to locations, so that they always see users nearby to them by default. They can view any other user by searching the location.
But what is the best way for grouping the database. A few possibilities that i thought is grouping database according to district, taluk or panchayath. Can you share a better idea? Thanks in Advance to the great souls!
Splitting your data in regional databases would be a good usecase when all actions would be selfcontained in a certain region. Very often this is not the case, so in the modern database design distributed databases win over sharded ones. The sharded model becomes a big hurdle when your usecases change or grow.
Geospatial Indexing comes to the rescue and makes it much easier to implement features on user proximity.

Database for a small java application [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I am relatively new to programming and in need of help.
I am trying to design/develop small desktop app for a family hotel.
Do I need a database to write/read from or there is another solution to this problem.
There aren't massive amounts of information to be stored ,because of the nature of the application.
What would be a good way to approach the problem ?
Any help will be appreciated!
Sqlite is the go to solution for simple usage
You can read/write your data to files. The files can be simple text, JSON or XML. There are many Java libraries that can interact with files on disc.
Depending on your requirements you can also have an in-memory database - for example HSQL or SQLite

How would I go about storing data with this kind of app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I have this idea for an app (mainly for personal use) to write down homework or upcoming project due dates and save them, and maybe add alarms to help me not procrastinate.
My question is: how would I store assignments? I never actually made an app that stores user input so I don't know where to start. From what I know I can either start up an SQL db or use Shared Preferences which I'm not familiar with both. So my question is what's the advantages and disadvantages of either?
If you are using bulk amount of data and you want to store it in ordered way then you can use SQL db. In SQL db you can also do indexing.
In case of small data storage you can use shared preferences.
In your case you should definitely use db.
Check the official documentation, you will get more clear idea :
http://developer.android.com/guide/topics/data/data-storage.html

How to save data of a small prog? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am building a small java application that shall run locally on a system. The data I intend to input is little stuff like my daily expenses, a couple of contacts I have, and a couple of notes of things I want to remember.
To save the data for this matter I think installing a database like MySQL or Oracle would be an overkill. In my past projects I always used those databases.
How would I have to manage the data of a small program? Are there any ready to use solutions in the java world? Maybe with the possibility to use it together with JPA?
You should look into Apache Derby:
http://db.apache.org/derby/
or HyperSQL:
http://hsqldb.org/
They're both lightweight database engines that you can fire up on application start-up, ideal for smaller projects. They also both have Hibernate dialects for JPA.

Which throttling implementation to use? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm implementing a throttling mechanism to limit the amount of web requests sent to a server. If there are too many submissions for a request then the extra requests are queued until the resource becomes available. There seems to be many throttling options and im not sure which one to choose.
So far im tempted to implement the token bucket algorithm as described at http://en.wikipedia.org/wiki/Token_bucket . There is Python code associated with this at What's a good rate limiting algorithm? so should be straightforward to implement a Java/Scala version.
Guava has what looks like a nice implementation described at http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/util/concurrent/RateLimiter.html
Also Akka seems to implement throttling using the Throttler trait described at : http://doc.akka.io/api/akka/2.1.2/index.html#akka.contrib.throttle.Throttler
I would like to implement my own but don't like re-inventing the wheel if there is a solution already available. Are there advantages to using the token bucket algorithm over using the options already provided by Guava & Scala ?
Out of the three options which is most recommended ?

Categories

Resources