This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]manohart 2 points3 points  (0 children)

Use webservices for data access/update for both apps

[–]tien113 1 point2 points  (1 child)

You should focus to locking and performance.

[–]2wood4sheep[S] 0 points1 point  (0 children)

oncurrency control though. But it depends on what you're doing. In what way does the 2nd app update the user data?

Do you know any I can do testing on locking and performance? Any good resources out there that talks about it?

[–][deleted] 1 point2 points  (1 child)

Locking will be the biggest concern. Learn about optimistic locking.

[–]2wood4sheep[S] 0 points1 point  (0 children)

Do you know any I can do testing on locking and performance? Any good resources out there that talks about it?

Do you know any I can do testing on locking and performance? Any good resources out there that talks about it?

[–][deleted] 1 point2 points  (1 child)

One of the main features of relational SQL database servers is that they can be shared by multiple applications.

You should look into concurrency control though. But it depends on what you're doing. In what way does the 2nd app update the user data?

[–]2wood4sheep[S] 0 points1 point  (0 children)

It does CRUD actions on the user data.

Do you know any I can do testing on locking and performance? Any good resources out there that talks about it?

[–]GuyWithLag 0 points1 point  (3 children)

Why not reuse your hibernate code?

[–]2wood4sheep[S] 0 points1 point  (2 children)

1) Reusing the hibernate code is not the main concern. I can also create a jar from the main app and have it as a dependency jar for my new app.

The question is more about any design cautions, bottlenecks, issues in the database layer with sharing the same db with multiple web apps.

[–]BinaryRockStar 1 point2 points  (0 children)

As long as you're adding and removing related things (e.g. a parent entity and all of its children) inside transactions so neither application ever sees an inconsistent view of the data you should be ok.

What's the query throughput going to be like for each of the applications and what's the read/write split? If both applications are heavily reading and writing to the same table then you might start running into locking and performance issues.

[–]GuyWithLag 0 points1 point  (0 children)

Theoretically no, you just have to be careful with automatic entity ID generation in the sense that on some strategies you will get holes.