Best Practices for Scalable File Storage [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 7 years ago.
Improve this question
Say we are writing applications with Play Framework, or Spring for instance, and we want to use a standard way to manage and store binary file uploads using an API (object storage), as opposed to managing a file system yourself. In a similar way to using Amazon cloud storage, but without locking into an external provider.
Imagine we would also like to be able start by running this service on the same server as the application you are developing, until growth requires it you to move the file storage to it's own server (or cluster) and your application itself in it's own cluster. If we start off with a cluster-ready service then surely we can scale up quickly.
Do we continue to manage the file system ourselves while running at a small scale, or do we adopt something else?
Is this where we need to look at running a local Hadoop HDFS instance for example, this way we wouldn't need to rewrite our file upload and handling in our application, and could scale-out the file management system into a cluster when the need arises. It would be great if this functionality was provided as a service with a common API, such as running H2DB in-memory for integration testing.
Or are Hadoop HDFS, OpenStack Swift or Ceph overkill when we're still making our simple prototype application?
I'm sure that I'm missing something - but struggling to find the solution. Managing a file system by hand feels dirty and wouldn't allow me to push applications to any PaaS provider without rewriting. Again, I think there should also be a local solution rather than always integrating with Amazon and the likes.
Any thoughts?

Related

Moving application to the cloud, Tomcat, Java, MySQL - Azure/AWS options LAMP or services? [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 need to bring over a system from locally hosted to cloud services. Right now the system runs on Tomcat 6, MySQL 5.1 and JDK 8.xx running on Windows Server 2012
What is the best approach to move this forward - right now it is running on Windows Server, for licensing costs, etc it seems cheaper to move to Linux as the OS and spin up a LAMP server or use AWS or Azure services for a serverless solution if I understand things correctly. I understand there are also solutions like Bitnami with pre-built environments.
This is far from my area of expertise so I'm looking for advice on the current preferred solutions for this kind of setup. Not married to Azure, AWS, any particular solution. Wondering what needs to happen code wise too so we can take the necessary steps to move to new infrastructure.
Any advice, pitfalls, solutions would be welcome just to find some direction. Sorry if this seems vague can offer up more info as needed.
One good solution is to move towards containerized solution. Both Azure and AWS offer managed Kubernetes service. Moving to container based solution will also have added benefit in your case that you can build your own container even with older versions of your existing apps or pick base image from the plethora of public images (e.g. for Tomcat https://hub.docker.com/_/tomcat). So it will be quicker migration with lift and shift approach.
For more details about container service offering in Azure, refer https://learn.microsoft.com/en-us/azure/containers/

System architecture : design considerations. Java vs Django vs RoR [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 6 years ago.
Improve this question
I'd like to designing new web application with few requirements and considering which language/framework I should choose.
Requirements:
Web based solution (web UI and backed)
Fast deployment and setup <- by this I mean just run by single command,
no configuration needed for total beginner. Similar to
Jenkins
java -jar jenkins.war
or Gerrit.
Some kind of que to run tasks asynchronously.
No code protection
Due to the fact that I want to be simple to run and deploy (without initial configuration needed) I am considering using Java EE/Spring framework.
Initially I was considering Django or RoR since deploy is pretty easy and development is way faster than Java but those
frameworks need some kind of scheduling framework like Celery + some kind of broker so additional configuration is needed.
I am not limited to any language,(besides PHP since I just do not like it :P)
If any of you have any thoughts about my design and want to share let's do it.
Thanks a lot for any kind of question/ answers.
It is a very open question and there is really no right answer for it. Rails is really great framework for web development, there are gems basically for everything but deployment is not as straightforward as java -jar and also it does not shine that much when you have SPA on the frontend.
If you're planning to build Single Page Application with one of the modern frameworks you may want to consider Spring Boot. Main benefits:
very ops friendly (java -jar), metrics, health checks
whole application config just in one file
great MVC framework for exposing REST endpoints
implementing tasks running in background is trivial.
few programming languages to choose from: Java, Groovy, Kotlin.
Grails 3 looks also promising but since I haven't used it yet I can only suggest having a look.

Image upload in a clustered tomcat, database or file system [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 9 years ago.
Improve this question
I had a requirement for uploading Images Java web project with clustered tomcats.
The issue I'm facing is weather to upload images on the file system or the database.
Since with file system there is an issue with integrity(inconsistent images across the clustered nodes) but performance is faster.
Had got the solution of syncing files between two node through a hybrid approach.
Did instantaneous sync between each node by making a Rest post of the file by converting it to a base 64 string and posting as XML, to the other nodes in cluster in a separate thread.
As a consequence of this many scenarios arose when the design would fail. (One of them being that one node is down while upload happens on the other node.). Then came up with the solution of keep DB as a Master copy for sync on server start-up and use secondary storage on other times.
Still the solution seemed too complex so we resorted to a shared mounted drive, as suggested by Andrey Chaschev and venergiac. It worked like a charm. guess the only plus point of this RnD was I got pretty familiar with what Rest can and can't do and Jgroups for messaging between cluster aware tomcats.
A distributed file system might be what you need. In one of my previous projects I used GlusterFS and the experience was quite smooth - the DFS is seen as a folder which is shared between hosts to which any of the hosts may write or read. It promises to be fault tolerant. Googling for a modern solution gives out XtreemFS.
From what I read about DFS vs FS vs NFS, DFS are much faster and easier to configure than NFS and are a bit slower than direct file copying via network.
Firstly,
I save the files on the database (Oracle);
however, you could use a shared directory between the nodes of the cluster (NFS or CIFS).

DMS (Document Management System) / File Repository / File Manager under Java EE [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 7 years ago.
Improve this question
I need to create a very simple DMS (Document Management System) / File Repository / file manager or whatever we might call it under Java EE.
It should permit the user to create folders and upload files into it and the folder/files information should be stored inside the database for checking which user created what (in this sense a simple file-manager which only lets one browse directories on the server's disk is not enough).
To be more explicit here's what it should be more or less:
So far I searched for canned solutions which I could use however I only found TinyDMS (http://sourceforge.net/projects/tinydms/) which is very good (picture above is a screenshot of it in action), it uses jackrabbit for file search however needs a lot of Spring framework dependencies and is a hell to be compiled (didn't succeed yet).
Then there's OpenKM and LogicalDoc but those are really complex programs which don't fit well to be included into a third party application.
Isn't there anything I can start with?
use jackrabbit DMS java base.
http://jackrabbit.apache.org/
If you don´t want to use Alfresco, Nuxeo, or other DMS, maybe you should develop your own "Light (DMS)". For that you can start with the repository; for this you could try Apache Jackrabbit or Modeshape as the lower level to manage data, files, versionong, deletion, etc. Personally, I´m using Modeshape for my graduate project beacuse of it´s documentation and ease of implementation. Then I use JAAS to manage users and its permissions for each file or folder.

Setup ITHit WebDAV server with MySQL [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have downloaded the ITHit WebDAV server (java version) and wanted to know if there is any examples/documentation on implementing this with MySQL (both examples are for Oracle) database or for simple file system based storage.
Since I'm just getting started ANY additional documentation or examples would be greatly appreciated.
We have MySql sample and use it internally for testing purposes. Please write us and we will send it to you. We do not publish it because it duplicates most of the Oracle sample code.
Currently there is no any examples other then with Oracle provided with IT Hit WebDAV Server Library for Java. We are working to create more samples.
The main reason why we do not create a sample with file system is that to store file locks we need to create external files. This may clatter your storage.
In case of the file system sample for WebDAV Server Engine for .Net we store locks in NTFS alternate file streams, so there is no any extra files are created in file system. With Java is more difficult, and probably goes outside of the idea of the 'Sample'.

Categories

Resources