Comments (4)
Hey I'm really sorry for the delay, I only saw this issue was open yesterday.
I just pushed 7f9dd66; some changes (to the develop branch) that allow custom JSON encoder/decoder to be passed as application constructor parameters. Does that help?
I'm really interested to hear about how you are using it with Django. Do you think it would make sense to make something that works like a normal Django model? I'm just about to start a Django project to make a user interface for an event sourcing application, and would be really interested to hear your thoughts.
from eventsourcing.
Also FYI to get a __qualname__
attribute on a class you can use QualnameABCMeta
as the meta class. For example, see the DomainEvent
class. Both are in model/events.py
.
The __qualname__
is needed primarily because the domain event classes are nested in the domain entity classes, and the event topic needs to have both so that the domain event topic can be resolved to a domain event class when a domain event is reconstituted from a stored event. If other object instances are set on the domain event, they are also expected by the default JSON encoder/decoder to have a __qualname__
attribute in case they happen to be nested. In Python 2, there is no way to tell when (where) a class is nested, unless you fix up something like QualnameABCMeta
. As I'm sure you know, object classes in Python 3 already have a __qualname__
attribute.
from eventsourcing.
Hey Now the delay is on my side ;-) Just got back from my holiday.
Thnx for the update!. Updating to the development branch now.
I’m currently developing an app with Django (v1.8.x) and Django-oscar and it would be very useful to use event sourcing for some parts op the app. Currently I am focussing on subscriptions.
For the database I’m using Postgres v9.4 (Because of the JSONB field ;-) The 'DjangoStoredEvent’ model uses the JsonBfield http://djangonauts.github.io/django-pgjson/ (or the native JSONfield https://docs.djangoproject.com/en/1.9/ref/contrib/postgres/fields/#jsonfield for Django v1.9+ ) for ‘event_attrs’ so its effectively an documentstore with indexing capabilities and loads of other nice features. The django models stored in Json break the ObjectJsonEnecoder because of the missing qualname (Using python 2.7.x) so with this update I hopefully can try fix this. I tried adding the QualnameABCMeta as metaclass which resulted in al kinds of multimetaclass hell ;-)
Keep up the good work!
Op 27 dec. 2015, om 23:57 heeft John Bywater [email protected] het volgende geschreven:
Hey I'm really sorry for the delay, I only saw this issue was open yesterday.
I just pushed 7f9dd66 7f9dd66;
some changes (to the develop branch) that allow custom JSON encoder/decoder to be passed as application constructor parameters. Does that help?I'm really interested to hear about how you are using it with Django. Do you think it would make sense to make something that works like a normal Django model? I'm just about to start a Django project to make a user interface for an event sourcing application, and would be really interested to hear your thoughts.
—
Reply to this email directly or view it on GitHub #3 (comment).
from eventsourcing.
Thanks! I got distracted. I'd love to chat with you about making a django-eventsourcing package. I just setup a mailing list for this project, it would be great if you were to join ;-). Hoping to discuss these things further with you soon...
https://groups.google.com/forum/#!forum/eventsourcing-users
from eventsourcing.
Related Issues (20)
- Running a system of more than two applications HOT 5
- Discussion on clean code best practice HOT 2
- Question: how to make domain event listener without making another aggregate HOT 2
- MongoDB EventStore support. HOT 2
- Question: Any intention to extend/fork this library to async? HOT 7
- Postgres does not accept idle_in_transaction_session_timeout as float string HOT 2
- Postgres schema change possibility HOT 5
- Investigating potential problem when saving events for multiple aggregates HOT 2
- Custom Postgres schema breaks followers HOT 3
- Aggregate Not Found when AGGREGATE_CACHE_MAXSIZE not set HOT 13
- monotonic HOT 2
- support postgresql as alias for postgres persistence module HOT 3
- Support for rabbitmq HOT 10
- Best way to befriend sqlalchemy database and eventsourcing HOT 6
- Is it necessary to re-hydrate an aggregate to check it exists in a repository? HOT 4
- Suggested approach to Entities in 9.x? HOT 1
- Slack invite not working HOT 3
- Snapshot in aggregate8 example won't work for custom object in aggregate HOT 8
- `Follower(Application)` does not call `self.construct_mapper()` HOT 5
- Additional examples HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eventsourcing.