Skip to content

Marley is a library for serialising Scrooge generated classes representing Thrift objects as Avro with minimal boilerplate.

License

Notifications You must be signed in to change notification settings

guardian/marley

Repository files navigation

Marley Maven Central Release

Marley is a library for serialising Scrooge generated classes representing Thrift objects as Avro with minimal boilerplate.

Installation

libraryDependencies ++= Seq(
  "com.gu" %% "marley" % "0.2.16"
)

Usage

import com.gu.marley._

implicit val enumSer = AvroSerialisable.enum[ExampleEnum]
implicit val structSer = AvroSerialisable.struct[ExampleStruct]

AvroFile.write(Seq(struct))(file)

val readStructs: Iterable[ExampleStruct] = AvroFile.read[ExampleStruct](file)

Is this usable in production?

Marley has been used successfully in the Guardian's realtime analytics system Ophan for many years.

Marley is macro based and doesn't perform any runtime reflection. I haven't done any micro-benchmarking, but it's currently serialising more than 5000 reasonably complicated messages/minute on an EC2 t2.medium without breaking a sweat.

License

Marley is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Marley is a library for serialising Scrooge generated classes representing Thrift objects as Avro with minimal boilerplate.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published