sapek | 10 years ago | on: Intel Marrying FPGA, Beefy Broadwell for Open Compute Future
sapek's comments
sapek | 10 years ago | on: Intel Completes $16.7B Altera Deal
sapek | 10 years ago | on: Pybind11 – Seamless operability between C++11 and Python
sapek | 10 years ago | on: Ask HN: What are some good resources on the history of programming languages?
sapek | 10 years ago | on: Git-meld-index: Run meld or any Git difftool to interactively stage changes
[1] http://vimcasts.org/episodes/fugitive-vim-working-with-the-g...
sapek | 10 years ago | on: Reflection in C++14
sapek | 10 years ago | on: Reflection in C++14
[1] http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n444...
[2] http://en.cppreference.com/w/cpp/language/parameter_pack
[3] https://microsoft.github.io/bond/manual/bond_cpp.html#tuples
sapek | 10 years ago | on: Dropbox Is Struggling and Competitors Are Catching Up
Or does Dropbox not support symlinks on Windows?
sapek | 10 years ago | on: Why Go is doomed to succeed
sapek | 10 years ago | on: Using Protobuf instead of JSON to communicate with a front end
[1] https://microsoft.github.io/bond/manual/bond_cpp.html#simple...
[2] https://microsoft.github.io/bond/manual/bond_cs.html#json
sapek | 10 years ago | on: How to Make an Open Plan Office Suck Less
sapek | 11 years ago | on: Microsoft Bond
1) Simple deserialization where an object is fully materialized. This is the simplest (you write your business logic against idiomatic types in your target language) but, as you note, might not be best from performance perspective in some scenarios.
2) Lazy deserialization at the level of nested structs via bonded<T> [1]. In many cases this allows to optimize performance if you don't need to materialize the whole object but w/o loosing much in terms of simplicity of the programming model.
3) Transforms [2]. This is a very generic and very powerful abstraction in Bond. All higher level APIs like serialization and deserialization are internally implemented using this mechanism (even Python bindings [3] are fully implemented on top of Bond C++ meta-programming infrastructure driving Boost Python). In C++ it is built using template meta-programming and in C# using LINQ expressions. In Both cases it is a little like having a generic, strongly typed parser for richly typed data.
[1] https://microsoft.github.io/bond/manual/bond_cpp.html#unders...
[2] https://microsoft.github.io/bond/manual/bond_cpp.html#transf...
sapek | 11 years ago | on: Microsoft Bond
[1] https://microsoft.github.io/bond/manual/compiler.html
[2] https://microsoft.github.io/bond/manual/bond_cpp.html#transf...
sapek | 11 years ago | on: But Where Do People Work in This Office?
sapek | 11 years ago | on: Bond – An extensible framework for working with schematized data
I hear you on the fragmentation. I know that this doesn't help the community as an explanation, but big companies like Facebook, Google and Microsoft really have a good reasons to control such fundamental pieces of their infrastructure as serialization. Case in point: Facebook has forked their own Thrift project because, I presume, having it as Apache project was too restraining.
FWIW, we plan to develop Bond in public and accept contributions from the community.
sapek | 11 years ago | on: Bond – An extensible framework for working with schematized data
sapek | 11 years ago | on: Bond – An extensible framework for working with schematized data
sapek | 11 years ago | on: Bond – An extensible framework for working with schematized data
2) You can do both. You can also do type safe transformations/aggregations/etc on serialized data w/o materializing any object.
sapek | 11 years ago | on: Bond – An extensible framework for working with schematized data
We have support for a few more languages that we are using internally but after having a hard look at the implementations we decided that they weren't up to par for the open source release yet. I hope that we will release more soon. And needless to say, we are open to contributions from the community.
sapek | 11 years ago | on: Bond – An extensible framework for working with schematized data
1) In some scenarios you have information at runtime that allows you do generate much faster code. The canonical example is untagged protocols, where serialized payload doesn't contain any schema information and you get schema at runtime. Bond supports untagged protocols (like Avro) in addition to tagged ones (like protobuf and Thrift) and the C# version generates insanely fast deserializer for untagged.
2) It allows programmatic customizations. If the work is done via codegen'ed source code then the only way for user to do something custom is to change the code generator to emit modified code. Even if codegen provides ability to do that, it is very hard to maintain such customizations. In Bond the serialization and deserialization are composed from more generic abstractions: parsers and transforms. These lower level APIs are exposed to the user. As an example imagine that you need to scrub PII information from incoming messages. This is a bit like deserialization, because you need to parse the payload, and a bit like serialization, because you need to write the scrubbed data. In Bond you can implement such an operation from those underlying abstractions and because you can emit the code at runtime you don't sacrifice performance.
BTW, Bond allows to do something similar in C++. The underlying meta-programming mechanism is different (compile-time template meta-programming instead of runtime JIT) but the principle that serialization and deserialization are not special but are composed from more generic abstractions is the same.