Explore what your community could build.
FeaturesBUILD Building blocks your community can combine. Comparison tableCOMPARE How Bonfire differs from other community platforms. Case studiesSTORIES How communities are shaping Bonfire for their needs. About BonfireABOUT The project, principles, and people behind it. Try Bonfire at the campground ↗ Launch your BonfireChoose how much you want to run yourself.
Self-hostDIY Your infrastructure and some sysadmin comfort. Cooperative hostingHOST Your own space without a sysadmin job. Co-design with usWITH For communities, organisations and funders with specific needs. Compare all three routes → EcosystemFind people, answers, and tools around Bonfire.
ParticipateJOIN Contribute, collaborate, or help sustain the commons. FAQsASK Licensing, federation, privacy, and governance. DocumentationDOCS Setup guides and technical reference for hosts and builders. Browse the source code ↗ Blog Get startedBonfire.Ecto contains Ecto transactional support as acts for Bonfire.Epics
Bonfire.Ecto is designed to facilitate complex Ecto transaction handling within an Elixir application that uses Bonfire.Epics to execute a sequence of operations (or Acts). These modules provide a structured way to manage database transactions as a series of acts and managing them within an Epic, offering flexibility and control over database interactions, ensuring that transactions are executed efficiently.
Bonfire.Ecto.Acts.Begin
Epic.Bonfire.Ecto.Acts.Work
Bonfire.Ecto.Acts.Work.add/2 function and executed if there are no errors in the Epic or changesets.Bonfire.Ecto.Acts.Commit
Bonfire.Ecto.Acts.Begin to identify when to commit the transaction.Ensure that you have Ecto and Bonfire.Epics installed and configured in your application, and then install this linrary.
Bonfire.Ecto.Acts.Begin #Refer to Bonfire.Epics docs to define some Acts and Epics: https://github.com/bonfire-networks/bonfire_epics
Queue operations by calling the Bonfire.Ecto.Acts.Work.add/2 function, providing the epic and a key representing the changeset to be processed.
epic = Bonfire.Ecto.Acts.Work.add(epic, :some_changeset)
Bonfire.Ecto Acts to your Epic # # First come the Acts that prepare the changeset and call `Bonfire.Ecto.Acts.Work.add/2` to queue it
# Open a Postgres transaction and actually do the insertions in DB
Bonfire.Ecto.Acts.Begin,
# Run our inserts
Bonfire.Ecto.Acts.Work,
Bonfire.Ecto.Acts.Commit,
# Then can come some Acts that process the result of the transaction