Need help to handle over million aggregates in FilesystemEventStore

I want to use FilesystemEventStore for event store in one of our
applications. But our application aggregates can increase to over
millions. I don't want to hold too many files into one folder. One
solution is to have a sub-folder structure to hold aggregates.

Is it Axon provide a easy way to store aggregates into different sub-
folders?

I looked at the 1.2 code, it looks to me that the easier way is to
create a class that extends SimpleEventFileResolver and assign it to
FileSystemEventStore (Our string aggregate id contains some kind of
hierarchy information) However the SimpleEventFileResolver is
internal assigned. Look like I need to replace the whole Axon
FilesystemEventStore for that purpose.

I welcome any suggestion to solve this problem.

Dave

Hi Dave,

the FileSystemEventStore has never been the no 1 priority. It seems, though, that it is being used more than I anticipated.

I am releasing 1.3 pretty soon (1 or 2 weeks). I can easily create a constructor that allows you to provide a custom “EventFileResolver”.

Cheers,

Allard

Thanks Allard.

When I start the project JPA event store is my choise. After doing
more analysis on the application it looks to me that file system
store is a better choice for its simplicity and performance. Our
application is an agent type of application. It handles commands
generating by ticket system to do profile management for a
communication line. The unit of work is not as simple as do and go.
It can go over days and involve devices and proxy server
communication.

When I do the verification on the current Axon File System Store, in
my opinion actually is quite good for applications which do not need a
complicate transaction management for unit of work. But it needs two
basic things which is vital for the file system store. One is
eventSerializer option configuration and another one is folder
structure option configuration. The folder structure issue is really
created by the limitation of the file system. Axon 1.2 is already
provide "eventSeiralizer" option. Thanks for providing a custom
"EventFileResolver" on 1.3.

Best Regards

Dave

Hi Dave,

I was just about to add the logic to the FileSystemEventStore, when I noticed it was already there. All you need to do is use setEventFileResolver(…), instead of setBaseDir(). The latter is just a shortcut way to use the default settings.

Cheers,

Allard