Dzoukr / CosmoStore

F# Event store for Azure Cosmos DB, Table Storage, Postgres, LiteDB & ServiceStack
MIT License
168 stars 21 forks source link

Confusion in types. Might need some extra functions. #32

Closed kunjee17 closed 4 years ago

kunjee17 commented 4 years ago

Even though we are providing more generic types to make things more flexible. In code we are still having JToken and int64.

Obviously we are doing logic part on it. We might need to update that, to truly support everything.

Dzoukr commented 4 years ago

I don't understand what do you mean by that. Newtonsoft.Json with int64 are used only on each implementation level - each storage provider (Cosmos, TableStorage, InMemory) decides what storage and version it use. Interface for CosmoStore is now fully generic and ready to be implemented.

kunjee17 commented 4 years ago

@Dzoukr interface is great. Almost perfect. I was thinking of removing implementation level all together. At least for few implementation.

So, thinking of providing functions with default implementation in Config. So, that logic can be provided by user if user likes to change things.

Like if user wants to change JsonSerializer for Marten, he / she should be able to change it. So, I was thinking in that direction.

Dzoukr commented 4 years ago

Oh, now I see. That would mean we need to have possibility to plugin various de/serializers into implementation, but why not?

kunjee17 commented 4 years ago

Exactly. As we provide more and more support, I think we should not bind end user for serialization or version check (it can be int64 or it can be any thing ). What you say? Should we start pushing Cosmo store to new Cosmos?

Dzoukr commented 4 years ago

I think we can create new version of CosmoStore.Cosmos package with default (newtonsoft?) serialization + possibility push custom serializer over configuration.

kunjee17 commented 4 years ago

We can close this issue. As not JToken is there for tests only.